ElasticSearch

Docker安装Skywalking APM分布式追踪系统

。_饼干妹妹 提交于 2021-01-04 20:08:43
Skywalking简单介绍   Skywalking是一个应用性能管理(APM)系统,具有服务器性能监测,应用程序间调用关系及性能监测等功能,Skywalking分为服务端、管理界面、以及嵌入到程序中的探针部分,由程序中的探针采集各类调用数据发送给服务端保存,在管理界面上可以查看各类性能数据。本文介绍服务端及管理界面的安装。 环境介绍   本文使用虚拟机unbutu18+docker。本unbutu18系统IP地址为: 192.168.150.134 大家在使用时记得将此地址换成自己的实际地址。   docker的安装可参考: https://www.cnblogs.com/sunyuliang/p/11422674.html Skywalking安装    1:安装服务端: 这里介绍服务端的两种存储等式,一种是默认的H2存储,即数据存储在内存中,一种是使用elasticsearch存储,大家可以任选1.1或1.2其中一种安装方式 1.1 :默认H2存储      输入以下命令,并耐心待下载。       sudo docker run --name skywalking -d -p 1234 : 1234 -p 11800 : 11800 -p 12800 : 12800 --restart always apache/skywalking-oap-server      1

Subtract numeric fields between two documents with different timestamp

╄→尐↘猪︶ㄣ 提交于 2021-01-04 09:02:18
问题 Lets say I have these data samples: { "date": "2019-06-16", "rank": 150 "name": "doc 1" } { "date": "2019-07-16", "rank": 100 "name": "doc 1" } { "date": "2019-06-16", "rank": 50 "name": "doc 2" } { "date": "2019-07-16", "rank": 80 "name": "doc 2" } The expected result is by subtracting the rank field from two same name of docs with different date (old date - new date): { "name": "doc 1", "diff_rank": 50 } { "name": "doc 2", "diff_rank": -30 } And sort by diff_rank if possible, otherwise I

安装Elasticsearch和Kibana

二次信任 提交于 2021-01-04 08:51:57
安装Elasticsearch windows安装elasticsearch-5.2.0 1.准备 jdk8的开发环境 2.下载 来自 http://www.elasticsearch.org/download/的ElasticSearch,选择你需要的版本 3.运行 Windows命令行,进入es安装目录的bin目录,运行elasticsearch.bat 4.验证 浏览器验证: http://localhost:9200/ 如下: { "name" : "uHJE4SG", "cluster_name" : "elasticsearch", "cluster_uuid" : "KiS0ssssssssssssLy452KYTrQ", "version" : { "number" : "5.2.0", "build_hash" : "24e05b9", "build_date" : "2017-01-24T19:52:35.800Z", "build_snapshot" : false, "lucene_version" : "6.4.0" }, "tagline" : "You Know, for Search" } 安装Kibana插件 6.下载和解压缩Kibana安装包 D:\kibana-5.2.0 7.命令行启动Kibana bin\kibana.bat 8.浏览器访问

journalbeat is not shipping logs to ElasticSearch or not outputting logs on console in Kubernetes

可紊 提交于 2021-01-04 04:19:40
问题 I am not sure if anyone has tried using journalbeat to ship logs to elasticsearch or even console output . I am trying to do the same. Its running fine but not shipping any logs. Any leads would be appreciated 00-configmap.yaml --- apiVersion: v1 kind: ConfigMap metadata: name: journalbeat-config labels: k8s-app: journalbeat-logging version: v1 data: journalbeat.yml: | name: "${NODENAME}" journalbeat.inputs: - paths: [] seek: cursor cursor_seek_fallback: tail processors: - add_kubernetes

journalbeat is not shipping logs to ElasticSearch or not outputting logs on console in Kubernetes

允我心安 提交于 2021-01-04 04:14:38
问题 I am not sure if anyone has tried using journalbeat to ship logs to elasticsearch or even console output . I am trying to do the same. Its running fine but not shipping any logs. Any leads would be appreciated 00-configmap.yaml --- apiVersion: v1 kind: ConfigMap metadata: name: journalbeat-config labels: k8s-app: journalbeat-logging version: v1 data: journalbeat.yml: | name: "${NODENAME}" journalbeat.inputs: - paths: [] seek: cursor cursor_seek_fallback: tail processors: - add_kubernetes

journalbeat is not shipping logs to ElasticSearch or not outputting logs on console in Kubernetes

六月ゝ 毕业季﹏ 提交于 2021-01-04 04:13:54
问题 I am not sure if anyone has tried using journalbeat to ship logs to elasticsearch or even console output . I am trying to do the same. Its running fine but not shipping any logs. Any leads would be appreciated 00-configmap.yaml --- apiVersion: v1 kind: ConfigMap metadata: name: journalbeat-config labels: k8s-app: journalbeat-logging version: v1 data: journalbeat.yml: | name: "${NODENAME}" journalbeat.inputs: - paths: [] seek: cursor cursor_seek_fallback: tail processors: - add_kubernetes

【Elastic】SpringBoot快速集成ES

不羁的心 提交于 2021-01-04 02:57:00
Elastic Search 的底层是开源库 Lucene。但是Lucene的使用门槛比较高,必须自己写代码去调用它的接口。而Elastic Search的出现正是为了解决了这个问题,它是 Lucene 的封装,提供了 REST API 的操作接口,我们可以开箱即用。 环境 JDK版本:8 SpringBoot:2.x ES版本:7.1.1 依赖 <!-- 集成es client,并排除低版本依赖(5.6) --> < dependency > < groupId > org.elasticsearch.client </ groupId > < artifactId > elasticsearch-rest-high-level-client </ artifactId > < version > 7.1.1 </ version > < exclusions > < exclusion > < groupId > org.elasticsearch </ groupId > < artifactId > elasticsearch </ artifactId > </ exclusion > < exclusion > < groupId > org.elasticsearch.client </ groupId > < artifactId > elasticsearch

Helm部署EFK日志系统

一世执手 提交于 2021-01-03 17:26:55
EFK部署 --- Elasticsearch + Fluentd + Kibana # helm fetch stable/elasticsearch # 可以根据自己的需求修改value值,也可以不修改 # helm install --name els --namespace=efk -f values.yaml stable/elasticsearch # 我们可以通过-f指定使用的values.yaml # kubectl run cirror-$RANDOM --rm -it --image=cirros -- /bin/sh # cirros可以快速建立一个java客户端 # curl els-elasticsearch-client.efk.svc.cluster.local:9200 # curl els-elasticsearch-client.efk.svc.cluster.local:9200/_cat/nodes # helm fetch stable/fluentd-elasticsearch # 拉取 fluentd,修改value.yaml中elasticsearch的host值,host为部署elasticsearch后解析的域名 ♦ 如果需要收集master节点的日志,需要修改tolerations,兼容master节点污点;

Elasticsearch match string to field with fuzziness

给你一囗甜甜゛ 提交于 2021-01-03 08:38:32
问题 I'm trying to match a string to a field and only want to apply fuzziness. For example, with these documents: { title: "replace oilfilter" }, { title: "replace motoroil" } The following queries should match only the first document: "Replace oilfilter", "Replace oilsfilter", "Replaze oilfilter" The following queries should NOT match any document: "replace", "oilfilter", "motoroil" What I got so far is the following: index I'm using the keyword analyzer so it sees the (potential) phrase as a

Kubernetes生产架构详解

给你一囗甜甜゛ 提交于 2021-01-02 23:54:02
注意 本文,只是笔者针对Kubernetes生产环境运行的一些关于架构设计和实现方案的总结,内容很粗糙,后续会不断完善。 首先,我们来梳理下Kubernetes生产架构,其设计适用于绝大多数环境,如下图所示 在该架构中,我们可以将其分为四层,如下: Client层:即Kubernetes集群外部用户、客户端等; 服务访问层:即由Traefik ingress实现服务发现、负载均衡和路由规则定义等; 业务应用层:即基于Kubernetes平台构建和运行企业业务应用,如CI/CD持续集成、微服务项目、监控告警和日志管理、私有镜像仓库等服务; 基础设施层:即由Kubernetes容器管理平台和Ceph/NFS数据持久化存储等系统组成的基础设施服务。 下面,我们分别来谈谈各层的具体实现方案。 基础设施层 Kubernetes平台 部署管理:Kubernetes平台除了直接使用公有云如阿里云、AWS等云服务提供商的K8s服务外,我们还可以自己部署和管理等,如使用Kubespray工具。 网络通信:在容器和容器之间、容器和主机网络方面,可以使用 Calico 或Flannel等方案。 HA高可用:Kubernetes节点分为Master和Node两种类型节点,前者负责运行集群相关的控制管理服务,而后者负责运行Pod容器。在多Node节点模式下,由于Kubernetes