Details
-
Bug
-
Status: Done
-
Critical
-
Resolution: Fixed
-
None
-
None
-
0.5
-
Yes
-
Yes
-
No
-
Server Features
-
Description
User impact:
Currently some of our embedded alerting templates are broken and never fire an alert. For example: https://github.com/percona/pmm/blob/main/managed/data/iatemplates/mysql_down.yml
Problem affects this kind of queries:
sum by (service_name, node_name) (mysql_up) == 0
== 0 here works like a filter, so if mysql_up returns 1 this query in total will return nothing, but once mysql_up return 0 whole query will return 0. And here is the problem, grafana triggers alert only on non-zero numeric data.
Solutions is dead simple, we need just to add bool after comparison operator.
sum by (service_name, node_name) (mysql_up) == bool 0
Steps to reproduce:
Actual result:
Expected result:
Workaround:
Details:
https://prometheus.io/docs/prometheus/latest/querying/operators/#comparison-binary-operators
Attachments
Issue Links
- blocks
-
PMM-10841 Ship embedded Alerting tempates from Portal to deliver fixed queries
-
- Done
-