首页 > 其他 > 详细

ELK

时间:2018-09-17 23:24:17      阅读:182      评论:0      收藏:0      [点我收藏+]

elk and redis installation and configuration

ATTENSION

  • attention the version of all software(use the latest)

node1

installed logstash, httpd

  • systemctl start httpd
  • vim /etc/logstash/httpd.conf

input {
    file {
        path => ["/var/log/httpd/access_log"]
        type => "httpd_log"
        start_position => ["beginning"]
    }
}

output {
    redis {
        host => ["node2"]
        key => "logstash-httpd"
        data_type => "list"
    }
}

+ logstash -f /etc/logstash/httpd.conf 

node2

installed redis

  • vim /etc/redis.conf
  • find protected_mode, set default value to no
  • find the bind keyword, comment that line
  • systemctl start redis

node3

installed logstash, elasticsearch

  • vim /etc/logstash/httpd.conf

input {
    redis {
        data_type => "list"
        key => "logstash-httpd"
        host => "node2" # NOTE!! it‘s string not array
    }
}

output {
    elasticsearch {
        hosts => ["node4:9200"]
        index => "logstash-%{+YYYY.MM.dd}"
    }
}
  • vim /etc/elasticsearch/elasticsearch.yml
  • set cluster name and node name
  • systemctl start elasticsearch
  • logstash -f /etc/logstash/httpd.conf

node4

installed kibana

  • see official website how to install and configura it
  • hint: configure kibana through web

ELK

原文:https://www.cnblogs.com/megachen/p/9665468.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!