# Query for current index latency

**URL:** <https://discuss.elastic.co/t/query-for-current-index-latency/161217>\
**Category:** Elasticsearch\
**Created:** [December 17, 2018, 10:12pm UTC](https://discuss.elastic.co/t/query-for-current-index-latency/161217 "2018-12-17T22:12:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![justinw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justinw/32/40277_2.png) [@justinw](https://discuss.elastic.co/u/justinw)\
**Post date:** [December 17, 2018, 10:12pm UTC](https://discuss.elastic.co/t/query-for-current-index-latency/161217/1 "2018-12-17T22:12:28Z")

</div>

Hi,

We currently have a monitoring cluster setup on elastic cloud. It has a page, at URL `app/monitoring#/elasticsearch/indices/<name>` that shows stats on the index, including index latency.

What API can I hit to build a watcher alert of that value? Ideally I'd like to get alerted when it is above a threshold.

I've looked at this, [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html), but it looks like `index_time_in_millis` is the aggregated time spent indexing, not the current latency. I might be misinterpreting it, but the value I see is way too large to be the instantaneous value.

Best, Justin

---

<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:** [January 14, 2019, 10:12pm UTC](https://discuss.elastic.co/t/query-for-current-index-latency/161217/2 "2019-01-14T22:12:42Z")

</div>

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