# Configuring heartbeat hosts list

**URL:** https://discuss.elastic.co/t/configuring-heartbeat-hosts-list/98390
**Category:** Beats
**Tags:** heartbeat
**Created:** [August 25, 2017, 3:20pm UTC](https://discuss.elastic.co/t/configuring-heartbeat-hosts-list/98390 "2017-08-25T15:20:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![TimWard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timward/32/19574_2.png) [@TimWard](https://discuss.elastic.co/u/TimWard)
#### Post date: [August 25, 2017, 3:20pm UTC](https://discuss.elastic.co/t/configuring-heartbeat-hosts-list/98390/1 "2017-08-25T15:20:23Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![immavalls](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/immavalls/32/146501_2.png) [@immavalls](https://discuss.elastic.co/u/immavalls)
#### Post date: [August 25, 2017, 3:27pm UTC](https://discuss.elastic.co/t/configuring-heartbeat-hosts-list/98390/2 "2017-08-25T15:27:13Z")

</div>

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](https://www.elastic.co/guide/en/beats/heartbeat/current/configuration-heartbeat-options.html)

---

<div class="post-metadata">

### Author: ![TimWard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timward/32/19574_2.png) [@TimWard](https://discuss.elastic.co/u/TimWard)
#### Post date: [August 25, 2017, 3:33pm UTC](https://discuss.elastic.co/t/configuring-heartbeat-hosts-list/98390/3 "2017-08-25T15:33:56Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 22, 2017, 3:42pm UTC](https://discuss.elastic.co/t/configuring-heartbeat-hosts-list/98390/4 "2017-09-22T15:42:53Z")

</div>

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