01 - ELK log system - an upgraded version (adding kafka messaging middleware)

  Introduction: In the past take a simple ELK log system, my personal feeling is, ELK log system is very easy to use. ELK log not previously get this system, when a line item bug, error, and what is to locate the error, an error in the code which java files, each time using linux command on the server to open the Log File Viewer wrong, just very tedious.

  After this ride ELK logging system logs all printing projects are sent to the ELK inside, and then through the interface ELK kibana view of  search  or  view  a log of each time period, as well as what level of logs, giant convenience.

 

  Of course, the last built ELK log system is just a simple, today intends to integrate messaging middleware kafka ELK log into the system.

 

》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》

 

The draw is still my brother blog, build a high-concurrency scenarios ELK log system: https: //blog.csdn.net/qq_22211217/article/details/80764568, and finally build a highly concurrent ELK log system flow chart is as follows:

 

1, first talk about the whole process ELK log system

  

 

 

 

 

 

 2, began to build ELK log system

  2.1 Preparation:

      First prepare three machines: I are as follows:

        192.168.2.115

        192.168.2.116

        192.168.2.119

  • Jdk environment must be configured on three machines, because elasticsearch is in java
  • To install elasticsearch are all on three machines, because now you want to build elasticsearch distributed clusters, so the three machines to be fitted
  • I use 192.168.2.119 as the master node es, 192.168.2.115,192.168.2.116 as a data node
  • Kibana mounted on the primary node, the installation logstash 192.168.2.115

 

  ELK使用的版本:elk所有安装包都在官网下载到

    

 

 

 

3、ELK日志系统第一步:安装elasticsearch

  3.1、目前我把elasticsearch-6.4.2.tar.gz安装包都放在三台机器的/usr/local/dev/es目录下,并解压

 

 

  3.2、开始配置elasticsearch集群

    3.2.1、配置192.168.2.119主节点上的elasticsearch配置文件

#打开elasticsearch的配置文件
vi elasticsearch-6.4.2/config/elasticsearch.yml

 

    配置内容如下:

#集群中的名称
cluster.name: master-node 

#该节点名称
node.name: master 

#意思为该节点为主节点
node.master: true

#表示这不是数据节点
node.data: false

#监听全部ip,在实际环境中应设置为一个安全的ip
network.host: 0.0.0.0

#Elasticsearch服务的端口号
http.port: 9200

#配置自动发现
discovery.zen.ping.unicast.hosts: ["192.168.2.119", "192.168.2.115", "192.168.2.116"]

    

 

192.168.2.119服务器主节点上的elasticsearch配置文件效果图:

 

 

 

 

 

    3.2.2、配置192.168.2.115节点上的elasticsearch配置内容:

#该节点名称
node.name: data-node1

#意思为该节点为主节点
node.master: false

#表示这不是数据节点
node.data: true

 

   3.2、3台服务器的elasticsearch都配置好了,现在来启动一下主节点192.168.2.119上的elasticsearch:

  

#启动命令
./elasticsearch-6.4.2/bin/elasticsearch

    啊哦,启动报错!!!!!!!!!!!!

 

    报错的原因:就是必须要再创建一个用户去操作elasticsearch,不能直接用root用户操作。

 

下班,明天断续。。。。

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

放牛咯!

Guess you like

Origin www.cnblogs.com/spll/p/10938922.html