diff --git a/roles/prometheus/templates/rules/rules_base.conf.yml b/roles/prometheus/templates/rules/rules_base.conf.yml index 7f08c3b7e6883af7d2f686103c794096475c5d99..cd3b4ab3f25fcd141824cc4c7076bf1935222293 100644 --- a/roles/prometheus/templates/rules/rules_base.conf.yml +++ b/roles/prometheus/templates/rules/rules_base.conf.yml @@ -27,6 +27,7 @@ groups: # Special metric for the ping probe. The label_replace() sets # the host to the value of the target label (instead of the host - # running the prober). + # running the prober). The 'bool' qualifier makes the greater-than + # operation not act as a filter. - record: host_reachable - expr: label_replace(target:probe_success:ratio{probe="ping"} > 0.6, "host", "$1", "target", "(.*)") + expr: label_replace(target:probe_success:ratio{probe="ping"} > bool 0.6, "host", "$1", "target", "(.*)")