Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Fix Node/Cluster dashboards for node-exporter v0.16.0 #51

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
61 changes: 47 additions & 14 deletions dist/dashboards/k8s-cluster.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,19 @@
"version": ""
}
],
"annotations": {},
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "Summary metrics about containers running on Kubernetes nodes.",
"editable": true,
"gnetId": null,
Expand Down Expand Up @@ -120,7 +132,7 @@
"refId": "A"
}
],
"thresholds": ".8,.9",
"thresholds": "0.8,0.9",
"title": "Cluster Pod Usage",
"type": "singlestat",
"valueFontSize": "80%",
Expand Down Expand Up @@ -200,7 +212,7 @@
"refId": "A"
}
],
"thresholds": ".8,.9",
"thresholds": "0.8,0.9",
"title": "Cluster CPU Usage",
"type": "singlestat",
"valueFontSize": "80%",
Expand Down Expand Up @@ -280,7 +292,7 @@
"refId": "A"
}
],
"thresholds": ".8,.9",
"thresholds": "0.8,0.9",
"title": "Cluster Memory Usage",
"type": "singlestat",
"valueFontSize": "80%",
Expand Down Expand Up @@ -354,13 +366,13 @@
"tableColumn": "",
"targets": [
{
"expr": "(sum (node_filesystem_size{nodename=~\"$node\"}) - sum (node_filesystem_free{nodename=~\"$node\"})) / sum (node_filesystem_size{nodename=~\"$node\"})",
"expr": "(sum (node_filesystem_size_bytes{nodename=~\"$node\"}) - sum (node_filesystem_free_bytes{nodename=~\"$node\"})) / sum (node_filesystem_size_bytes{nodename=~\"$node\"})",
"format": "time_series",
"intervalFactor": 1,
"refId": "A"
}
],
"thresholds": ".8,.9",
"thresholds": "0.8,0.9",
"title": "Cluster Disk Usage",
"type": "singlestat",
"valueFontSize": "80%",
Expand Down Expand Up @@ -465,7 +477,11 @@
"min": null,
"show": true
}
]
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
Expand Down Expand Up @@ -504,14 +520,14 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(kube_node_status_capacity_cpu_cores{node=~\"$node\"})",
"expr": "sum(kube_node_status_allocatable_cpu_cores{node=~\"$node\"})",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "allocatable",
"refId": "A"
},
{
"expr": "sum(kube_node_status_allocatable_cpu_cores{node=~\"$node\"})",
"expr": "sum(kube_node_status_capacity_cpu_cores{node=~\"$node\"})",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "capacity",
Expand Down Expand Up @@ -560,7 +576,11 @@
"min": null,
"show": true
}
]
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
Expand Down Expand Up @@ -654,7 +674,11 @@
"min": null,
"show": true
}
]
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
Expand Down Expand Up @@ -693,14 +717,14 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(node_filesystem_size{nodename=~\"$node\"}) - sum(node_filesystem_free{nodename=~\"$node\"})",
"expr": "sum(node_filesystem_size_bytes{nodename=~\"$node\"}) - sum(node_filesystem_free_bytes{nodename=~\"$node\"})",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "usage",
"refId": "A"
},
{
"expr": "sum(node_filesystem_size{nodename=~\"$node\"})",
"expr": "sum(node_filesystem_size_bytes{nodename=~\"$node\"})",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "limit",
Expand Down Expand Up @@ -741,7 +765,11 @@
"min": null,
"show": true
}
]
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"collapsed": false,
Expand Down Expand Up @@ -2515,6 +2543,7 @@
"query": "grafana-kubernetes-datasource",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
Expand All @@ -2529,6 +2558,7 @@
"query": "datasource",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
Expand All @@ -2544,6 +2574,7 @@
"query": "prometheus",
"refresh": 1,
"regex": "/$ds/",
"skipUrlSync": false,
"type": "datasource"
},
{
Expand All @@ -2558,6 +2589,7 @@
"query": "node",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": null,
"tags": [],
Expand All @@ -2577,6 +2609,7 @@
"query": "namespace",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": null,
"tags": [],
Expand Down
14 changes: 7 additions & 7 deletions dist/dashboards/k8s-container.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(container_memory_usage_bytes{pod_name=~\"$pod\"}) by (pod_name)",
"expr": "sum(container_memory_usage_bytes{pod_name=~\"$pod\", kubernetes_io_hostname=~\"$node\", namespace=~\"$namespace\", image!=\"\"}) by (pod_name)",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ pod_name }}",
Expand Down Expand Up @@ -217,7 +217,7 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(irate(container_cpu_usage_seconds_total{pod_name=~\"$pod\"}[2m])) by (pod_name)",
"expr": "sum(irate(container_cpu_usage_seconds_total{pod_name=~\"$pod\", kubernetes_io_hostname=~\"$node\", namespace=~\"$namespace\", image!=\"\"}[2m])) by (pod_name)",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ pod_name }}",
Expand Down Expand Up @@ -307,7 +307,7 @@
"steppedLine": false,
"targets": [
{
"expr": "rate(container_network_transmit_bytes_total{pod_name=~\"$pod\", kubernetes_io_hostname=~\"$node\"}[2m])",
"expr": "rate(container_network_transmit_bytes_total{pod_name=~\"$pod\", kubernetes_io_hostname=~\"$node\", namespace=~\"$namespace\"}[2m])",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
Expand Down Expand Up @@ -398,7 +398,7 @@
"steppedLine": false,
"targets": [
{
"expr": "rate(container_network_receive_bytes_total{pod_name=~\"$pod\", kubernetes_io_hostname=~\"$node\"}[2m])",
"expr": "rate(container_network_receive_bytes_total{pod_name=~\"$pod\", kubernetes_io_hostname=~\"$node\", namespace=~\"$namespace\"}[2m])",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ pod_name }}",
Expand Down Expand Up @@ -489,7 +489,7 @@
"steppedLine": false,
"targets": [
{
"expr": "rate(container_fs_io_time_seconds_total{pod_name=~\"$pod\"}[2m])",
"expr": "rate(container_fs_io_time_seconds_total{pod_name=~\"$pod\", kubernetes_io_hostname=~\"$node\", namespace=~\"$namespace\"}[2m])",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{pod_name}}",
Expand Down Expand Up @@ -577,7 +577,7 @@
"steppedLine": false,
"targets": [
{
"expr": "rate(container_fs_write_seconds_total{pod_name=~\"$pod\"}[2m])",
"expr": "rate(container_fs_write_seconds_total{pod_name=~\"$pod\", kubernetes_io_hostname=~\"$node\", namespace=~\"$namespace\"}[2m])",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ pod_name }}",
Expand Down Expand Up @@ -760,4 +760,4 @@
},
"timezone": "browser",
"title": "K8s Container"
}
}
Loading