Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: job label on k8s-views-global.json #110

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 47 additions & 20 deletions dashboards/k8s-views-global.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "avg(sum by (instance, cpu) (rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\"}[$__rate_interval])))",
"expr": "avg(sum by (instance, cpu) (rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])))",
"interval": "",
"legendFormat": "Real Linux",
"range": true,
Expand Down Expand Up @@ -301,7 +301,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\"}) / sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"})",
"expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"$job\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\", job=\"$job\"}) / sum(node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"$job\"})",
"hide": false,
"interval": "",
"legendFormat": "Real Linux",
Expand Down Expand Up @@ -809,7 +809,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\"}[$__rate_interval]))",
"expr": "sum(rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval]))",
"interval": "",
"legendFormat": "Real Linux",
"range": true,
Expand Down Expand Up @@ -964,7 +964,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\"})",
"expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"$job\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\", job=\"$job\"})",
"interval": "",
"legendFormat": "Real Linux",
"range": true,
Expand Down Expand Up @@ -1236,7 +1236,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "avg(sum by (instance, cpu) (rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\"}[$__rate_interval])))",
"expr": "avg(sum by (instance, cpu) (rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])))",
"interval": "$resolution",
"legendFormat": "Linux",
"range": true,
Expand Down Expand Up @@ -1370,7 +1370,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\"}) / sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"})",
"expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"$job\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\", job=\"$job\"}) / sum(node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"$job\"})",
"interval": "$resolution",
"legendFormat": "Linux",
"range": true,
Expand Down Expand Up @@ -1716,7 +1716,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "avg(sum by (instance, cpu) (rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\"}[$__rate_interval]))) by (instance)",
"expr": "avg(sum by (instance, cpu) (rate(node_cpu_seconds_total{mode!~\"idle|iowait|steal\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval]))) by (instance)",
"interval": "$resolution",
"legendFormat": "{{ node }}",
"range": true,
Expand Down Expand Up @@ -1834,7 +1834,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\"}) by (instance)",
"expr": "sum(node_memory_MemTotal_bytes{cluster=\"$cluster\", job=\"$job\"} - node_memory_MemAvailable_bytes{cluster=\"$cluster\", job=\"$job\"}) by (instance)",
"hide": false,
"interval": "$resolution",
"legendFormat": "{{ instance }}",
Expand Down Expand Up @@ -2067,7 +2067,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(node_cpu_core_throttles_total{cluster=\"$cluster\"}[$__rate_interval])) by (instance)",
"expr": "sum(rate(node_cpu_core_throttles_total{cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)",
"interval": "$resolution",
"legendFormat": "{{ instance }}",
"range": true,
Expand Down Expand Up @@ -2626,7 +2626,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(node_network_receive_bytes_total{device!~\"(veth|azv|lxc).*\", cluster=\"$cluster\"}[$__rate_interval])) by (device)",
"expr": "sum(rate(node_network_receive_bytes_total{device!~\"(veth|azv|lxc).*\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (device)",
"interval": "$resolution",
"legendFormat": "Received : {{ device }}",
"range": true,
Expand All @@ -2639,7 +2639,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "- sum(rate(node_network_transmit_bytes_total{device!~\"(veth|azv|lxc).*\", cluster=\"$cluster\"}[$__rate_interval])) by (device)",
"expr": "- sum(rate(node_network_transmit_bytes_total{device!~\"(veth|azv|lxc).*\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (device)",
"interval": "$resolution",
"legendFormat": "Transmitted : {{ device }}",
"range": true,
Expand Down Expand Up @@ -2765,7 +2765,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(node_network_receive_drop_total{cluster=\"$cluster\"}[$__rate_interval]))",
"expr": "sum(rate(node_network_receive_drop_total{cluster=\"$cluster\", job=\"$job\"}[$__rate_interval]))",
"interval": "$resolution",
"legendFormat": "Linux Packets dropped (receive)",
"range": true,
Expand All @@ -2778,7 +2778,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "- sum(rate(node_network_transmit_drop_total{cluster=\"$cluster\"}[$__rate_interval]))",
"expr": "- sum(rate(node_network_transmit_drop_total{cluster=\"$cluster\", job=\"$job\"}[$__rate_interval]))",
"interval": "$resolution",
"legendFormat": "Linux Packets dropped (transmit)",
"range": true,
Expand Down Expand Up @@ -3060,7 +3060,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(node_network_receive_bytes_total{cluster=\"$cluster\"}[$__rate_interval])) by (instance)",
"expr": "sum(rate(node_network_receive_bytes_total{cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)",
"interval": "$resolution",
"legendFormat": "Received bytes in {{ instance }}",
"range": true,
Expand All @@ -3072,7 +3072,7 @@
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "- sum(rate(node_network_transmit_bytes_total{cluster=\"$cluster\"}[$__rate_interval])) by (instance)",
"expr": "- sum(rate(node_network_transmit_bytes_total{cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)",
"hide": false,
"interval": "$resolution",
"legendFormat": "Transmitted bytes in {{ instance }}",
Expand Down Expand Up @@ -3199,7 +3199,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(node_network_receive_bytes_total{device!~\"(veth|azv|lxc|lo).*\", cluster=\"$cluster\"}[$__rate_interval])) by (instance)",
"expr": "sum(rate(node_network_receive_bytes_total{device!~\"(veth|azv|lxc|lo).*\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)",
"interval": "$resolution",
"legendFormat": "Received bytes in {{ instance }}",
"range": true,
Expand All @@ -3211,7 +3211,7 @@
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "- sum(rate(node_network_transmit_bytes_total{device!~\"(veth|azv|lxc|lo).*\", cluster=\"$cluster\"}[$__rate_interval])) by (instance)",
"expr": "- sum(rate(node_network_transmit_bytes_total{device!~\"(veth|azv|lxc|lo).*\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)",
"hide": false,
"interval": "$resolution",
"legendFormat": "Transmitted bytes in {{ instance }}",
Expand Down Expand Up @@ -3339,7 +3339,7 @@
},
"editorMode": "code",
"exemplar": true,
"expr": "sum(rate(node_network_receive_bytes_total{device=\"lo\", cluster=\"$cluster\"}[$__rate_interval])) by (instance)",
"expr": "sum(rate(node_network_receive_bytes_total{device=\"lo\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)",
"interval": "$resolution",
"legendFormat": "Received bytes in {{ instance }}",
"range": true,
Expand All @@ -3351,7 +3351,7 @@
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "- sum(rate(node_network_transmit_bytes_total{device=\"lo\", cluster=\"$cluster\"}[$__rate_interval])) by (instance)",
"expr": "- sum(rate(node_network_transmit_bytes_total{device=\"lo\", cluster=\"$cluster\", job=\"$job\"}[$__rate_interval])) by (instance)",
"hide": false,
"interval": "$resolution",
"legendFormat": "Transmitted bytes in {{ instance }}",
Expand Down Expand Up @@ -3458,6 +3458,33 @@
"queryValue": "",
"skipUrlSync": false,
"type": "custom"
},
{
"current": {
"selected": false,
"text": "",
"value": ""
},
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(node_cpu_seconds_total{cluster=\"$cluster\"},job)",
"hide": 0,
"includeAll": false,
"multi": true,
"name": "job",
"options": [],
"query": {
"qryType": 1,
"query": "label_values(node_cpu_seconds_total{cluster=\"$cluster\"},job)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"type": "query"
}
]
},
Expand All @@ -3469,6 +3496,6 @@
"timezone": "",
"title": "Kubernetes / Views / Global",
"uid": "k8s_views_global",
"version": 38,
"version": 39,
"weekStart": ""
}
Loading