Configuring heartbeat hosts list

The list of hosts that Heartbeat polls is configured in the "hosts" list in heartbeat.yml.

If I've got lots of hosts, and hosts come and go, and there are databases of them elsewhere, is it possible to get Heartbeat to consult an external source for the list of hosts (even just including a separate file), or is it a choice between

(1) documenting that people have to remember to manually update heartbeat.yml

(2) writing some (necessarily fragile and flaky) scripts that update heartbeat.yml and restart Heartbeat as and when necessary

(3) writing some (probably less fragile and flaky) scripts to set the hosts list into an environment variable and restart Heartbeat as and when necessary (with splitting into multiple environment variables if/when the length limit is a problem)?

How do people normally handle this in non-trivial deployments?

I think you could try and use watch.poll_file for a separate file, although it seems to be experimental.

https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-heartbeat-options.html

Ta, hadn't spotted that. Will add it to my list of things to investigate.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.