elk开启组件监控
效果:
logstash配置
/etc/logstash/logstash.yml
root@node1:~# grep -Ev "^#|^$" /etc/logstash/logstash.yml
path.data: /var/lib/logstash
path.logs: /var/log/logstash
xpack.monitoring.enabled: true
xpack.monitoring.elasticsearch.username: logstash_system
xpack.monitoring.elasticsearch.password: Tianji@iecs2023
xpack.monitoring.elasticsearch.hosts: ["http://10.140.19.202:9200", "http://10.140.19.205:9200", "10.140.19.206:9200"]
filebeat配置
/etc/filebeat/filebeat.yml
xpack.monitoring.enabled: true
xpack.monitoring.elasticsearch:
hosts: ["http://10.140.19.202:9200","http://10.140.19.205:9200","http://10.140.19.206:9200"]
username: "elastic"
password: "Tianji@iecs2023"
elasticsearch配置
/etc/elasticsearch/elasticsearch.yml
xpack.monitoring.enabled: true
xpack.monitoring.collection.enabled: true