3 logstash node works fine
i`m add 4th node
configs the sames
/etc/metricbeat/modules.d/logstash-xpack.yml
# Module: logstash
# Docs: https://www.elastic.co/guide/en/beats/metricbeat/main/metricbeat-module-logstash.html
- module: logstash
xpack.enabled: true
period: 10s
hosts: ["localhost:9600"]
#username: "user"
#password: "secret"
metricsets: ["node", "node_stats"]
period: 10s
ssl.enabled: true
ssl.certificate_authorities: ["/etc/metricbeat/http_ca.crt"]
/etc/metricbeat/metricbeat.yml |grep -v '#'
metricbeat.config.modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
setup.template.settings:
index.number_of_shards: 1
index.codec: best_compression
setup.kibana:
host: "xxx:5601"
output.elasticsearch:
hosts: ["https://xxx1:9200", "https://xxx2:9200", "https://xxx3:9200"]
protocol: "https"
username: "elastic"
password: "pass"
ssl.certificate_authorities: ["/etc/metricbeat/http_ca.crt"]
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- add_docker_metadata: ~
- add_kubernetes_metadata: ~
logging.level: info
logging.to_files: true
logging.files:
path: /var/log/metricbeat
name: metricbeat
keepfiles: 7
permissions: 0640
logging.selectors: ["*"]
error log
{"log.level":"error","@timestamp":"2022-12-12T11:16:23.493+0300","log.origin":{"file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset logstash.node_stats: error making http request: Get \"http://localhost:9600/\": dial tcp 127.0.0.1:9600: connect: connection refused","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2022-12-12T11:16:23.496+0300","log.origin":{"file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset logstash.node: error making http request: Get \"http://localhost:9600/\": dial tcp 127.0.0.1:9600: connect: connection refused","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2022-12-12T11:16:33.494+0300","log.origin":{"file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset logstash.node_stats: error making http request: Get \"http://localhost:9600/\": dial tcp 127.0.0.1:9600: connect: connection refused","service.name":"metricbeat","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2022-12-12T11:16:33.494+0300","log.origin":{"file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset logstash.node: error making http request: Get \"http://localhost:9600/\": dial tcp 127.0.0.1:9600: connect: connection refused","service.name":"metricbeat","ecs.version":"1.6.0"}