Skip to content
Snippets Groups Projects
Commit 0896c024 authored by ale's avatar ale
Browse files

Fix the host_reachable metric

Without the 'bool' operator qualifier, it would only generate
values for reachable hosts, invalidating the alert logic.
parent 1e460b94
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,7 @@ groups: ...@@ -27,6 +27,7 @@ groups:
# Special metric for the ping probe. The label_replace() sets # Special metric for the ping probe. The label_replace() sets
# the host to the value of the target label (instead of the host # 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 - 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", "(.*)")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment