# Kapacitor's Alert Issue

**URL:** <https://community.influxdata.com/t/kapacitors-alert-issue/5496>\
**Category:** Store\
**Tags:** kapacitor\
**Created:** [June 12, 2018, 8:30am UTC](https://community.influxdata.com/t/kapacitors-alert-issue/5496 "2018-06-12T08:30:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sghosh](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@sghosh](https://community.influxdata.com/u/sghosh)\
**Post date:** [June 12, 2018, 8:30am UTC](https://community.influxdata.com/t/kapacitors-alert-issue/5496/1 "2018-06-12T08:30:52Z")

</div>

dbrp “ABC”.“autogen”

var data = stream  
|from()  
.database(“ABC”)  
.retentionPolicy(“autogen”)  
.measurement(memoryUtil)  
.groupBy(host)  
|window()  
.period(1m)  
.every(1m)  
.align()  
|median(‘available\_percent’)  
.as(‘value’)

data  
|alert()  
.warn(lambda: “value” \< warn)  
.crit(lambda: “value” \< crit)  
.stateChangesOnly()  
.message(message)  
.topic(topic)

Let assume at a particular time My data is:

name: memoryUtil  
tags: host=ip-111-111-17-208  
time median

* * *

1528787490000000000 34.31948838933012

name: memoryUtil  
tags: host=ip-111-111-53-24  
time median

* * *

1528787510000000000 19.15578168915138

name: memoryUtil  
tags: host=ip-111-111-84-49  
time median

* * *

1528787530000000000 14.391669240940798

Question: When I set my critical to less that 30%, I am getting only one alert instead of two. How to get alerts for both the hosts.  
e.g. .crit(lambda: “value” \< 30)

---

<div class="post-metadata">

**Author:** ![philb](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/philb/32/1805_2.png) [@philb](https://community.influxdata.com/u/philb)\
**Post date:** [June 12, 2018, 2:16pm UTC](https://community.influxdata.com/t/kapacitors-alert-issue/5496/2 "2018-06-12T14:16:54Z")

</div>

Because one of them is 34%, which is greater than 30%. If the samples you provided are real

1528787490000000000 _34.31948838933012_

name: memoryUtil  
tags: host=ip-111-111-53-24  
time median

1528787510000000000 19.15578168915138

name: memoryUtil  
tags: host=ip-111-111-84-49  
time median

So only one will alert. What was the threshold before?

---

<div class="post-metadata">

**Author:** ![sghosh](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@sghosh](https://community.influxdata.com/u/sghosh)\
**Post date:** [June 13, 2018, 6:58am UTC](https://community.influxdata.com/t/kapacitors-alert-issue/5496/3 "2018-06-13T06:58:23Z")

</div>

@philb

I set my critical alert to less that 30 e.g. crit(lambda: “value” \< 30). So two machines ip-111-111-53-24 and ip-111-111-84-49 should be generating critical alerts but I get only one.

---

<div class="post-metadata">

**Author:** ![philb](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/philb/32/1805_2.png) [@philb](https://community.influxdata.com/u/philb)\
**Post date:** [June 13, 2018, 8:45am UTC](https://community.influxdata.com/t/kapacitors-alert-issue/5496/4 "2018-06-13T08:45:58Z")

</div>

Sorry i misread your first post.

Have the machines gone into the OK state since generating the first alert? You could try removing the stateChangesOnly and increasing the threshold so they recover - then change the thresholds back.
