diff --git a/scripts/dashboards_render_atlas.py b/scripts/dashboards_render_atlas.py index bddddf46c..9133a4d70 100644 --- a/scripts/dashboards_render_atlas.py +++ b/scripts/dashboards_render_atlas.py @@ -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, diff --git a/scripts/tests/test_dashboards_render_atlas.py b/scripts/tests/test_dashboards_render_atlas.py index 88e883242..61791040b 100644 --- a/scripts/tests/test_dashboards_render_atlas.py +++ b/scripts/tests/test_dashboards_render_atlas.py @@ -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"] diff --git a/scripts/tests/test_monitoring_query_capacity.py b/scripts/tests/test_monitoring_query_capacity.py index f5d5da36a..714679910 100644 --- a/scripts/tests/test_monitoring_query_capacity.py +++ b/scripts/tests/test_monitoring_query_capacity.py @@ -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"] diff --git a/services/monitoring/dashboards/atlas-overview.json b/services/monitoring/dashboards/atlas-overview.json index 5c2d406f0..b7d0509b9 100644 --- a/services/monitoring/dashboards/atlas-overview.json +++ b/services/monitoring/dashboards/atlas-overview.json @@ -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, diff --git a/services/monitoring/grafana-dashboard-overview.yaml b/services/monitoring/grafana-dashboard-overview.yaml index 827d412b5..cc7862205 100644 --- a/services/monitoring/grafana-dashboard-overview.yaml +++ b/services/monitoring/grafana-dashboard-overview.yaml @@ -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, diff --git a/services/monitoring/vmalert-atlas-availability.yaml b/services/monitoring/vmalert-atlas-availability.yaml index 901ad1f6c..1bfcc1e49 100644 --- a/services/monitoring/vmalert-atlas-availability.yaml +++ b/services/monitoring/vmalert-atlas-availability.yaml @@ -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