diff --git a/scripts/dashboards_render_atlas.py b/scripts/dashboards_render_atlas.py index bf448b69..1383a406 100644 --- a/scripts/dashboards_render_atlas.py +++ b/scripts/dashboards_render_atlas.py @@ -1822,7 +1822,27 @@ def build_overview(): {"color": dark_blue, "value": 100}, ], } - ups_text = {"titleSize": 14, "valueSize": 30} + compact_current_text = {"titleSize": 11, "valueSize": 20} + perfect_count_thresholds = { + "mode": "absolute", + "steps": [ + {"color": dark_red, "value": None}, + {"color": dark_yellow, "value": max(len(PLATFORM_TEST_SUITE_NAMES) - 2, 1)}, + {"color": dark_green, "value": len(PLATFORM_TEST_SUITE_NAMES) - 1}, + {"color": dark_blue, "value": len(PLATFORM_TEST_SUITE_NAMES)}, + ], + } + failure_count_thresholds = { + "mode": "absolute", + "steps": [ + {"color": dark_blue, "value": None}, + {"color": dark_yellow, "value": 1}, + {"color": dark_orange, "value": 3}, + {"color": dark_red, "value": 5}, + ], + } + overview_avg_coverage = f"(avg(({QUALITY_GATE_COVERAGE_BY_SUITE})) or on() vector(0))" + overview_loc_clean_suites = f"(sum(({QUALITY_GATE_SMELL_INFRACTIONS_BY_SUITE}) == bool 0) or on() vector(0))" for panel_id, title, draw_expr, runtime_expr, y_pos in [ (40, "Pyrphoros UPS Current", ANANKE_UPS_DRAW_WATTS_DB, ANANKE_UPS_RUNTIME_DB, 7), (144, "Statera UPS Current", ANANKE_UPS_DRAW_WATTS_TETHYS, ANANKE_UPS_RUNTIME_TETHYS, 10), @@ -1831,7 +1851,7 @@ def build_overview(): panel_id, title, None, - {"h": 3, "w": 6, "x": 0, "y": y_pos}, + {"h": 3, "w": 3, "x": 0, "y": y_pos}, unit="none", text_mode="name_and_value", targets=[ @@ -1848,7 +1868,7 @@ def build_overview(): ], links=overview_link("atlas-power"), ) - panel["options"]["text"] = ups_text + panel["options"]["text"] = compact_current_text panels.append(panel) panels.append( @@ -1857,7 +1877,7 @@ def build_overview(): 41, "UPS History (Power Draw)", None, - {"h": 6, "w": 6, "x": 6, "y": 7}, + {"h": 6, "w": 6, "x": 3, "y": 7}, unit="watt", targets=[ {"refId": "A", "expr": ANANKE_UPS_DRAW_WATTS_DB_SERIES, "legendFormat": ANANKE_UPS_DB_NAME}, @@ -1877,7 +1897,7 @@ def build_overview(): 42, "Current Enclosure Temperature", None, - {"h": 3, "w": 6, "x": 0, "y": 13}, + {"h": 3, "w": 3, "x": 0, "y": 13}, unit="none", text_mode="name_and_value", targets=[ @@ -1899,13 +1919,13 @@ def build_overview(): ], links=overview_link("atlas-power"), ) - temp_panel["options"]["text"] = ups_text + temp_panel["options"]["text"] = compact_current_text panels.append(temp_panel) climate_panel = stat_panel( 143, "Current Enclosure Climate", None, - {"h": 3, "w": 6, "x": 0, "y": 16}, + {"h": 3, "w": 3, "x": 0, "y": 16}, unit="none", text_mode="name_and_value", targets=[ @@ -1927,14 +1947,14 @@ def build_overview(): ], links=overview_link("atlas-power"), ) - climate_panel["options"]["text"] = ups_text + climate_panel["options"]["text"] = compact_current_text panels.append(climate_panel) panels.append( timeseries_panel( 43, "Enclosure Climate History", None, - {"h": 6, "w": 6, "x": 6, "y": 13}, + {"h": 6, "w": 6, "x": 3, "y": 13}, unit="none", targets=[ {"refId": "A", "expr": climate_temp_series, "legendFormat": "C"}, @@ -2034,7 +2054,7 @@ def build_overview(): 141, "Fan History (0-10)", None, - {"h": 6, "w": 6, "x": 12, "y": 13}, + {"h": 6, "w": 6, "x": 9, "y": 13}, unit="none", max_value=10, targets=[ @@ -2052,7 +2072,7 @@ def build_overview(): 140, "Flux Source", None, - {"h": 2, "w": 6, "x": 18, "y": 13}, + {"h": 2, "w": 3, "x": 21, "y": 7}, unit="none", text_mode="name", thresholds={ @@ -2074,8 +2094,29 @@ def build_overview(): description="Flux GitRepository branch reported by Ananke. Revision and object detail live in Atlas GitOps.", ) flux_source["options"]["graphMode"] = "none" - flux_source["options"]["text"] = {"titleSize": 13, "valueSize": 18} + flux_source["options"]["text"] = {"titleSize": 10, "valueSize": 14} panels.append(flux_source) + for panel_id, title, expr, y_pos, unit, decimals, thresholds, links in [ + (151, "Run Reliability (24h)", TEST_SUCCESS_RATE_24H, 9, "percent", 1, test_success_thresholds, "atlas-testing"), + (152, "Failed Runs (24h)", TEST_FAILURES_24H_TOTAL, 11, "none", 0, failure_count_thresholds, "atlas-testing"), + (153, "Fresh Suites (24h)", PLATFORM_TEST_ACTIVE_SUITES_24H, 13, "none", 0, perfect_count_thresholds, "atlas-testing"), + (154, "Avg Coverage", overview_avg_coverage, 15, "percent", 1, test_success_thresholds, "atlas-testing"), + (155, "LOC Clean Suites", overview_loc_clean_suites, 17, "none", 0, perfect_count_thresholds, "atlas-testing"), + ]: + rail_panel = stat_panel( + panel_id, + title, + expr, + {"h": 2, "w": 3, "x": 21, "y": y_pos}, + unit=unit, + decimals=decimals, + instant=True, + thresholds=thresholds, + links=overview_link(links), + ) + rail_panel["options"]["graphMode"] = "none" + rail_panel["options"]["text"] = {"titleSize": 10, "valueSize": 19} + panels.append(rail_panel) panels.append( bargauge_panel( 150, @@ -2086,7 +2127,7 @@ def build_overview(): f'or label_replace({GITOPS_KUSTOMIZATION_NOT_SUSPENDED_PCT}, "signal", "Kustomizations Not Suspended", "__name__", ".*") ' f'or label_replace({GITOPS_HELM_NOT_SUSPENDED_PCT}, "signal", "HelmReleases Not Suspended", "__name__", ".*")' ), - {"h": 4, "w": 6, "x": 18, "y": 15}, + {"h": 6, "w": 6, "x": 15, "y": 13}, unit="percent", instant=True, legend="{{signal}}", @@ -2118,7 +2159,7 @@ def build_overview(): 45, "Ariadne Run Volume", None, - {"h": 6, "w": 6, "x": 12, "y": 7}, + {"h": 6, "w": 6, "x": 9, "y": 7}, unit="none", targets=[ {"expr": f"{ARIADNE_TASK_ATTEMPTS_SERIES} or on() vector(0)", "refId": "A", "legendFormat": "Attempts"}, @@ -2137,7 +2178,7 @@ def build_overview(): 46, "Gate Checks Passing by Suite", PLATFORM_TEST_CURRENT_GATE_HEALTH_BY_SUITE, - {"h": 6, "w": 6, "x": 18, "y": 7}, + {"h": 6, "w": 6, "x": 15, "y": 7}, unit="percent", instant=True, legend="{{suite}}", diff --git a/scripts/tests/test_dashboards_render_atlas.py b/scripts/tests/test_dashboards_render_atlas.py index f472e661..d99585fe 100644 --- a/scripts/tests/test_dashboards_render_atlas.py +++ b/scripts/tests/test_dashboards_render_atlas.py @@ -74,13 +74,22 @@ def test_overview_uses_readable_quality_power_and_gitops_panels(): assert "Platform Test Success Rate" not in panels_by_title assert panels_by_title["Gate Checks Passing by Suite"]["type"] == "bargauge" assert panels_by_title["Gate Checks Passing by Suite"]["options"]["displayMode"] == "basic" + assert panels_by_title["Gate Checks Passing by Suite"]["gridPos"] == {"h": 6, "w": 6, "x": 15, "y": 7} + assert panels_by_title["UPS History (Power Draw)"]["gridPos"] == {"h": 6, "w": 6, "x": 3, "y": 7} + assert panels_by_title["Ariadne Run Volume"]["gridPos"] == {"h": 6, "w": 6, "x": 9, "y": 7} + assert panels_by_title["Pyrphoros UPS Current"]["gridPos"]["w"] == 3 + assert panels_by_title["Current Enclosure Climate"]["gridPos"]["w"] == 3 assert panels_by_title["UPS History (Power Draw)"]["fieldConfig"]["defaults"]["custom"]["drawStyle"] == "bars" assert panels_by_title["Ariadne Run Volume"]["fieldConfig"]["defaults"]["custom"]["drawStyle"] == "bars" assert panels_by_title["Flux Source"]["type"] == "stat" + assert panels_by_title["Flux Source"]["gridPos"] == {"h": 2, "w": 3, "x": 21, "y": 7} assert panels_by_title["Flux Source"]["targets"][0]["legendFormat"] == "{{branch}}" + assert panels_by_title["Run Reliability (24h)"]["gridPos"] == {"h": 2, "w": 3, "x": 21, "y": 9} + assert panels_by_title["Fresh Suites (24h)"]["gridPos"] == {"h": 2, "w": 3, "x": 21, "y": 13} + assert panels_by_title["LOC Clean Suites"]["gridPos"] == {"h": 2, "w": 3, "x": 21, "y": 17} assert panels_by_title["GitOps Health"]["type"] == "bargauge" - assert panels_by_title["GitOps Health"]["gridPos"]["h"] == 4 + assert panels_by_title["GitOps Health"]["gridPos"] == {"h": 6, "w": 6, "x": 15, "y": 13} gitops_expr = panels_by_title["GitOps Health"]["targets"][0]["expr"] assert "Kustomizations Not Suspended" in gitops_expr assert "HelmReleases Not Suspended" in gitops_expr diff --git a/services/monitoring/dashboards/atlas-overview.json b/services/monitoring/dashboards/atlas-overview.json index acdd08d7..9b598c14 100644 --- a/services/monitoring/dashboards/atlas-overview.json +++ b/services/monitoring/dashboards/atlas-overview.json @@ -1082,7 +1082,7 @@ }, "gridPos": { "h": 3, - "w": 6, + "w": 3, "x": 0, "y": 7 }, @@ -1158,8 +1158,8 @@ }, "textMode": "name_and_value", "text": { - "titleSize": 14, - "valueSize": 30 + "titleSize": 11, + "valueSize": 20 } }, "links": [ @@ -1180,7 +1180,7 @@ }, "gridPos": { "h": 3, - "w": 6, + "w": 3, "x": 0, "y": 10 }, @@ -1256,8 +1256,8 @@ }, "textMode": "name_and_value", "text": { - "titleSize": 14, - "valueSize": 30 + "titleSize": 11, + "valueSize": 20 } }, "links": [ @@ -1279,7 +1279,7 @@ "gridPos": { "h": 6, "w": 6, - "x": 6, + "x": 3, "y": 7 }, "targets": [ @@ -1367,7 +1367,7 @@ }, "gridPos": { "h": 3, - "w": 6, + "w": 3, "x": 0, "y": 13 }, @@ -1443,8 +1443,8 @@ }, "textMode": "name_and_value", "text": { - "titleSize": 14, - "valueSize": 30 + "titleSize": 11, + "valueSize": 20 } }, "links": [ @@ -1465,7 +1465,7 @@ }, "gridPos": { "h": 3, - "w": 6, + "w": 3, "x": 0, "y": 16 }, @@ -1541,8 +1541,8 @@ }, "textMode": "name_and_value", "text": { - "titleSize": 14, - "valueSize": 30 + "titleSize": 11, + "valueSize": 20 } }, "links": [ @@ -1564,7 +1564,7 @@ "gridPos": { "h": 6, "w": 6, - "x": 6, + "x": 3, "y": 13 }, "targets": [ @@ -1871,7 +1871,7 @@ "gridPos": { "h": 6, "w": 6, - "x": 12, + "x": 9, "y": 13 }, "targets": [ @@ -1930,9 +1930,9 @@ }, "gridPos": { "h": 2, - "w": 6, - "x": 18, - "y": 13 + "w": 3, + "x": 21, + "y": 7 }, "targets": [ { @@ -1981,8 +1981,8 @@ }, "textMode": "name", "text": { - "titleSize": 13, - "valueSize": 18 + "titleSize": 10, + "valueSize": 14 } }, "links": [ @@ -1994,6 +1994,419 @@ ], "description": "Flux GitRepository branch reported by Ananke. Revision and object detail live in Atlas GitOps." }, + { + "id": 151, + "type": "stat", + "title": "Run Reliability (24h)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 21, + "y": 9 + }, + "targets": [ + { + "expr": "100 * ((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|pegasus|pegasus-health|pegasus_health|soteria|titan_iac|titan-iac|bstein_home|bstein-home|data_prepper|data-prepper\",status=~\"ok|passed|success\",exported_job=\"platform-quality-ci\"}[24h])) or on() vector(0))) / clamp_min(((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|pegasus|pegasus-health|pegasus_health|soteria|titan_iac|titan-iac|bstein_home|bstein-home|data_prepper|data-prepper\",exported_job=\"platform-quality-ci\"}[24h])) or on() vector(0))), 1)", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-orange", + "value": 70 + }, + { + "color": "dark-yellow", + "value": 85 + }, + { + "color": "dark-green", + "value": 95 + }, + { + "color": "dark-blue", + "value": 100 + } + ] + }, + "unit": "percent", + "custom": { + "displayMode": "auto" + }, + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value", + "text": { + "titleSize": 10, + "valueSize": 19 + } + }, + "links": [ + { + "title": "Open atlas-testing dashboard", + "url": "/d/atlas-testing", + "targetBlank": true + } + ] + }, + { + "id": 152, + "type": "stat", + "title": "Failed Runs (24h)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 21, + "y": 11 + }, + "targets": [ + { + "expr": "(sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|pegasus|pegasus-health|pegasus_health|soteria|titan_iac|titan-iac|bstein_home|bstein-home|data_prepper|data-prepper\",status!~\"ok|passed|success\",exported_job=\"platform-quality-ci\"}[24h])) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-blue", + "value": null + }, + { + "color": "dark-yellow", + "value": 1 + }, + { + "color": "dark-orange", + "value": 3 + }, + { + "color": "dark-red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value", + "text": { + "titleSize": 10, + "valueSize": 19 + } + }, + "links": [ + { + "title": "Open atlas-testing dashboard", + "url": "/d/atlas-testing", + "targetBlank": true + } + ] + }, + { + "id": 153, + "type": "stat", + "title": "Fresh Suites (24h)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 21, + "y": 13 + }, + "targets": [ + { + "expr": "sum((sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|pegasus|pegasus-health|pegasus_health|soteria|titan_iac|titan-iac|bstein_home|bstein-home|data_prepper|data-prepper\",exported_job=\"platform-quality-ci\"}[24h])) > 0)) or on() vector(0)", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-yellow", + "value": 7 + }, + { + "color": "dark-green", + "value": 8 + }, + { + "color": "dark-blue", + "value": 9 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value", + "text": { + "titleSize": 10, + "valueSize": 19 + } + }, + "links": [ + { + "title": "Open atlas-testing dashboard", + "url": "/d/atlas-testing", + "targetBlank": true + } + ] + }, + { + "id": 154, + "type": "stat", + "title": "Avg Coverage", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 21, + "y": 15 + }, + "targets": [ + { + "expr": "(avg(((max by (suite) ({__name__=~\".*_quality_gate_coverage_percent\",exported_job=\"platform-quality-ci\"})) or on(suite) (max by (suite) (platform_quality_gate_workspace_line_coverage_percent{exported_job=\"platform-quality-ci\"})))) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-orange", + "value": 70 + }, + { + "color": "dark-yellow", + "value": 85 + }, + { + "color": "dark-green", + "value": 95 + }, + { + "color": "dark-blue", + "value": 100 + } + ] + }, + "unit": "percent", + "custom": { + "displayMode": "auto" + }, + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value", + "text": { + "titleSize": 10, + "valueSize": 19 + } + }, + "links": [ + { + "title": "Open atlas-testing dashboard", + "url": "/d/atlas-testing", + "targetBlank": true + } + ] + }, + { + "id": 155, + "type": "stat", + "title": "LOC Clean Suites", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 21, + "y": 17 + }, + "targets": [ + { + "expr": "(sum((max by (suite) (platform_quality_gate_source_lines_over_500_total{exported_job=\"platform-quality-ci\"})) == bool 0) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-yellow", + "value": 7 + }, + { + "color": "dark-green", + "value": 8 + }, + { + "color": "dark-blue", + "value": 9 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value", + "text": { + "titleSize": 10, + "valueSize": 19 + } + }, + "links": [ + { + "title": "Open atlas-testing dashboard", + "url": "/d/atlas-testing", + "targetBlank": true + } + ] + }, { "id": 150, "type": "bargauge", @@ -2003,10 +2416,10 @@ "uid": "atlas-vm" }, "gridPos": { - "h": 4, + "h": 6, "w": 6, - "x": 18, - "y": 15 + "x": 15, + "y": 13 }, "targets": [ { @@ -2183,7 +2596,7 @@ "gridPos": { "h": 6, "w": 6, - "x": 12, + "x": 9, "y": 7 }, "targets": [ @@ -2272,7 +2685,7 @@ "gridPos": { "h": 6, "w": 6, - "x": 18, + "x": 15, "y": 7 }, "targets": [ diff --git a/services/monitoring/grafana-dashboard-overview.yaml b/services/monitoring/grafana-dashboard-overview.yaml index d4be32f5..a8b4eb51 100644 --- a/services/monitoring/grafana-dashboard-overview.yaml +++ b/services/monitoring/grafana-dashboard-overview.yaml @@ -1091,7 +1091,7 @@ data: }, "gridPos": { "h": 3, - "w": 6, + "w": 3, "x": 0, "y": 7 }, @@ -1167,8 +1167,8 @@ data: }, "textMode": "name_and_value", "text": { - "titleSize": 14, - "valueSize": 30 + "titleSize": 11, + "valueSize": 20 } }, "links": [ @@ -1189,7 +1189,7 @@ data: }, "gridPos": { "h": 3, - "w": 6, + "w": 3, "x": 0, "y": 10 }, @@ -1265,8 +1265,8 @@ data: }, "textMode": "name_and_value", "text": { - "titleSize": 14, - "valueSize": 30 + "titleSize": 11, + "valueSize": 20 } }, "links": [ @@ -1288,7 +1288,7 @@ data: "gridPos": { "h": 6, "w": 6, - "x": 6, + "x": 3, "y": 7 }, "targets": [ @@ -1376,7 +1376,7 @@ data: }, "gridPos": { "h": 3, - "w": 6, + "w": 3, "x": 0, "y": 13 }, @@ -1452,8 +1452,8 @@ data: }, "textMode": "name_and_value", "text": { - "titleSize": 14, - "valueSize": 30 + "titleSize": 11, + "valueSize": 20 } }, "links": [ @@ -1474,7 +1474,7 @@ data: }, "gridPos": { "h": 3, - "w": 6, + "w": 3, "x": 0, "y": 16 }, @@ -1550,8 +1550,8 @@ data: }, "textMode": "name_and_value", "text": { - "titleSize": 14, - "valueSize": 30 + "titleSize": 11, + "valueSize": 20 } }, "links": [ @@ -1573,7 +1573,7 @@ data: "gridPos": { "h": 6, "w": 6, - "x": 6, + "x": 3, "y": 13 }, "targets": [ @@ -1880,7 +1880,7 @@ data: "gridPos": { "h": 6, "w": 6, - "x": 12, + "x": 9, "y": 13 }, "targets": [ @@ -1939,9 +1939,9 @@ data: }, "gridPos": { "h": 2, - "w": 6, - "x": 18, - "y": 13 + "w": 3, + "x": 21, + "y": 7 }, "targets": [ { @@ -1990,8 +1990,8 @@ data: }, "textMode": "name", "text": { - "titleSize": 13, - "valueSize": 18 + "titleSize": 10, + "valueSize": 14 } }, "links": [ @@ -2003,6 +2003,419 @@ data: ], "description": "Flux GitRepository branch reported by Ananke. Revision and object detail live in Atlas GitOps." }, + { + "id": 151, + "type": "stat", + "title": "Run Reliability (24h)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 21, + "y": 9 + }, + "targets": [ + { + "expr": "100 * ((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|pegasus|pegasus-health|pegasus_health|soteria|titan_iac|titan-iac|bstein_home|bstein-home|data_prepper|data-prepper\",status=~\"ok|passed|success\",exported_job=\"platform-quality-ci\"}[24h])) or on() vector(0))) / clamp_min(((sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|pegasus|pegasus-health|pegasus_health|soteria|titan_iac|titan-iac|bstein_home|bstein-home|data_prepper|data-prepper\",exported_job=\"platform-quality-ci\"}[24h])) or on() vector(0))), 1)", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-orange", + "value": 70 + }, + { + "color": "dark-yellow", + "value": 85 + }, + { + "color": "dark-green", + "value": 95 + }, + { + "color": "dark-blue", + "value": 100 + } + ] + }, + "unit": "percent", + "custom": { + "displayMode": "auto" + }, + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value", + "text": { + "titleSize": 10, + "valueSize": 19 + } + }, + "links": [ + { + "title": "Open atlas-testing dashboard", + "url": "/d/atlas-testing", + "targetBlank": true + } + ] + }, + { + "id": 152, + "type": "stat", + "title": "Failed Runs (24h)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 21, + "y": 11 + }, + "targets": [ + { + "expr": "(sum(increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|pegasus|pegasus-health|pegasus_health|soteria|titan_iac|titan-iac|bstein_home|bstein-home|data_prepper|data-prepper\",status!~\"ok|passed|success\",exported_job=\"platform-quality-ci\"}[24h])) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-blue", + "value": null + }, + { + "color": "dark-yellow", + "value": 1 + }, + { + "color": "dark-orange", + "value": 3 + }, + { + "color": "dark-red", + "value": 5 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value", + "text": { + "titleSize": 10, + "valueSize": 19 + } + }, + "links": [ + { + "title": "Open atlas-testing dashboard", + "url": "/d/atlas-testing", + "targetBlank": true + } + ] + }, + { + "id": 153, + "type": "stat", + "title": "Fresh Suites (24h)", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 21, + "y": 13 + }, + "targets": [ + { + "expr": "sum((sum by (suite) (increase(platform_quality_gate_runs_total{suite=~\"ariadne|metis|ananke|atlasbot|pegasus|pegasus-health|pegasus_health|soteria|titan_iac|titan-iac|bstein_home|bstein-home|data_prepper|data-prepper\",exported_job=\"platform-quality-ci\"}[24h])) > 0)) or on() vector(0)", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-yellow", + "value": 7 + }, + { + "color": "dark-green", + "value": 8 + }, + { + "color": "dark-blue", + "value": 9 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value", + "text": { + "titleSize": 10, + "valueSize": 19 + } + }, + "links": [ + { + "title": "Open atlas-testing dashboard", + "url": "/d/atlas-testing", + "targetBlank": true + } + ] + }, + { + "id": 154, + "type": "stat", + "title": "Avg Coverage", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 21, + "y": 15 + }, + "targets": [ + { + "expr": "(avg(((max by (suite) ({__name__=~\".*_quality_gate_coverage_percent\",exported_job=\"platform-quality-ci\"})) or on(suite) (max by (suite) (platform_quality_gate_workspace_line_coverage_percent{exported_job=\"platform-quality-ci\"})))) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-orange", + "value": 70 + }, + { + "color": "dark-yellow", + "value": 85 + }, + { + "color": "dark-green", + "value": 95 + }, + { + "color": "dark-blue", + "value": 100 + } + ] + }, + "unit": "percent", + "custom": { + "displayMode": "auto" + }, + "decimals": 1 + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value", + "text": { + "titleSize": 10, + "valueSize": 19 + } + }, + "links": [ + { + "title": "Open atlas-testing dashboard", + "url": "/d/atlas-testing", + "targetBlank": true + } + ] + }, + { + "id": 155, + "type": "stat", + "title": "LOC Clean Suites", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 2, + "w": 3, + "x": 21, + "y": 17 + }, + "targets": [ + { + "expr": "(sum((max by (suite) (platform_quality_gate_source_lines_over_500_total{exported_job=\"platform-quality-ci\"})) == bool 0) or on() vector(0))", + "refId": "A", + "instant": true + } + ], + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "dark-red", + "value": null + }, + { + "color": "dark-yellow", + "value": 7 + }, + { + "color": "dark-green", + "value": 8 + }, + { + "color": "dark-blue", + "value": 9 + } + ] + }, + "unit": "none", + "custom": { + "displayMode": "auto" + }, + "decimals": 0 + }, + "overrides": [] + }, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "center", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value", + "text": { + "titleSize": 10, + "valueSize": 19 + } + }, + "links": [ + { + "title": "Open atlas-testing dashboard", + "url": "/d/atlas-testing", + "targetBlank": true + } + ] + }, { "id": 150, "type": "bargauge", @@ -2012,10 +2425,10 @@ data: "uid": "atlas-vm" }, "gridPos": { - "h": 4, + "h": 6, "w": 6, - "x": 18, - "y": 15 + "x": 15, + "y": 13 }, "targets": [ { @@ -2192,7 +2605,7 @@ data: "gridPos": { "h": 6, "w": 6, - "x": 12, + "x": 9, "y": 7 }, "targets": [ @@ -2281,7 +2694,7 @@ data: "gridPos": { "h": 6, "w": 6, - "x": 18, + "x": 15, "y": 7 }, "targets": [