# What is APM Latency Threshold Alert?

**URL:** <https://discuss.elastic.co/t/what-is-apm-latency-threshold-alert/317627>\
**Category:** Kibana\
**Created:** [October 27, 2022, 3:49pm UTC](https://discuss.elastic.co/t/what-is-apm-latency-threshold-alert/317627 "2022-10-27T15:49:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![learningelastic](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@learningelastic](https://discuss.elastic.co/u/learningelastic)\
**Post date:** [October 27, 2022, 3:49pm UTC](https://discuss.elastic.co/t/what-is-apm-latency-threshold-alert/317627/1 "2022-10-27T15:49:44Z")

</div>

I'm trying to learn what the Latency Threshold Alert is as shown in this picture for Kibana 8.4

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/9/3917da787dde56b192eacaf51bc0ecefeecbd271.png)

But the rule above never seems to fire at all, even though my `node-app-1` service averages latency of 10 seconds, which is much greater than the 1.5s threshold specified in my rule, see image below:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/9/49e2fac03d8810ccd9abf11f240133fe6a767930.png)

Have I mis-understood how this rule actually works?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [October 27, 2022, 3:58pm UTC](https://discuss.elastic.co/t/what-is-apm-latency-threshold-alert/317627/2 "2022-10-27T15:58:35Z")

</div>

Hi @learningelastic

What connector did you use?

Where are you sending the alert to?

---

<div class="post-metadata">

**Author:** ![learningelastic](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@learningelastic](https://discuss.elastic.co/u/learningelastic)\
**Post date:** [October 27, 2022, 4:08pm UTC](https://discuss.elastic.co/t/what-is-apm-latency-threshold-alert/317627/3 "2022-10-27T16:08:24Z")

</div>

Right now i'm not using any connector. I'm just looking at this table here to see when the status will go from `Ok` to `Active`

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/1/619726dcb03be9f1dd1b6c55d66c8cbc401d02e8.png)

I have a bash script that will ping the Kibana Rest API to capture any mention of Active alerts, which then sends an SMS to my phone. This works well for metric beat alerts and everything. It also worked fine when I use APM Error Threshold alerts. But that's only because I know how to cause those alerts to go from `Ok` to `Active`.

I jsut dont' know how to make Latency Threshold Alerts go from `Ok` to `Active`.

---

<div class="post-metadata">

**Author:** ![learningelastic](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@learningelastic](https://discuss.elastic.co/u/learningelastic)\
**Post date:** [October 27, 2022, 4:29pm UTC](https://discuss.elastic.co/t/what-is-apm-latency-threshold-alert/317627/4 "2022-10-27T16:29:27Z")

</div>

OK i figured out my answer. My problem was that `TYPE == ENVIRONMENT_ALL` does not work. `TYPE == All` also does not work.

I changed `TYPE == request` as shown in this image, and now I can get the rule to go from `Ok` to `Active`. See this image below:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/9/d9a275e1b0dc80a503331e4cc714a7fc31b2f417.png)

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [October 27, 2022, 4:34pm UTC](https://discuss.elastic.co/t/what-is-apm-latency-threshold-alert/317627/5 "2022-10-27T16:34:37Z")

</div>

Good you got it working...

Perhaps You should writes the alerts to the log connector it is free and then your bash script / query could look at that... just a suggestion...then you have a nice index with the alerts in them

---

<div class="post-metadata">

**Author:** ![learningelastic](https://avatars.discourse-cdn.com/v4/letter/l/958977/32.png) [@learningelastic](https://discuss.elastic.co/u/learningelastic)\
**Post date:** [October 27, 2022, 4:38pm UTC](https://discuss.elastic.co/t/what-is-apm-latency-threshold-alert/317627/6 "2022-10-27T16:38:20Z")

</div>

You're so far ahead of me! haha yes, that's my intention..to learn each of the connectors next. Just learning one bit at a time.

---

<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 24, 2022, 4:38pm UTC](https://discuss.elastic.co/t/what-is-apm-latency-threshold-alert/317627/7 "2022-11-24T16:38:44Z")

</div>

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