elk

1.elasticsearch.yml关键配置说明(无权限配置)

  cluster.name 集群名称,以此作为是否是同一集群的判断条件
  node.name 节点名称,以此作为集群中不同节点的区分条件
  network.host/http.port 网络地址和端口,用于http 和 ttransport服务使用
  path.data 数据存储地址
  path.log 日志存储地址
  discovery.zen.ping.unicast.hosts: ["host1", "host2"]  集群区

2.elasticsearch集群配置注意点:

错误1)MasterNotDiscoveredException:没有设置

 node.master: true
 node.data: true

错误2)[o.e.d.z.ZenDiscovery ] [node-2] failed to send join request to master [{node-1}], reason [RemoteTransportException[[node-1][internal:discovery/zen/join]]; nested: IllegalArgumentException[can't add node {node-2}, found existing node {node-1} with the same id but is a different node instance]; ]

由于在服务TP1上运行过elasticsearch,这时候已经生成了nodes节点,再scp到其他机器就会造成 id一致。由于node是需要重新分配的,只需要删除elasticsearch.yml中path.data路径下的nodes文件夹即可;
需要使用x-pack权限配置参考https://www.jianshu.com/p/9b4a729ca78c

2.Development 与 Production 模式说明

以 transport 的地址是否绑定在 localhost 为判断标准 network.host
Development 模式下在启东时会以warning 的方式提示配置检查异常
Production 模式下在启东时会以error 的方式提示配置检查异常并退出3.

3.参数修改的第二种方式(第一种方式是直接修改yml配置文件)

bin/elasticsearch -Ehttp.port=19200

4.kibana主要参数

server.host/server.port
elasticsearch.url 与什么el相连

5.el常用术语

Document 文档数据  相当于数据库中的一条数据
Index 索引 相当于数据库的一个库
Type 索引中的数据类型 相当于库中的一张表
Filed字段,文档的属性
Query DSL 查询语法

6.logstash

常用启动参数








logstash参考之https://blog.csdn.net/weixin_41047933/article/details/82699823

7.Beats

Filebeat 日志文件
MetricBeat 度量数据
Packetbeat 网络数据
Winlogbeat Windows 数据
Heartbeat 健康检查


filebeat的输入,输出流与过滤语法与logstash差不多,功能没有logstash齐全,但是启动占用的内存比logstash少的多。

filebeat的输出:

https://www.elastic.co/guide/en/beats/filebeat/6.5/configuring-output.html
Elasticsearch
Logstash
Kafka
Redis
File
Console
Cloud   

例如:输出到kafka,在filebeat.yml中配置如下:

 output.kafka:
   # initial brokers for reading cluster metadata
   hosts: ["kafka1:9092", "kafka2:9092", "kafka3:9092"]

  # message topic selection + partitioning
  topic: '%{[fields.log_topic]}'
  partition.round_robin:
   reachable_only: false

  required_acks: 1
  compression: gzip
  max_message_bytes: 1000000
posted @ 2019-09-18 17:50  cherishDouble  阅读(220)  评论(0编辑  收藏  举报