diff --git a/scripts/dashboards_render_atlas.py b/scripts/dashboards_render_atlas.py index d1db123..d9e8d27 100644 --- a/scripts/dashboards_render_atlas.py +++ b/scripts/dashboards_render_atlas.py @@ -558,7 +558,7 @@ def pie_panel(panel_id, title, expr, grid): } -def bargauge_panel(panel_id, title, expr, grid, *, unit="none", links=None): +def bargauge_panel(panel_id, title, expr, grid, *, unit="none", links=None, limit=None): """Return a bar gauge panel with label-aware reduction.""" panel = { "id": panel_id, @@ -603,6 +603,8 @@ def bargauge_panel(panel_id, title, expr, grid, *, unit="none", links=None): "options": {"fields": ["Value"], "order": "desc"}, } ] + if limit: + panel["transformations"].append({"id": "limit", "options": {"limit": limit}}) return panel @@ -890,6 +892,7 @@ def build_overview(): 'topk(12, sum(kube_pod_info{pod!=""}) by (node))', {"h": 10, "w": 12, "x": 12, "y": 54}, unit="none", + limit=12, ) ) @@ -1087,6 +1090,7 @@ def build_pods_dashboard(): 'topk(12, sum(kube_pod_info{pod!=""}) by (node))', {"h": 8, "w": 12, "x": 0, "y": 34}, unit="none", + limit=12, ) ) return { diff --git a/services/monitoring/dashboards/atlas-overview.json b/services/monitoring/dashboards/atlas-overview.json index 36fdf70..36c53e2 100644 --- a/services/monitoring/dashboards/atlas-overview.json +++ b/services/monitoring/dashboards/atlas-overview.json @@ -1500,6 +1500,12 @@ ], "order": "desc" } + }, + { + "id": "limit", + "options": { + "limit": 12 + } } ] }, diff --git a/services/monitoring/dashboards/atlas-pods.json b/services/monitoring/dashboards/atlas-pods.json index a7ed651..0bc7771 100644 --- a/services/monitoring/dashboards/atlas-pods.json +++ b/services/monitoring/dashboards/atlas-pods.json @@ -483,6 +483,12 @@ ], "order": "desc" } + }, + { + "id": "limit", + "options": { + "limit": 12 + } } ] } diff --git a/services/monitoring/grafana-dashboard-overview.yaml b/services/monitoring/grafana-dashboard-overview.yaml index e1cbf4e..f9ea8a1 100644 --- a/services/monitoring/grafana-dashboard-overview.yaml +++ b/services/monitoring/grafana-dashboard-overview.yaml @@ -1509,6 +1509,12 @@ data: ], "order": "desc" } + }, + { + "id": "limit", + "options": { + "limit": 12 + } } ] }, diff --git a/services/monitoring/grafana-dashboard-pods.yaml b/services/monitoring/grafana-dashboard-pods.yaml index 2bab93d..3812211 100644 --- a/services/monitoring/grafana-dashboard-pods.yaml +++ b/services/monitoring/grafana-dashboard-pods.yaml @@ -492,6 +492,12 @@ data: ], "order": "desc" } + }, + { + "id": "limit", + "options": { + "limit": 12 + } } ] }