| 主机名 | ip地址 | 主要软件 | 系统 |
|---|---|---|---|
| node1 | 192.168.154.70 | ElasticSearh、Kibana | Centos7.5 |
| node2 | 192.168.154.60 | ElasticSearh | Centos7.5 |
| Apache | 192.168.154.50 | Logstash、Apache | Centos7.5 |
| Filebeat | 192.168.154.40 | Filebeat | Centos7.5 |
- #上传软件包 filebeat-6.2.4-linux-x86_64.tar.gz 到/opt目录
- tar zxvf filebeat-6.2.4-linux-x86_64.tar.gz
- mv filebeat-6.2.4-linux-x86_64/ /usr/local/filebeat
vim filebeat.yml

----------Elasticsearch output----------
全部注释
----------------Logstash output---------------------
output.logstash:
hosts: ["192.168.154.40:5044"] #指定 logstash 的 IP 和端口
./filebeat -e -c filebeat.yml
- cd /etc/logstash/conf.d
-
- vim logstash.conf
-
- input {
- beats {
- port => "5044"
- }
- }
- output {
- elasticsearch {
- hosts => ["192.168.154.70:9200"]
- index => "%{[fields][service_name]}-%{+YYYY.MM.dd}"
- }
- stdout {
- codec => rubydebug
- }
- }
-
-
- #启动logstash服务
- logstash -f logstash.conf

