# Getting index status from monitoring data index .monitoring-es-\*

**URL:** <https://discuss.elastic.co/t/getting-index-status-from-monitoring-data-index-monitoring-es/128024>\
**Category:** Elasticsearch\
**Created:** [April 13, 2018, 10:22pm UTC](https://discuss.elastic.co/t/getting-index-status-from-monitoring-data-index-monitoring-es/128024 "2018-04-13T22:22:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karthik\_Ramachandran](https://avatars.discourse-cdn.com/v4/letter/k/f19dbf/32.png) [@Karthik\_Ramachandran](https://discuss.elastic.co/u/Karthik_Ramachandran)\
**Post date:** [April 13, 2018, 10:22pm UTC](https://discuss.elastic.co/t/getting-index-status-from-monitoring-data-index-monitoring-es/128024/1 "2018-04-13T22:22:22Z")

</div>

I'm trying to get an output of all the indices that are not in green state from monitoring data, but not able to using elastic queries. Tried standard filters/must and also script. Below is the observation

index\_stats.status provides the status of indice, but it is only available as part of \_source. Reason, the mapping for monitoring indice doesn't include it for index\_stats, and dynamic is false for mapping. So I'm not able to filter/query. I have to get all the indices info, and filter in any further scripting. To get all the indices info, I have to change the output size of terms in aggregation.

Is there a way to filter out on status directly in queries. If not, we may need new request in git to put field mappings for known values like status in xpack monitoring indice mapping.

NOTE: Script filter is not working as it doesn't support \_source.index\_status.status. \_source is not supported. It is also discussed in [Accessing \_source from script search in 5.0](https://discuss.elastic.co/t/accessing--source-from-script-search-in-5-0/64358)

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [April 16, 2018, 4:23pm UTC](https://discuss.elastic.co/t/getting-index-status-from-monitoring-data-index-monitoring-es/128024/2 "2018-04-16T16:23:39Z")

</div>

Hi Karthik,

The `index_stats.status` field was added to the Elasticsearch monitoring collector, but it is not yet consumed by our monitoring UI. That is why it is not yet mapped.

You can use this field in your own queries, but first you'd need to add your own index template for the `.monitoring-es-*` indices.

Just make sure whenever you add an index template for a system index, it doesn't conflict with any fields that are in use.

---

<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:** [May 14, 2018, 4:24pm UTC](https://discuss.elastic.co/t/getting-index-status-from-monitoring-data-index-monitoring-es/128024/3 "2018-05-14T16:24:03Z")

</div>

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