# Curator logging weirdness

**URL:** <https://discuss.elastic.co/t/curator-logging-weirdness/103751>\
**Category:** Elasticsearch\
**Created:** [October 12, 2017, 2:50pm UTC](https://discuss.elastic.co/t/curator-logging-weirdness/103751 "2017-10-12T14:50:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticus](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@elasticus](https://discuss.elastic.co/u/elasticus)\
**Post date:** [October 12, 2017, 2:50pm UTC](https://discuss.elastic.co/t/curator-logging-weirdness/103751/1 "2017-10-12T14:50:07Z")

</div>

Curator logs 'no actionable items in list' as an ERROR - I don't see this as an 'error' and would like to suppress it?  
Also - Curator logs the index it will reallocate routing (hot to warm) on a dry-run - useful - but not on the actual run - not so useful.

Curious if anyone has come up with a way of handling either or both of the above.

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [October 12, 2017, 3:15pm UTC](https://discuss.elastic.co/t/curator-logging-weirdness/103751/2 "2017-10-12T15:15:39Z")

</div>

> [@elasticus](#):
>
> I don't see this as an 'error' and would like to suppress it?
> 
> Curious if anyone has come up with a way of handling either or both of the above.

You can go around this in Curator with the [`ignore_empty_list`](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.2/option_ignore_empty.html) option.

This option was added expressly for the cases where you want Curator to continue even if no indices were in a list. This separation had to be made from the regular [`continue_if_exception`](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.2/option_continue.html) which catches all other kinds of exceptions. However, the truth is, to Curator, an empty list condition is an error. It cannot proceed without the `ignore_empty_list` option. There is no way to suppress this message, or change it to not be an error.

> [@elasticus](#):
>
> Also - Curator logs the index it will reallocate routing (hot to warm) on a dry-run - useful - but not on the actual run - not so useful.

A dry\_run needs to show the user [exactly what will happen](https://github.com/elastic/curator/blob/v5.2.0/curator/utils.py#L803-L823) with a [dry run](https://github.com/elastic/curator/blob/v5.2.0/curator/actions.py#L213). The disparity comes from the fact that the dry\_run does its own iteration over the values, separate from the regular action. They do not share the same code

[The allocate action does still log what's happening](https://github.com/elastic/curator/blob/v5.2.0/curator/actions.py#L227) when it does the action, but the appearance is different from the dry\_run output because it is applying the settings in a batch, rather than index by index.

---

<div class="post-metadata">

**Author:** ![elasticus](https://avatars.discourse-cdn.com/v4/letter/e/4af34b/32.png) [@elasticus](https://discuss.elastic.co/u/elasticus)\
**Post date:** [October 12, 2017, 3:20pm UTC](https://discuss.elastic.co/t/curator-logging-weirdness/103751/3 "2017-10-12T15:20:35Z")

</div>

Thanks - indeed I found the ignore\_empty\_list option (which I was already using within my delete action.  
I guess If I really really really want the indices that will be moved etc captured in the log I could always just run a dry-run immediately before the actual run 🙂

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [October 12, 2017, 3:22pm UTC](https://discuss.elastic.co/t/curator-logging-weirdness/103751/4 "2017-10-12T15:22:46Z")

</div>

I can also add logging inside the loop and show the body and index list, but that will only be debug-level, as it is very noisy. I could also put "non-dry-run" logging in there to show what's about to happen. I worry a bit about doing that users will think that the action is happening when it sees the logs, but it could be useful to see.

---

<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:** [November 9, 2017, 3:23pm UTC](https://discuss.elastic.co/t/curator-logging-weirdness/103751/5 "2017-11-09T15:23:05Z")

</div>

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