CPU usage alert reason is incorrect

I have configured email alerts if CPU usage is above or equals 80% for last 2 minutes. Below is the content configured in my alert:

{{alertName}} - {{context.group}} is in a state of {{context.alertState}}


I am getting email when CPU usage is above 80% but the content is not correct in mail. Below is example email:

Non-Prod Infra Alerts -Hostname is in a state of ALERT
Reason: CPU usage is less than a threshold of 80 (current value is 99.3%)

It should say CPU usage is more than a threshold.

Please suggest.

Hi @dyadav,

could you tell us which version of the Elastic Stack you're seeing this in? I am trying to reproduce it on my end.

It seems to be a known issue, which is tracked in Alert and Actions - context.reason shows wrong text · Issue #88585 · elastic/kibana · GitHub. Thanks for bringing it to our attention again! Since the fix looked trivial I created a PR for it at [Metrics UI] Fix metric threshold alert reason message for gte/lte comparator by weltenwort · Pull Request #114080 · elastic/kibana · GitHub.

This problem only seems to occur for the "less/greater or equal" case. Until the fix is merged and released you could try to work around it by using the "greater than" with a slightly smaller threshold (e.g. 79% instead of 80%).

:information_source: The fix has been merged and should hopefully be released in 7.15.1.

1 Like

Thank you so much Felix for the update. I have configured using the work around for now.

Will wait for it to be released in new version.

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