# How to clean up curator messages about system indices being queried

**URL:** <https://discuss.elastic.co/t/how-to-clean-up-curator-messages-about-system-indices-being-queried/275233>\
**Category:** Elasticsearch\
**Tags:** curator\
**Created:** [June 8, 2021, 5:59am UTC](https://discuss.elastic.co/t/how-to-clean-up-curator-messages-about-system-indices-being-queried/275233 "2021-06-08T05:59:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cknz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cknz/32/9640_2.png) [@cknz](https://discuss.elastic.co/u/cknz)\
**Post date:** [June 8, 2021, 5:59am UTC](https://discuss.elastic.co/t/how-to-clean-up-curator-messages-about-system-indices-being-queried/275233/1 "2021-06-08T05:59:57Z")

</div>

I'm using curator to manage my indices currently. I'm suffering from cron spam due to the following:

> /usr/local/lib/curator/venv/lib64/python3.8/site-packages/elasticsearch/connection/base.py:200: ElasticsearchWarning: this request accesses system indices: [.apm-agent-configuration, .apm-custom-link, .async-search, .kibana\_1, .kibana\_2, .kibana\_3, .kibana\_4, .kibana\_5, .kibana\_6, .kibana\_7, .kibana\_task\_manager\_1, .kibana\_task\_manager\_2, .kibana\_task\_manager\_3, .kibana\_task\_manager\_4, .kibana\_task\_manager\_5, .reporting-2018.08.26, .security-7, .tasks], but in a future major version, direct access to system indices will be prevented by default  
> warnings.warn(message, category=ElasticsearchWarning)

I'm not interesting in using curator to manage any system indices, and I would like to tell it not to, so as to avoid the above message.

Note that this message is sent to stdout/stderr, whereas I have curator configured to log to file.

curator, version 5.8.4  
Python 3.8.6  
From pip:  
elasticsearch 7.12.1  
elasticsearch-curator 5.8.4

I think this is happening as curator lists initial set of indices to then later filter. My actions.yml are all prefix-based, although do allow\_ilm\_indices.

This warning is generated by Elasticsearch itself (communicated via the 'Warnings' response header), and emitted using the Python 'warnings' module as used by the 'elasicsearch' Python module. Curator doesn't seem to be doing anything with the 'warnings' module, such as using the 'catch\_warnings' context manager.

The code that is likely generating this is in [get\_indices which uses \_all](https://github.com/elastic/curator/blob/3ddfbb95ea7a164bb3f8c773b0392481f067da7c/curator/utils.py#L660)

Guess I'll just use the [PYTHONWARNINGS=ignore](https://docs.python.org/3/using/cmdline.html#envvar-PYTHONWARNINGS) environment variable in the cron file for now.

Cheers,  
Cameron

---

<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:** [June 8, 2021, 2:04pm UTC](https://discuss.elastic.co/t/how-to-clean-up-curator-messages-about-system-indices-being-queried/275233/2 "2021-06-08T14:04:02Z")

</div>

As you correctly observed, this is not a Curator message, but rather one from the API itself. If you think a feature request is warranted for this, please submit one at [GitHub - elastic/curator: Curator: Tending your Elasticsearch indices](https://github.com/elastic/curator)

---

<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 6, 2021, 2:04pm UTC](https://discuss.elastic.co/t/how-to-clean-up-curator-messages-about-system-indices-being-queried/275233/3 "2021-07-06T14:04:18Z")

</div>

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