Skip to content

Instantly share code, notes, and snippets.

@dinofizz
Created April 11, 2020 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save dinofizz/af7e62adffea86419aad4d05188bb3eb to your computer and use it in GitHub Desktop.
Save dinofizz/af7e62adffea86419aad4d05188bb3eb to your computer and use it in GitHub Desktop.
A Grafana dashboard using Prometheus (with node_exporter and rpi_exporter) to present some basic measurements
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 1,
"links": [],
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 2,
"interval": "",
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"dataLinks": []
},
"percentage": false,
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rpi_cpu_temperature_celsius",
"refId": "A"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Raspberry Pi Temperatures",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"clusterName": "whitepi",
"colorMode": "Panel",
"colors": {
"crit": "rgba(245, 54, 54, 0.9)",
"disable": "rgba(128, 128, 128, 0.9)",
"ok": "rgba(50, 128, 45, 0.9)",
"warn": "rgba(237, 129, 40, 0.9)"
},
"cornerRadius": 0,
"datasource": null,
"displayName": "whitepi",
"flipCard": false,
"flipTime": 5,
"fontFormat": "Regular",
"gridPos": {
"h": 6,
"w": 4,
"x": 0,
"y": 10
},
"id": 16,
"isAutoScrollOnOverflow": false,
"isGrayOnNoData": false,
"isHideAlertsOnDisable": false,
"isIgnoreOKColors": false,
"options": {},
"targets": [
{
"aggregation": "Last",
"alias": "eth0",
"crit": 100,
"decimals": 0,
"disabledValue": "0",
"displayAliasType": "Warning / Critical",
"displayType": "Regular",
"displayValueWithAlias": "Never",
"expr": "node_network_up{device=\"eth0\", job=\"whitepi\"} OR on() vector(100)",
"legendFormat": "eth0",
"refId": "A",
"units": "none",
"valueHandler": "Number Threshold",
"warn": 50
}
],
"timeFrom": null,
"timeShift": null,
"title": "whitepi eth0 status",
"type": "vonage-status-panel"
},
{
"clusterName": "bluepi",
"colorMode": "Panel",
"colors": {
"crit": "rgba(245, 54, 54, 0.9)",
"disable": "rgba(128, 128, 128, 0.9)",
"ok": "rgba(50, 128, 45, 0.9)",
"warn": "rgba(237, 129, 40, 0.9)"
},
"cornerRadius": 0,
"datasource": null,
"displayName": "bluepi",
"flipCard": false,
"flipTime": 5,
"fontFormat": "Regular",
"gridPos": {
"h": 6,
"w": 4,
"x": 4,
"y": 10
},
"id": 8,
"isAutoScrollOnOverflow": false,
"isGrayOnNoData": false,
"isHideAlertsOnDisable": false,
"isIgnoreOKColors": false,
"options": {},
"targets": [
{
"aggregation": "Last",
"alias": "eth0",
"crit": 100,
"decimals": 0,
"disabledValue": "0",
"displayAliasType": "Warning / Critical",
"displayType": "Regular",
"displayValueWithAlias": "Never",
"expr": "node_network_up{device=\"eth0\", job=\"bluepi\"} OR on() vector(100)",
"legendFormat": "eth0",
"refId": "A",
"units": "none",
"valueHandler": "Number Threshold",
"warn": 50
}
],
"timeFrom": null,
"timeShift": null,
"title": "bluepi eth0 status",
"type": "vonage-status-panel"
},
{
"datasource": null,
"gridPos": {
"h": 6,
"w": 4,
"x": 8,
"y": 10
},
"id": 12,
"options": {
"fieldOptions": {
"calcs": [
"mean"
],
"defaults": {
"decimals": 0,
"links": [],
"mappings": [],
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"title": "% RAM Used"
},
"overrides": [],
"values": false
},
"orientation": "horizontal",
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "6.6.1",
"targets": [
{
"expr": "(((node_memory_MemTotal_bytes{job=\"whitepi\"} - node_memory_MemFree_bytes{job=\"whitepi\"} - node_memory_Buffers_bytes{job=\"whitepi\"} - node_memory_Cached_bytes{job=\"whitepi\"}) / node_memory_MemTotal_bytes{job=\"whitepi\"}) * 100)",
"legendFormat": "{{hostname}}",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "WhitePi RAM Usage",
"type": "gauge"
},
{
"datasource": null,
"gridPos": {
"h": 6,
"w": 4,
"x": 12,
"y": 10
},
"id": 13,
"options": {
"fieldOptions": {
"calcs": [
"mean"
],
"defaults": {
"decimals": 0,
"links": [],
"mappings": [],
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"title": "% RAM Used"
},
"overrides": [],
"values": false
},
"orientation": "horizontal",
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "6.6.1",
"targets": [
{
"expr": "(((node_memory_MemTotal_bytes{job=\"bluepi\"} - node_memory_MemFree_bytes{job=\"bluepi\"} - node_memory_Buffers_bytes{job=\"bluepi\"} - node_memory_Cached_bytes{job=\"bluepi\"}) / node_memory_MemTotal_bytes{job=\"bluepi\"}) * 100)",
"legendFormat": "{{hostname}}",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "BluePi RAM Usage",
"type": "gauge"
},
{
"datasource": null,
"gridPos": {
"h": 6,
"w": 4,
"x": 16,
"y": 10
},
"id": 20,
"options": {
"colorMode": "value",
"fieldOptions": {
"calcs": [
"lastNotNull"
],
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"title": "whitepi CPU",
"unit": "percent"
},
"overrides": [],
"values": false
},
"graphMode": "area",
"justifyMode": "center",
"orientation": "vertical"
},
"pluginVersion": "6.6.1",
"targets": [
{
"expr": "100 - (avg by (instance) (irate(node_cpu_seconds_total{job=\"whitepi\", mode=\"idle\"}[5m])) * 100)",
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "whitepi CPU",
"type": "stat"
},
{
"datasource": null,
"gridPos": {
"h": 6,
"w": 4,
"x": 20,
"y": 10
},
"id": 21,
"options": {
"colorMode": "value",
"fieldOptions": {
"calcs": [
"lastNotNull"
],
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"title": "bluepi CPU",
"unit": "percent"
},
"overrides": [],
"values": false
},
"graphMode": "area",
"justifyMode": "center",
"orientation": "vertical"
},
"pluginVersion": "6.6.1",
"targets": [
{
"expr": "100 - (avg by (instance) (irate(node_cpu_seconds_total{job=\"bluepi\", mode=\"idle\"}[5m])) * 100)",
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "bluepi CPU",
"type": "stat"
},
{
"clusterName": "redpi",
"colorMode": "Panel",
"colors": {
"crit": "rgba(245, 54, 54, 0.9)",
"disable": "rgba(128, 128, 128, 0.9)",
"ok": "rgba(50, 128, 45, 0.9)",
"warn": "rgba(237, 129, 40, 0.9)"
},
"cornerRadius": 0,
"datasource": null,
"displayName": "redpi",
"flipCard": false,
"flipTime": 5,
"fontFormat": "Regular",
"gridPos": {
"h": 6,
"w": 4,
"x": 0,
"y": 16
},
"id": 18,
"isAutoScrollOnOverflow": false,
"isGrayOnNoData": false,
"isHideAlertsOnDisable": false,
"isIgnoreOKColors": false,
"options": {},
"targets": [
{
"aggregation": "Last",
"alias": "eth0",
"crit": 100,
"decimals": 0,
"disabledValue": "0",
"displayAliasType": "Warning / Critical",
"displayType": "Regular",
"displayValueWithAlias": "Never",
"expr": "node_network_up{device=\"eth0\", job=\"redpi\"} OR on() vector(100)",
"legendFormat": "eth0",
"refId": "A",
"units": "none",
"valueHandler": "Number Threshold",
"warn": 50
}
],
"timeFrom": null,
"timeShift": null,
"title": "redpi eth0 status",
"type": "vonage-status-panel"
},
{
"clusterName": "greenpi",
"colorMode": "Panel",
"colors": {
"crit": "rgba(245, 54, 54, 0.9)",
"disable": "rgba(128, 128, 128, 0.9)",
"ok": "rgba(50, 128, 45, 0.9)",
"warn": "rgba(237, 129, 40, 0.9)"
},
"cornerRadius": 0,
"datasource": null,
"displayName": "greenpi",
"flipCard": false,
"flipTime": 5,
"fontFormat": "Regular",
"gridPos": {
"h": 6,
"w": 4,
"x": 4,
"y": 16
},
"id": 17,
"isAutoScrollOnOverflow": false,
"isGrayOnNoData": false,
"isHideAlertsOnDisable": false,
"isIgnoreOKColors": false,
"options": {},
"targets": [
{
"aggregation": "Last",
"alias": "eth0",
"crit": 100,
"decimals": 0,
"disabledValue": "0",
"displayAliasType": "Warning / Critical",
"displayType": "Regular",
"displayValueWithAlias": "Never",
"expr": "node_network_up{device=\"eth0\", job=\"greenpi\"} OR on() vector(100)",
"legendFormat": "eth0",
"refId": "A",
"units": "none",
"valueHandler": "Number Threshold",
"warn": 50
}
],
"timeFrom": null,
"timeShift": null,
"title": "greenpi eth0 status",
"type": "vonage-status-panel"
},
{
"datasource": null,
"gridPos": {
"h": 6,
"w": 4,
"x": 8,
"y": 16
},
"id": 14,
"options": {
"fieldOptions": {
"calcs": [
"mean"
],
"defaults": {
"decimals": 0,
"links": [],
"mappings": [],
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"title": "% RAM Used"
},
"overrides": [],
"values": false
},
"orientation": "horizontal",
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "6.6.1",
"targets": [
{
"expr": "(((node_memory_MemTotal_bytes{job=\"redpi\"} - node_memory_MemFree_bytes{job=\"redpi\"} - node_memory_Buffers_bytes{job=\"redpi\"} - node_memory_Cached_bytes{job=\"redpi\"}) / node_memory_MemTotal_bytes{job=\"redpi\"}) * 100)",
"legendFormat": "{{hostname}}",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "RedPi RAM Usage",
"type": "gauge"
},
{
"datasource": null,
"gridPos": {
"h": 6,
"w": 4,
"x": 12,
"y": 16
},
"id": 15,
"options": {
"fieldOptions": {
"calcs": [
"mean"
],
"defaults": {
"decimals": 0,
"links": [],
"mappings": [],
"max": 100,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"title": "% RAM Used"
},
"overrides": [],
"values": false
},
"orientation": "horizontal",
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "6.6.1",
"targets": [
{
"expr": "(((node_memory_MemTotal_bytes{job=\"greenpi\"} - node_memory_MemFree_bytes{job=\"greenpi\"} - node_memory_Buffers_bytes{job=\"greenpi\"} - node_memory_Cached_bytes{job=\"greenpi\"}) / node_memory_MemTotal_bytes{job=\"greenpi\"}) * 100)",
"legendFormat": "{{hostname}}",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "GreenPi RAM Usage",
"type": "gauge"
},
{
"datasource": null,
"gridPos": {
"h": 6,
"w": 4,
"x": 16,
"y": 16
},
"id": 22,
"options": {
"colorMode": "value",
"fieldOptions": {
"calcs": [
"lastNotNull"
],
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"title": "redpi CPU",
"unit": "percent"
},
"overrides": [],
"values": false
},
"graphMode": "area",
"justifyMode": "center",
"orientation": "vertical"
},
"pluginVersion": "6.6.1",
"targets": [
{
"expr": "100 - (avg by (instance) (irate(node_cpu_seconds_total{job=\"redpi\", mode=\"idle\"}[5m])) * 100)",
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "redpi CPU",
"type": "stat"
},
{
"datasource": null,
"gridPos": {
"h": 6,
"w": 4,
"x": 20,
"y": 16
},
"id": 23,
"options": {
"colorMode": "value",
"fieldOptions": {
"calcs": [
"lastNotNull"
],
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"title": "greenpi CPU",
"unit": "percent"
},
"overrides": [],
"values": false
},
"graphMode": "area",
"justifyMode": "center",
"orientation": "vertical"
},
"pluginVersion": "6.6.1",
"targets": [
{
"expr": "100 - (avg by (instance) (irate(node_cpu_seconds_total{job=\"greenpi\", mode=\"idle\"}[5m])) * 100)",
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "greenpi CPU",
"type": "stat"
}
],
"refresh": "5s",
"schemaVersion": 22,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-30m",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "PiCluster",
"uid": "jjEdAvzgk",
"version": 22
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment