This used to work in v7, but broken in v8, which we upgraded to recently.
Restarting kibana and then restarting metricbeat, like so:
systemctl restart elasticsearch && systemctl restart kibana && systemctl restart metricbeat && systemctl restart auditbeat && systemctl restart filebeat
results in metricbeat dying with the following right away, without waiting any number of seconds to retry:
{"log.level":"error","@timestamp":"2023-03-28T14:34:32.944-0700","log.origin":{"file.name":"instance/beat.go","file.line":1071},"message":"Exiting: 4 errors: error making http request: Get \"http://localhost:5601/api/status\": dial tcp 127.0.0.1:5601: connect: connection refused; error making http request: Get \"http://localhost:5601/api/status\": dial tcp 127.0.0.1:5601: connect: connection refused; error making http request: Get \"http://localhost:5601/api/status\": dial tcp 127.0.0.1:5601: connect: connection refused; error making http request: Get \"http://localhost:5601/api/status\": dial tcp 127.0.0.1:5601: connect: connection refused","service.name":"metricbeat","ecs.version":"1.6.0"}
Note that neither filebeat nor auditbeat suffer from this issue. This feels like a regression bug, because it never used to be a problem in v7. And it's not like kibana is not there, it's there, but still going through its starting paces.
There are already max_retries and related retry settings for elasticsearch retries, there should probably be a similar set of (working) configs for kibana?
Here's a relevant ticket on Github Metricbeat fails to start if kibana module is down · Issue #34135 · elastic/beats · GitHub. Will someone be able to give it some attention please?