# Consul discovery plugin?

**URL:** <https://discuss.elastic.co/t/consul-discovery-plugin/215960>\
**Category:** Elasticsearch\
**Created:** [January 21, 2020, 10:07pm UTC](https://discuss.elastic.co/t/consul-discovery-plugin/215960 "2020-01-21T22:07:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgarrigue](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rgarrigue/32/61171_2.png) [@rgarrigue](https://discuss.elastic.co/u/rgarrigue)\
**Post date:** [January 21, 2020, 10:07pm UTC](https://discuss.elastic.co/t/consul-discovery-plugin/215960/1 "2020-01-21T22:07:51Z")

</div>

Hi there

I'm wondering if there's any plan for a discovery plugin based on Consul ?

Best regards,  
Rémy

---

<div class="post-metadata">

**Author:** ![miker256](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miker256/32/60563_2.png) [@miker256](https://discuss.elastic.co/u/miker256)\
**Post date:** [January 22, 2020, 12:44am UTC](https://discuss.elastic.co/t/consul-discovery-plugin/215960/2 "2020-01-22T00:44:54Z")

</div>

This might be what you're looking for.

> **[vvanholl/elasticsearch-consul-discovery](https://github.com/vvanholl/elasticsearch-consul-discovery)**
>
> Consul based node discovery plugin for elasticsearch - vvanholl/elasticsearch-consul-discovery

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 22, 2020, 10:20am UTC](https://discuss.elastic.co/t/consul-discovery-plugin/215960/3 "2020-01-22T10:20:28Z")

</div>

There are no plans for an official Consul plugin, but the one linked above might work for you if you're using a version that it supports.

Another option that's suitable for all supported versions is to use the [file-based seed hosts provider](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-hosts-providers.html#file-based-hosts-provider). You need a separate process for extracting the addresses of the master nodes from Consul and writing them to a file.

---

<div class="post-metadata">

**Author:** ![rgarrigue](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rgarrigue/32/61171_2.png) [@rgarrigue](https://discuss.elastic.co/u/rgarrigue)\
**Post date:** [January 22, 2020, 12:26pm UTC](https://discuss.elastic.co/t/consul-discovery-plugin/215960/4 "2020-01-22T12:26:39Z")

</div>

It will be quite easy with consul-template indeed. I'll go for this one, has the community plugin mentionned seems to be meant for ES 6.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [January 22, 2020, 12:31pm UTC](https://discuss.elastic.co/t/consul-discovery-plugin/215960/5 "2020-01-22T12:31:57Z")

</div>

TIL `consul-template`, thanks. Looks like it's just the right tool for the job.

---

<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:** [February 19, 2020, 12:34pm UTC](https://discuss.elastic.co/t/consul-discovery-plugin/215960/6 "2020-02-19T12:34:23Z")

</div>

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