diff --git a/scripts/dashboards_render_atlas.py b/scripts/dashboards_render_atlas.py index 2faec87..7047f41 100644 --- a/scripts/dashboards_render_atlas.py +++ b/scripts/dashboards_render_atlas.py @@ -1055,6 +1055,15 @@ def build_pods_dashboard(): {"h": 8, "w": 12, "x": 12, "y": 34}, ) ) + panels.append( + bargauge_panel( + 9, + "Top Nodes by Pod Count", + 'topk(12, sum(kube_pod_info{pod!=""}) by (node))', + {"h": 8, "w": 12, "x": 0, "y": 34}, + unit="none", + ) + ) return { "uid": "atlas-pods", "title": "Atlas Pods", diff --git a/services/monitoring/dashboards/atlas-pods.json b/services/monitoring/dashboards/atlas-pods.json index 6e0ef3f..4f7426e 100644 --- a/services/monitoring/dashboards/atlas-pods.json +++ b/services/monitoring/dashboards/atlas-pods.json @@ -412,6 +412,68 @@ "values": false } } + }, + { + "id": 9, + "type": "bargauge", + "title": "Top Nodes by Pod Count", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 34 + }, + "targets": [ + { + "expr": "topk(12, sum(kube_pod_info{pod!=\"\"}) by (node))", + "refId": "A", + "legendFormat": "{{node}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 50 + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + } } ], "time": { diff --git a/services/monitoring/grafana-dashboard-pods.yaml b/services/monitoring/grafana-dashboard-pods.yaml index d6aa8c3..90cf35d 100644 --- a/services/monitoring/grafana-dashboard-pods.yaml +++ b/services/monitoring/grafana-dashboard-pods.yaml @@ -421,6 +421,68 @@ data: "values": false } } + }, + { + "id": 9, + "type": "bargauge", + "title": "Top Nodes by Pod Count", + "datasource": { + "type": "prometheus", + "uid": "atlas-vm" + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 34 + }, + "targets": [ + { + "expr": "topk(12, sum(kube_pod_info{pod!=\"\"}) by (node))", + "refId": "A", + "legendFormat": "{{node}}" + } + ], + "fieldConfig": { + "defaults": { + "unit": "none", + "min": 0, + "max": null, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 50 + }, + { + "color": "orange", + "value": 70 + }, + { + "color": "red", + "value": 85 + } + ] + } + }, + "overrides": [] + }, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + } + } } ], "time": {