diff --git a/grafana/dashboards/watchdog_metrics_dashboard.json b/grafana/dashboards/watchdog_metrics_dashboard.json index 9929e794..f0191ebe 100644 --- a/grafana/dashboards/watchdog_metrics_dashboard.json +++ b/grafana/dashboards/watchdog_metrics_dashboard.json @@ -171,7 +171,35 @@ "datasource": { "name": "Prometheus" }, - "description": "Metrics: gtfs_bundle_days_until_earliest_expiration, gtfs_bundle_days_until_latest_expiration\nQuestion answered: \"Are GTFS bundles approaching expiration?\"", + "description": "Metrics: gtfs_bundle_days_until_earliest_expiration, gtfs_bundle_days_until_latest_expiration\nQuestion answered: \"Are GTFS bundles approaching expiration?\"\n\nVisualization: Bar Gauge\nRationale: This metric is a countdown. Rendering it as a horizontal bar gauge allows operators to stack multiple feeds side-by-side. The bars act as a visual timer that shifts from green to warning red as the days until expiration drop below the critical threshold.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "max": 7776000, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 604800 + }, + { + "color": "green", + "value": 2592000 + } + ] + }, + "unit": "dtdurations" + }, + "overrides": [] + }, "gridPos": { "h": 8, "w": 12, @@ -179,16 +207,35 @@ "y": 10 }, "id": 201, + "options": { + "displayMode": "gradient", + "maxVizHeight": 300, + "minVizHeight": 16, + "minVizWidth": 75, + "namePlacement": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + }, + "showUnfilled": true, + "sizing": "auto", + "valueMode": "color" + }, + "pluginVersion": "13.0.2", "targets": [ { - "expr": "gtfs_bundle_days_until_earliest_expiration{server_id=~\"$server_id\"}", + "expr": "gtfs_bundle_days_until_earliest_expiration{server_id=~\"$server_id\"} * 86400", + "legendFormat": "Earliest Expiration (Server {{server_id}})", "refId": "A", "datasource": { "name": "Prometheus" } }, { - "expr": "gtfs_bundle_days_until_latest_expiration{server_id=~\"$server_id\"}", + "expr": "gtfs_bundle_days_until_latest_expiration{server_id=~\"$server_id\"} * 86400", + "legendFormat": "Latest Expiration (Server {{server_id}})", "refId": "B", "datasource": { "name": "Prometheus" @@ -196,7 +243,7 @@ } ], "title": "2.1 Feed Expiration", - "type": "timeseries" + "type": "bargauge" }, { "datasource": {