# Alerting when search time is long over a period - data values

**URL:** https://discuss.elastic.co/t/alerting-when-search-time-is-long-over-a-period-data-values/120956
**Category:** Elasticsearch
**Created:** [February 22, 2018, 1:07am UTC](https://discuss.elastic.co/t/alerting-when-search-time-is-long-over-a-period-data-values/120956 "2018-02-22T01:07:22Z")
**Posts on this page:** 4
**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: [February 22, 2018, 1:07am UTC](https://discuss.elastic.co/t/alerting-when-search-time-is-long-over-a-period-data-values/120956/1 "2018-02-22T01:07:22Z")

</div>

Dear All/Xpack team

I'm trying to use .monitoring-es-6-... indice to alert when search time averages more than X seconds over a period.

I'm seeing entries of below kind in two places (indices\_stats, index\_stats), whereas index\_stats provide this information at individual index level.

```
          "search": {
            "query_total": 134265,
            "query_time_in_millis": 34231
          },

```

Regardless, I'm trying to understand the definition of this values against the context of search time over period.  
I read the documentation "[https://www.elastic.co/guide/en/elasticsearch/guide/current/\_monitoring\_individual\_nodes.html](https://www.elastic.co/guide/en/elasticsearch/guide/current/_monitoring_individual_nodes.html)", which gives info that the numbers should be used to average out the time spent, but want to validate that I read correct for .monitoring indice data as well.

Also, would like to know what these values represent viz. it is for the lifetime of indice (or) for a period.

Thanks for clarification.

BTW: I should add "thanks", and got some clue on finding document over period using below example

> **[elastic/examples](https://github.com/elastic/examples/tree/master/Alerting/Sample%20Watches/monitoring_cluster_health)**
>
> Home for Elasticsearch examples available to everyone. It's a great way to get started.

---

<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: [February 22, 2018, 11:27pm UTC](https://discuss.elastic.co/t/alerting-when-search-time-is-long-over-a-period-data-values/120956/2 "2018-02-22T23:27:25Z")

</div>

Add: If query\_total represent the value , then if I do query\_total/query\_time\_in\_millis, it won't represent the recent state accurately.

Still trying to find a way to determine how to compute my average response time in last X minutes ☹  
Any help/definition on .monitoring-es-6.... data is appreciated.

---

<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: [February 23, 2018, 1:42am UTC](https://discuss.elastic.co/t/alerting-when-search-time-is-long-over-a-period-data-values/120956/3 "2018-02-23T01:42:46Z")

</div>

Found a way using Min and max values for the time range  
🙂

---

<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: [March 23, 2018, 1:42am UTC](https://discuss.elastic.co/t/alerting-when-search-time-is-long-over-a-period-data-values/120956/4 "2018-03-23T01:42:59Z")

</div>

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