atlas dashboards: fix overview links and add pods-by-node pie
This commit is contained in:
parent
bf6179f907
commit
ec59d25ad8
@ -947,13 +947,7 @@ def build_overview():
|
|||||||
"templating": {"list": []},
|
"templating": {"list": []},
|
||||||
"time": {"from": "now-1h", "to": "now"},
|
"time": {"from": "now-1h", "to": "now"},
|
||||||
"refresh": "1m",
|
"refresh": "1m",
|
||||||
"links": [
|
"links": [],
|
||||||
{"title": "Atlas Pods", "type": "dashboard", "dashboardUid": "atlas-pods", "keepTime": False},
|
|
||||||
{"title": "Atlas Nodes", "type": "dashboard", "dashboardUid": "atlas-nodes", "keepTime": False},
|
|
||||||
{"title": "Atlas Storage", "type": "dashboard", "dashboardUid": "atlas-storage", "keepTime": False},
|
|
||||||
{"title": "Atlas Network", "type": "dashboard", "dashboardUid": "atlas-network", "keepTime": False},
|
|
||||||
{"title": "Atlas GPU", "type": "dashboard", "dashboardUid": "atlas-gpu", "keepTime": False},
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1053,6 +1047,14 @@ def build_pods_dashboard():
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
panels.append(
|
||||||
|
pie_panel(
|
||||||
|
8,
|
||||||
|
"Pods by Node",
|
||||||
|
'sum(kube_pod_info{pod!=""}) by (node)',
|
||||||
|
{"h": 8, "w": 12, "x": 12, "y": 34},
|
||||||
|
)
|
||||||
|
)
|
||||||
return {
|
return {
|
||||||
"uid": "atlas-pods",
|
"uid": "atlas-pods",
|
||||||
"title": "Atlas Pods",
|
"title": "Atlas Pods",
|
||||||
|
|||||||
@ -1641,36 +1641,5 @@
|
|||||||
"to": "now"
|
"to": "now"
|
||||||
},
|
},
|
||||||
"refresh": "1m",
|
"refresh": "1m",
|
||||||
"links": [
|
"links": []
|
||||||
{
|
|
||||||
"title": "Atlas Pods",
|
|
||||||
"type": "dashboard",
|
|
||||||
"dashboardUid": "atlas-pods",
|
|
||||||
"keepTime": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Atlas Nodes",
|
|
||||||
"type": "dashboard",
|
|
||||||
"dashboardUid": "atlas-nodes",
|
|
||||||
"keepTime": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Atlas Storage",
|
|
||||||
"type": "dashboard",
|
|
||||||
"dashboardUid": "atlas-storage",
|
|
||||||
"keepTime": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Atlas Network",
|
|
||||||
"type": "dashboard",
|
|
||||||
"dashboardUid": "atlas-network",
|
|
||||||
"keepTime": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Atlas GPU",
|
|
||||||
"type": "dashboard",
|
|
||||||
"dashboardUid": "atlas-gpu",
|
|
||||||
"keepTime": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -359,6 +359,59 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"type": "piechart",
|
||||||
|
"title": "Pods by Node",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "atlas-vm"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 34
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"expr": "sum(kube_pod_info{pod!=\"\"}) by (node)",
|
||||||
|
"refId": "A",
|
||||||
|
"legendFormat": "{{namespace}}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"unit": "percent",
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"displayMode": "list",
|
||||||
|
"placement": "right"
|
||||||
|
},
|
||||||
|
"pieType": "pie",
|
||||||
|
"displayLabels": [
|
||||||
|
"percent"
|
||||||
|
],
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "single"
|
||||||
|
},
|
||||||
|
"colorScheme": "interpolateSpectral",
|
||||||
|
"colorBy": "value",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": {
|
"time": {
|
||||||
|
|||||||
@ -1650,36 +1650,5 @@ data:
|
|||||||
"to": "now"
|
"to": "now"
|
||||||
},
|
},
|
||||||
"refresh": "1m",
|
"refresh": "1m",
|
||||||
"links": [
|
"links": []
|
||||||
{
|
|
||||||
"title": "Atlas Pods",
|
|
||||||
"type": "dashboard",
|
|
||||||
"dashboardUid": "atlas-pods",
|
|
||||||
"keepTime": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Atlas Nodes",
|
|
||||||
"type": "dashboard",
|
|
||||||
"dashboardUid": "atlas-nodes",
|
|
||||||
"keepTime": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Atlas Storage",
|
|
||||||
"type": "dashboard",
|
|
||||||
"dashboardUid": "atlas-storage",
|
|
||||||
"keepTime": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Atlas Network",
|
|
||||||
"type": "dashboard",
|
|
||||||
"dashboardUid": "atlas-network",
|
|
||||||
"keepTime": false
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "Atlas GPU",
|
|
||||||
"type": "dashboard",
|
|
||||||
"dashboardUid": "atlas-gpu",
|
|
||||||
"keepTime": false
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -368,6 +368,59 @@ data:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"type": "piechart",
|
||||||
|
"title": "Pods by Node",
|
||||||
|
"datasource": {
|
||||||
|
"type": "prometheus",
|
||||||
|
"uid": "atlas-vm"
|
||||||
|
},
|
||||||
|
"gridPos": {
|
||||||
|
"h": 8,
|
||||||
|
"w": 12,
|
||||||
|
"x": 12,
|
||||||
|
"y": 34
|
||||||
|
},
|
||||||
|
"targets": [
|
||||||
|
{
|
||||||
|
"expr": "sum(kube_pod_info{pod!=\"\"}) by (node)",
|
||||||
|
"refId": "A",
|
||||||
|
"legendFormat": "{{namespace}}"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {
|
||||||
|
"unit": "percent",
|
||||||
|
"color": {
|
||||||
|
"mode": "palette-classic"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"overrides": []
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"legend": {
|
||||||
|
"displayMode": "list",
|
||||||
|
"placement": "right"
|
||||||
|
},
|
||||||
|
"pieType": "pie",
|
||||||
|
"displayLabels": [
|
||||||
|
"percent"
|
||||||
|
],
|
||||||
|
"tooltip": {
|
||||||
|
"mode": "single"
|
||||||
|
},
|
||||||
|
"colorScheme": "interpolateSpectral",
|
||||||
|
"colorBy": "value",
|
||||||
|
"reduceOptions": {
|
||||||
|
"calcs": [
|
||||||
|
"lastNotNull"
|
||||||
|
],
|
||||||
|
"fields": "",
|
||||||
|
"values": false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": {
|
"time": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user