monitoring: preserve serving availability history

This commit is contained in:
jenkins 2026-08-04 18:39:36 -03:00
parent d3ddd246d3
commit 302fe78681
6 changed files with 13 additions and 7 deletions

View File

@ -2143,7 +2143,7 @@ def build_overview():
"decimals": 4,
"text_mode": "value",
"instant": True,
"description": "Availability over observed samples, up to 365 days: at least two control-plane nodes Ready and at least one Traefik replica serving. Partial replica capacity remains available; monitoring gaps are excluded. Grafana keeps the last successful rollup for up to 24h and falls back to the live binary serving state if no rollup is available.",
"description": "Availability over observed samples, up to 365 days: at least two control-plane nodes Ready and at least one Traefik replica serving. Historical partial-capacity samples remain available when ingress kept serving; monitoring gaps are excluded. Grafana keeps the last successful rollup for up to 24h and falls back to the live binary serving state if no rollup is available.",
},
{
"id": 4,

View File

@ -68,7 +68,7 @@ def test_overview_availability_panel_uses_recorded_365d_rollup():
assert "[1h:5m]" in availability_expr
assert panel["targets"][0]["instant"] is True
assert "at least one Traefik replica serving" in panel["description"]
assert "Partial replica capacity remains available" in panel["description"]
assert "partial-capacity samples remain available" in panel["description"]
assert "monitoring gaps are excluded" in panel["description"]
assert "falls back to the live binary serving state" in panel["description"]

View File

@ -58,6 +58,9 @@ def test_yearly_availability_reuses_the_hourly_rollup() -> None:
assert "atlas:availability:ratio_1h" in yearly["expr"]
assert 'definition="serving-v2"' in yearly["expr"]
assert 'definition=""' in yearly["expr"]
assert "share_gt_over_time" in yearly["expr"]
assert "[365d:15m]" in yearly["expr"]
assert "kube_node_status_condition" not in yearly["expr"]
assert "[365d:1h]" not in yearly["expr"]

View File

@ -286,7 +286,7 @@
},
"textMode": "value"
},
"description": "Availability over observed samples, up to 365 days: at least two control-plane nodes Ready and at least one Traefik replica serving. Partial replica capacity remains available; monitoring gaps are excluded. Grafana keeps the last successful rollup for up to 24h and falls back to the live binary serving state if no rollup is available."
"description": "Availability over observed samples, up to 365 days: at least two control-plane nodes Ready and at least one Traefik replica serving. Historical partial-capacity samples remain available when ingress kept serving; monitoring gaps are excluded. Grafana keeps the last successful rollup for up to 24h and falls back to the live binary serving state if no rollup is available."
},
{
"id": 4,

View File

@ -295,7 +295,7 @@ data:
},
"textMode": "value"
},
"description": "Availability over observed samples, up to 365 days: at least two control-plane nodes Ready and at least one Traefik replica serving. Partial replica capacity remains available; monitoring gaps are excluded. Grafana keeps the last successful rollup for up to 24h and falls back to the live binary serving state if no rollup is available."
"description": "Availability over observed samples, up to 365 days: at least two control-plane nodes Ready and at least one Traefik replica serving. Historical partial-capacity samples remain available when ingress kept serving; monitoring gaps are excluded. Grafana keeps the last successful rollup for up to 24h and falls back to the live binary serving state if no rollup is available."
},
{
"id": 4,

View File

@ -31,9 +31,12 @@ data:
rollup: hourly
- record: atlas:availability:ratio_365d
expr: |
avg_over_time(
atlas:availability:ratio_1h{scope="atlas",definition="serving-v2"}[365d]
)
share_gt_over_time((
max by (scope, rollup) (
atlas:availability:ratio_1h{scope="atlas",definition="serving-v2"}
or atlas:availability:ratio_1h{scope="atlas",definition=""}
)
)[365d:15m], 0)
labels:
definition: serving-v2
scope: atlas