# Log and Indices rotation in a distributed ELK environment

**URL:** <https://discuss.elastic.co/t/log-and-indices-rotation-in-a-distributed-elk-environment/47105>\
**Category:** Elasticsearch\
**Created:** [April 12, 2016, 10:46am UTC](https://discuss.elastic.co/t/log-and-indices-rotation-in-a-distributed-elk-environment/47105 "2016-04-12T10:46:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kartikvelastic](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kartikvelastic](https://discuss.elastic.co/u/kartikvelastic)\
**Post date:** [April 12, 2016, 10:46am UTC](https://discuss.elastic.co/t/log-and-indices-rotation-in-a-distributed-elk-environment/47105/1 "2016-04-12T10:46:35Z")

</div>

Hi,

I have two master nodes and three data nodes and one for kibana.

How do I set up curator in this distributed environment? Please advise. Thanks! Regards,

Kartik Vashishta

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [April 12, 2016, 6:41pm UTC](https://discuss.elastic.co/t/log-and-indices-rotation-in-a-distributed-elk-environment/47105/2 "2016-04-12T18:41:09Z")

</div>

You could have a cron job on all hosts (or at least all master-eligible ones) that runs Curator and connects to localhost. I think Curator has an option to bail out right away if the host it connects to isn't the current master node. That way you're (practically) guaranteed that Curator will run on exactly one machine at a time.

If that doesn't answer your question please be more specific on what the problem is.

---

<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:** [July 5, 2017, 10:59pm UTC](https://discuss.elastic.co/t/log-and-indices-rotation-in-a-distributed-elk-environment/47105/3 "2017-07-05T22:59:51Z")

</div>


