apiVersion: v1 kind: ConfigMap metadata: name: node-resources-multi-select-dashboard namespace: monitoring annotations: argocd.argoproj.io/sync-wave: "4" labels: grafana_dashboard: '1' app.kubernetes.io/instance: prometheus app.kubernetes.io/managed-by: Helm app.kubernetes.io/part-of: kube-prometheus-stack release: prometheus data: node-resources-multi.json: |- { "title": "Node Resources - Multi Select", "uid": "node-resources-multi", "timezone": "browser", "schemaVersion": 38, "refresh": "30s", "tags": [ "node-exporter", "nodes", "resources" ], "editable": true, "templating": { "list": [ { "name": "datasource", "type": "datasource", "query": "prometheus", "hide": 0 }, { "name": "instance", "type": "query", "datasource": { "type": "prometheus", "uid": "${datasource}" }, "query": "label_values(node_uname_info, instance)", "refresh": 2, "hide": 0, "label": "Nodes", "includeAll": true, "allValue": ".*", "multi": true, "sort": 1 } ] }, "panels": [ { "type": "row", "collapsed": false, "title": "CPU Usage", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 } }, { "type": "timeseries", "title": "CPU Usage % (all cores)", "gridPos": { "h": 8, "w": 12, "x": 0, "y": 1 }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "targets": [ { "expr": "100 - (avg(rate(node_cpu_seconds_total{mode=\"idle\",instance=~\"$instance\"}[5m])) by (instance) * 100)", "legendFormat": "{{instance}}" } ], "fieldConfig": { "defaults": { "unit": "percent", "min": 0, "max": 100, "custom": { "fillOpacity": 20, "showPoints": "never" } } }, "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true } } }, { "type": "gauge", "title": "CPU Usage % (Current)", "gridPos": { "h": 8, "w": 12, "x": 12, "y": 1 }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "targets": [ { "expr": "100 - (avg(rate(node_cpu_seconds_total{mode=\"idle\",instance=~\"$instance\"}[5m])) by (instance) * 100)", "legendFormat": "{{instance}}" } ], "fieldConfig": { "defaults": { "unit": "percent", "min": 0, "max": 100, "custom": { "hideFrom": { "tooltip": false, "viz": false, "legend": false } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 70 }, { "color": "red", "value": 90 } ] } } }, "options": { "orientation": "auto", "textMode": "value_and_name", "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } } }, { "type": "row", "collapsed": false, "title": "Memory Usage", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 9 } }, { "type": "timeseries", "title": "Memory Usage %", "gridPos": { "h": 8, "w": 12, "x": 0, "y": 10 }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "targets": [ { "expr": "100 * (1 - ((node_memory_MemAvailable_bytes{instance=~\"$instance\"} or (node_memory_MemFree_bytes{instance=~\"$instance\"} + node_memory_Buffers_bytes{instance=~\"$instance\"} + node_memory_Cached_bytes{instance=~\"$instance\"})) / node_memory_MemTotal_bytes{instance=~\"$instance\"}))", "legendFormat": "{{instance}}" } ], "fieldConfig": { "defaults": { "unit": "percent", "min": 0, "max": 100, "custom": { "fillOpacity": 20, "showPoints": "never" } } }, "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true } } }, { "type": "gauge", "title": "Memory Usage % (Current)", "gridPos": { "h": 8, "w": 12, "x": 12, "y": 10 }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "targets": [ { "expr": "100 * (1 - ((node_memory_MemAvailable_bytes{instance=~\"$instance\"} or (node_memory_MemFree_bytes{instance=~\"$instance\"} + node_memory_Buffers_bytes{instance=~\"$instance\"} + node_memory_Cached_bytes{instance=~\"$instance\"})) / node_memory_MemTotal_bytes{instance=~\"$instance\"}))", "legendFormat": "{{instance}}" } ], "fieldConfig": { "defaults": { "unit": "percent", "min": 0, "max": 100, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 70 }, { "color": "red", "value": 90 } ] } } }, "options": { "orientation": "auto", "textMode": "value_and_name", "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } } }, { "type": "row", "collapsed": false, "title": "Disk Usage", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 18 } }, { "type": "timeseries", "title": "Disk Usage % (root /)", "gridPos": { "h": 8, "w": 12, "x": 0, "y": 19 }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "targets": [ { "expr": "100 * (node_filesystem_size_bytes{instance=~\"$instance\",mountpoint=\"/\",fstype!=\"tmpfs\"} - node_filesystem_avail_bytes{instance=~\"$instance\",mountpoint=\"/\",fstype!=\"tmpfs\"}) / node_filesystem_size_bytes{instance=~\"$instance\",mountpoint=\"/\",fstype!=\"tmpfs\"}", "legendFormat": "{{instance}}" } ], "fieldConfig": { "defaults": { "unit": "percent", "min": 0, "max": 100, "custom": { "fillOpacity": 20, "showPoints": "never" } } }, "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true } } }, { "type": "gauge", "title": "Disk Usage % (root / - Current)", "gridPos": { "h": 8, "w": 12, "x": 12, "y": 19 }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "targets": [ { "expr": "100 * (node_filesystem_size_bytes{instance=~\"$instance\",mountpoint=\"/\",fstype!=\"tmpfs\"} - node_filesystem_avail_bytes{instance=~\"$instance\",mountpoint=\"/\",fstype!=\"tmpfs\"}) / node_filesystem_size_bytes{instance=~\"$instance\",mountpoint=\"/\",fstype!=\"tmpfs\"}", "legendFormat": "{{instance}}" } ], "fieldConfig": { "defaults": { "unit": "percent", "min": 0, "max": 100, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 70 }, { "color": "red", "value": 85 } ] } } }, "options": { "orientation": "auto", "textMode": "value_and_name", "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } } }, { "type": "row", "collapsed": false, "title": "Network I/O", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 27 } }, { "type": "timeseries", "title": "Network Bytes Received", "gridPos": { "h": 8, "w": 12, "x": 0, "y": 28 }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "targets": [ { "expr": "rate(node_network_receive_bytes_total{instance=~\"$instance\",device!~\"^(lo|veth.*|docker.*|br.*|virbr.*)$\"}[5m])", "legendFormat": "{{instance}} - {{device}}" } ], "fieldConfig": { "defaults": { "unit": "Bps", "custom": { "fillOpacity": 20, "showPoints": "never" } } }, "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true } } }, { "type": "timeseries", "title": "Network Bytes Transmitted", "gridPos": { "h": 8, "w": 12, "x": 12, "y": 28 }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "targets": [ { "expr": "rate(node_network_transmit_bytes_total{instance=~\"$instance\",device!~\"^(lo|veth.*|docker.*|br.*|virbr.*)$\"}[5m])", "legendFormat": "{{instance}} - {{device}}" } ], "fieldConfig": { "defaults": { "unit": "Bps", "custom": { "fillOpacity": 20, "showPoints": "never" } } }, "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true } } }, { "type": "row", "collapsed": false, "title": "Disk I/O", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 36 } }, { "type": "timeseries", "title": "Disk Read Rate (bytes/sec)", "gridPos": { "h": 8, "w": 12, "x": 0, "y": 37 }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "targets": [ { "expr": "rate(node_disk_read_bytes_total{instance=~\"$instance\",device!~\"^(loop|sr)\"}[5m])", "legendFormat": "{{instance}} - {{device}}" } ], "fieldConfig": { "defaults": { "unit": "Bps", "custom": { "fillOpacity": 20, "showPoints": "never" } } }, "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true } } }, { "type": "timeseries", "title": "Disk Write Rate (bytes/sec)", "gridPos": { "h": 8, "w": 12, "x": 12, "y": 37 }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "targets": [ { "expr": "rate(node_disk_written_bytes_total{instance=~\"$instance\",device!~\"^(loop|sr)\"}[5m])", "legendFormat": "{{instance}} - {{device}}" } ], "fieldConfig": { "defaults": { "unit": "Bps", "custom": { "fillOpacity": 20, "showPoints": "never" } } }, "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true } } }, { "type": "row", "collapsed": false, "title": "System Load & Processes", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 45 } }, { "type": "timeseries", "title": "System Load Average", "gridPos": { "h": 8, "w": 12, "x": 0, "y": 46 }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "targets": [ { "expr": "node_load1{instance=~\"$instance\"}", "legendFormat": "{{instance}} - 1m" }, { "expr": "node_load5{instance=~\"$instance\"}", "legendFormat": "{{instance}} - 5m" }, { "expr": "node_load15{instance=~\"$instance\"}", "legendFormat": "{{instance}} - 15m" } ], "fieldConfig": { "defaults": { "custom": { "fillOpacity": 10, "showPoints": "never" } } }, "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true } } }, { "type": "stat", "title": "Running Processes", "gridPos": { "h": 8, "w": 12, "x": 12, "y": 46 }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "targets": [ { "expr": "node_processes_running{instance=~\"$instance\"}", "legendFormat": "{{instance}}" } ], "fieldConfig": { "defaults": { "custom": { "hideFrom": { "tooltip": false, "viz": false, "legend": false } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } } }, "options": { "orientation": "auto", "textMode": "value_and_name", "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "reduceOptions": { "values": false, "calcs": [ "lastNotNull" ] } } } ], "time": { "from": "now-6h", "to": "now" } }