monitoring: scope hecate power queries to hecate-power job
This commit is contained in:
parent
40dce5ee49
commit
c406cba89d
@ -431,13 +431,15 @@ TEST_SUCCESS_RATE = (
|
|||||||
TEST_FAILURES_24H = (
|
TEST_FAILURES_24H = (
|
||||||
f'sum by (result) (max_over_time(ariadne_ci_tests_total{{{TEST_REPO_SELECTOR},result=~"failed|error"}}[24h]))'
|
f'sum by (result) (max_over_time(ariadne_ci_tests_total{{{TEST_REPO_SELECTOR},result=~"failed|error"}}[24h]))'
|
||||||
)
|
)
|
||||||
HECATE_UPS_ON_BATTERY = "sum(hecate_ups_on_battery) or on() vector(0)"
|
HECATE_SELECTOR = 'job="hecate-power"'
|
||||||
HECATE_UPS_LOW_BATTERY = "sum(hecate_ups_low_battery) or on() vector(0)"
|
HECATE_UPS_ON_BATTERY = f"sum(hecate_ups_on_battery{{{HECATE_SELECTOR}}}) or on() vector(0)"
|
||||||
HECATE_UPS_RUNTIME_MIN = "min(hecate_ups_runtime_seconds) or on() vector(0)"
|
HECATE_UPS_LOW_BATTERY = f"sum(hecate_ups_low_battery{{{HECATE_SELECTOR}}}) or on() vector(0)"
|
||||||
|
HECATE_UPS_RUNTIME_MIN = f"min(hecate_ups_runtime_seconds{{{HECATE_SELECTOR}}}) or on() vector(0)"
|
||||||
HECATE_UPS_RUNTIME_HEADROOM_PERCENT = (
|
HECATE_UPS_RUNTIME_HEADROOM_PERCENT = (
|
||||||
"100 * min(hecate_ups_runtime_seconds) / clamp_min(max(hecate_ups_threshold_seconds), 1)"
|
f"100 * min(hecate_ups_runtime_seconds{{{HECATE_SELECTOR}}}) / "
|
||||||
|
f"clamp_min(max(hecate_ups_threshold_seconds{{{HECATE_SELECTOR}}}), 1)"
|
||||||
)
|
)
|
||||||
HECATE_UPS_TRIGGER_COUNT_1D = "increase(hecate_shutdown_triggers_total[1d]) or on() vector(0)"
|
HECATE_UPS_TRIGGER_COUNT_1D = f"increase(hecate_shutdown_triggers_total{{{HECATE_SELECTOR}}}[1d]) or on() vector(0)"
|
||||||
CLIMATE_SENSOR_COUNT = "count(atlas_climate_temperature_celsius) or on() vector(0)"
|
CLIMATE_SENSOR_COUNT = "count(atlas_climate_temperature_celsius) or on() vector(0)"
|
||||||
CLIMATE_TEMP_MAX = "max(atlas_climate_temperature_celsius) or on() vector(0)"
|
CLIMATE_TEMP_MAX = "max(atlas_climate_temperature_celsius) or on() vector(0)"
|
||||||
CLIMATE_HUMIDITY_MAX = "max(atlas_climate_humidity_percent) or on() vector(0)"
|
CLIMATE_HUMIDITY_MAX = "max(atlas_climate_humidity_percent) or on() vector(0)"
|
||||||
|
|||||||
@ -1086,7 +1086,7 @@
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum(hecate_ups_on_battery) or on() vector(0)",
|
"expr": "sum(hecate_ups_on_battery{job=\"hecate-power\"}) or on() vector(0)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"instant": true
|
"instant": true
|
||||||
}
|
}
|
||||||
@ -1158,7 +1158,7 @@
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "min(hecate_ups_runtime_seconds) or on() vector(0)",
|
"expr": "min(hecate_ups_runtime_seconds{job=\"hecate-power\"}) or on() vector(0)",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -1234,7 +1234,7 @@
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "100 * min(hecate_ups_runtime_seconds) / clamp_min(max(hecate_ups_threshold_seconds), 1)",
|
"expr": "100 * min(hecate_ups_runtime_seconds{job=\"hecate-power\"}) / clamp_min(max(hecate_ups_threshold_seconds{job=\"hecate-power\"}), 1)",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum(hecate_ups_on_battery) or on() vector(0)",
|
"expr": "sum(hecate_ups_on_battery{job=\"hecate-power\"}) or on() vector(0)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"instant": true
|
"instant": true
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum(hecate_ups_low_battery) or on() vector(0)",
|
"expr": "sum(hecate_ups_low_battery{job=\"hecate-power\"}) or on() vector(0)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"instant": true
|
"instant": true
|
||||||
}
|
}
|
||||||
@ -150,7 +150,7 @@
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "min(hecate_ups_runtime_seconds) or on() vector(0)",
|
"expr": "min(hecate_ups_runtime_seconds{job=\"hecate-power\"}) or on() vector(0)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"instant": true
|
"instant": true
|
||||||
}
|
}
|
||||||
@ -220,7 +220,7 @@
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "100 * min(hecate_ups_runtime_seconds) / clamp_min(max(hecate_ups_threshold_seconds), 1)",
|
"expr": "100 * min(hecate_ups_runtime_seconds{job=\"hecate-power\"}) / clamp_min(max(hecate_ups_threshold_seconds{job=\"hecate-power\"}), 1)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"instant": true
|
"instant": true
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1095,7 +1095,7 @@ data:
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum(hecate_ups_on_battery) or on() vector(0)",
|
"expr": "sum(hecate_ups_on_battery{job=\"hecate-power\"}) or on() vector(0)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"instant": true
|
"instant": true
|
||||||
}
|
}
|
||||||
@ -1167,7 +1167,7 @@ data:
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "min(hecate_ups_runtime_seconds) or on() vector(0)",
|
"expr": "min(hecate_ups_runtime_seconds{job=\"hecate-power\"}) or on() vector(0)",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -1243,7 +1243,7 @@ data:
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "100 * min(hecate_ups_runtime_seconds) / clamp_min(max(hecate_ups_threshold_seconds), 1)",
|
"expr": "100 * min(hecate_ups_runtime_seconds{job=\"hecate-power\"}) / clamp_min(max(hecate_ups_threshold_seconds{job=\"hecate-power\"}), 1)",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -29,7 +29,7 @@ data:
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum(hecate_ups_on_battery) or on() vector(0)",
|
"expr": "sum(hecate_ups_on_battery{job=\"hecate-power\"}) or on() vector(0)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"instant": true
|
"instant": true
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ data:
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum(hecate_ups_low_battery) or on() vector(0)",
|
"expr": "sum(hecate_ups_low_battery{job=\"hecate-power\"}) or on() vector(0)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"instant": true
|
"instant": true
|
||||||
}
|
}
|
||||||
@ -159,7 +159,7 @@ data:
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "min(hecate_ups_runtime_seconds) or on() vector(0)",
|
"expr": "min(hecate_ups_runtime_seconds{job=\"hecate-power\"}) or on() vector(0)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"instant": true
|
"instant": true
|
||||||
}
|
}
|
||||||
@ -229,7 +229,7 @@ data:
|
|||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "100 * min(hecate_ups_runtime_seconds) / clamp_min(max(hecate_ups_threshold_seconds), 1)",
|
"expr": "100 * min(hecate_ups_runtime_seconds{job=\"hecate-power\"}) / clamp_min(max(hecate_ups_threshold_seconds{job=\"hecate-power\"}), 1)",
|
||||||
"refId": "A",
|
"refId": "A",
|
||||||
"instant": true
|
"instant": true
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user