Include metric thresholds in rule environment

Not yet tested
This commit is contained in:
2025-05-27 13:02:13 +02:00
parent 0aecea6de2
commit cdfe722457
3 changed files with 14 additions and 3 deletions

View File

@@ -19,7 +19,7 @@
},
{
"name": "load_perc",
"expr": "cpu_load / load_threshold"
"expr": "cpu_load.avg / load_threshold"
}
],
"rule": "cpu_load > load_threshold",

View File

@@ -21,6 +21,6 @@
"expr": "1.0 - (cpu_load / load_threshold)"
}
],
"rule": "cpu_load < load_threshold",
"rule": "cpu_load.avg < load_threshold",
"hint": "This job was detected as lowload because the average cpu load {{.cpu_load}} falls below the threshold {{.load_threshold}}."
}