Skip to content

Instantly share code, notes, and snippets.

@JackGruber
Last active August 15, 2020 13:53
Show Gist options
  • Save JackGruber/217af067ac88a9361de2d5598546a696 to your computer and use it in GitHub Desktop.
Save JackGruber/217af067ac88a9361de2d5598546a696 to your computer and use it in GitHub Desktop.
Grafana
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"description": "",
"editable": true,
"gnetId": 8321,
"graphTooltip": 1,
"id": 16,
"iteration": 1597499400197,
"links": [],
"panels": [
{
"collapsed": false,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 14,
"panels": [],
"title": "Host",
"type": "row"
},
{
"datasource": "Prometheus",
"description": "",
"fieldConfig": {
"defaults": {
"custom": {},
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "dark-green",
"value": null
},
{
"color": "dark-orange",
"value": 85
},
{
"color": "dark-red",
"value": 95
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 2,
"x": 0,
"y": 1
},
"id": 9,
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "7.1.1",
"targets": [
{
"expr": "avg(node_load5{instance=\"$nodeexporter\"}) / count(count(node_cpu_seconds_total{instance=\"$nodeexporter\"}) by (cpu)) * 100",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Sys Load (5m avg)",
"type": "gauge"
},
{
"datasource": "Prometheus",
"description": "",
"fieldConfig": {
"defaults": {
"custom": {},
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "dark-green",
"value": null
},
{
"color": "dark-orange",
"value": 85
},
{
"color": "dark-red",
"value": 95
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 2,
"x": 2,
"y": 1
},
"id": 10,
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "7.1.1",
"targets": [
{
"expr": "100 - ((node_memory_MemAvailable_bytes{instance=\"$nodeexporter\"} * 100) / node_memory_MemTotal_bytes{instance=\"$nodeexporter\"})",
"interval": "",
"legendFormat": " ",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "RAM Used",
"type": "gauge"
},
{
"datasource": "Prometheus",
"description": "",
"fieldConfig": {
"defaults": {
"custom": {},
"mappings": [],
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "dark-red",
"value": null
},
{
"color": "#EAB839",
"value": 10000
},
{
"color": "dark-green",
"value": 20000
}
]
},
"unit": "mbytes"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 5,
"x": 4,
"y": 1
},
"id": 16,
"options": {
"reduceOptions": {
"calcs": [
"last"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "7.1.1",
"targets": [
{
"expr": "min(node_filesystem_avail_bytes{instance=\"$nodeexporter\"}) by (device) / 1024 / 1024 ",
"interval": "",
"legendFormat": "{{device}}",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Free Disk Space",
"type": "gauge"
},
{
"cacheTimeout": null,
"datasource": "Prometheus",
"fieldConfig": {
"defaults": {
"custom": {},
"mappings": [
{
"id": 0,
"op": "=",
"text": "N/A",
"type": 1,
"value": "null"
}
],
"nullValueMode": "connected",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "dark-green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 3,
"x": 9,
"y": 1
},
"id": 7,
"interval": null,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "center",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "7.1.1",
"targets": [
{
"expr": "count(container_last_seen{instance=\"$containeradvisor\",image!=\"\"})",
"interval": "",
"intervalFactor": 2,
"legendFormat": "",
"metric": "container_last_seen",
"refId": "A",
"step": 240
}
],
"title": "Running containers",
"transparent": true,
"type": "stat"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"description": "",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 5,
"w": 12,
"x": 12,
"y": 1
},
"hiddenSeries": false,
"id": 18,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"percentage": false,
"pluginVersion": "7.1.1",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "/.*Trans.*/",
"transform": "negative-Y"
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "irate(node_network_receive_bytes_total{instance=\"$nodeexporter\", device=~\"eth.*\"}[5m])",
"hide": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{device}} - Receive",
"refId": "A"
},
{
"expr": "irate(node_network_transmit_bytes_total{instance=\"$nodeexporter\", device=~\"eth.*\"}[5m])",
"hide": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{device}} - Transmit",
"refId": "B"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Host Network Traffic",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "Bps",
"label": "out (-) / in (+)",
"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
}
},
{
"collapsed": false,
"datasource": null,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 6
},
"id": 12,
"panels": [],
"repeat": null,
"title": "Container",
"type": "row"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"decimals": 2,
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 0,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 7
},
"hiddenSeries": false,
"id": 2,
"isNew": true,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"sort": "current",
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pluginVersion": "7.1.1",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "rate(container_cpu_user_seconds_total{instance=~\"$containeradvisor\",image!=\"\", name=~\"$container\"}[5m]) * 100",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{name}}",
"metric": "cpu",
"refId": "A",
"step": 10
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "CPU Usage",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "percent",
"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
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"decimals": 2,
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 0,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 14
},
"hiddenSeries": false,
"id": 1,
"isNew": true,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"sort": "avg",
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pluginVersion": "7.1.1",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(container_memory_rss{instance=~\"$containeradvisor\", name=~\"$container\"}) by (name)",
"interval": "",
"legendFormat": "{{name}}",
"refId": "C"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Memory Usage",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bytes",
"label": "",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 0,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 21
},
"hiddenSeries": false,
"id": 3,
"isNew": true,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"sort": "current",
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pluginVersion": "7.1.1",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(irate(container_network_receive_bytes_total{instance=\"$containeradvisor\",image!=\"\", name=~\"$container\"}[5m])) by (name)",
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{name}}",
"metric": "container_network_receive_bytes_total",
"refId": "A",
"step": 20
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Received Network Traffic per Container",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "Bps",
"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
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 0,
"fillGradient": 0,
"grid": {},
"gridPos": {
"h": 7,
"w": 24,
"x": 0,
"y": 28
},
"hiddenSeries": false,
"id": 4,
"isNew": true,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": false,
"rightSide": true,
"show": true,
"sort": "current",
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pluginVersion": "7.1.1",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(irate(container_network_transmit_bytes_total{instance=\"$containeradvisor\",image!=\"\", name=~\"$container\"}[5m])) by (name)",
"hide": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{name}}",
"refId": "A",
"step": 20
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Sent Network Traffic per Container",
"tooltip": {
"msResolution": false,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "Bps",
"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
}
}
],
"refresh": "10s",
"schemaVersion": 26,
"style": "dark",
"tags": [
"docker",
"monitoring"
],
"templating": {
"list": [
{
"allValue": null,
"current": {
"selected": true,
"text": "192.168.1.7",
"value": "192.168.1.7"
},
"datasource": "Prometheus",
"definition": "label_values(node_uname_info{}, instance)",
"hide": 0,
"includeAll": false,
"label": "Host",
"multi": false,
"name": "host",
"options": [
{
"selected": true,
"text": "192.168.1.7",
"value": "192.168.1.7"
},
{
"selected": false,
"text": "exporter",
"value": "exporter"
}
],
"query": "label_values(node_uname_info{}, instance)",
"refresh": 0,
"regex": "(.*):.*",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {
"selected": false,
"text": "192.168.1.7:9100",
"value": "192.168.1.7:9100"
},
"datasource": "Prometheus",
"definition": "label_values(node_uname_info{instance=~\"$host:.*\"}, instance)",
"hide": 2,
"includeAll": false,
"label": "Nodeexporter",
"multi": false,
"name": "nodeexporter",
"options": [],
"query": "label_values(node_uname_info{instance=~\"$host:.*\"}, instance)",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {
"selected": false,
"text": "192.168.1.7:8080",
"value": "192.168.1.7:8080"
},
"datasource": "Prometheus",
"definition": "label_values(container_cpu_user_seconds_total{instance=~\"$host:.*\"}, instance)",
"hide": 2,
"includeAll": false,
"label": "cAdvisor",
"multi": false,
"name": "containeradvisor",
"options": [],
"query": "label_values(container_cpu_user_seconds_total{instance=~\"$host:.*\"}, instance)",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {
"selected": false,
"text": "[a-z]+|nvme[0-9]+n[0-9]+",
"value": "[a-z]+|nvme[0-9]+n[0-9]+"
},
"hide": 2,
"includeAll": false,
"label": null,
"multi": false,
"name": "diskdevices",
"options": [
{
"selected": true,
"text": "[a-z]+|nvme[0-9]+n[0-9]+",
"value": "[a-z]+|nvme[0-9]+n[0-9]+"
}
],
"query": "[a-z]+|nvme[0-9]+n[0-9]+",
"skipUrlSync": false,
"type": "custom"
},
{
"allValue": null,
"current": {
"selected": true,
"text": "All",
"value": [
"$__all"
]
},
"datasource": "Prometheus",
"definition": "label_values(container_cpu_user_seconds_total{instance=~\"$host:.*\"}, name)",
"hide": 0,
"includeAll": true,
"label": "Container",
"multi": true,
"name": "container",
"options": [
{
"selected": true,
"text": "All",
"value": "$__all"
},
{
"selected": false,
"text": "acmesh_app_1",
"value": "acmesh_app_1"
},
{
"selected": false,
"text": "ddns-updater_app_1",
"value": "ddns-updater_app_1"
},
{
"selected": false,
"text": "dhcpd_isc_1",
"value": "dhcpd_isc_1"
},
{
"selected": false,
"text": "dns_unbound_1",
"value": "dns_unbound_1"
},
{
"selected": false,
"text": "gq-gmc-service_app_1",
"value": "gq-gmc-service_app_1"
},
{
"selected": false,
"text": "grafana_app_1",
"value": "grafana_app_1"
},
{
"selected": false,
"text": "grafana_nginx_1",
"value": "grafana_nginx_1"
},
{
"selected": false,
"text": "iobroker_app_1",
"value": "iobroker_app_1"
},
{
"selected": false,
"text": "iobroker_mariadb_1",
"value": "iobroker_mariadb_1"
},
{
"selected": false,
"text": "iobroker_phpmyadmin_1",
"value": "iobroker_phpmyadmin_1"
},
{
"selected": false,
"text": "iobroker_vacuum_img_1",
"value": "iobroker_vacuum_img_1"
},
{
"selected": false,
"text": "monitor_cadvisor_1",
"value": "monitor_cadvisor_1"
},
{
"selected": false,
"text": "monitor_exporter_1",
"value": "monitor_exporter_1"
},
{
"selected": false,
"text": "monitor_prometheus_1",
"value": "monitor_prometheus_1"
},
{
"selected": false,
"text": "mosquitto_app_1",
"value": "mosquitto_app_1"
},
{
"selected": false,
"text": "portainer_app_1",
"value": "portainer_app_1"
},
{
"selected": false,
"text": "portainer_nginx_1",
"value": "portainer_nginx_1"
},
{
"selected": false,
"text": "tt-rss_app_1",
"value": "tt-rss_app_1"
},
{
"selected": false,
"text": "tt-rss_db_1",
"value": "tt-rss_db_1"
},
{
"selected": false,
"text": "tt-rss_updater_1",
"value": "tt-rss_updater_1"
},
{
"selected": false,
"text": "tt-rss_web-nginx_1",
"value": "tt-rss_web-nginx_1"
},
{
"selected": false,
"text": "wallabag_app_1",
"value": "wallabag_app_1"
},
{
"selected": false,
"text": "wallabag_db_1",
"value": "wallabag_db_1"
},
{
"selected": false,
"text": "wallabag_nginx_1",
"value": "wallabag_nginx_1"
},
{
"selected": false,
"text": "wallabag_phpmyadmin_1",
"value": "wallabag_phpmyadmin_1"
},
{
"selected": false,
"text": "wallabag_redis_1",
"value": "wallabag_redis_1"
},
{
"selected": false,
"text": "zigbee2mqtt_app_1",
"value": "zigbee2mqtt_app_1"
}
],
"query": "label_values(container_cpu_user_seconds_total{instance=~\"$host:.*\"}, name)",
"refresh": 0,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {
"selected": false,
"text": "All",
"value": "$__all"
},
"datasource": "Prometheus",
"definition": "label_values(container_cpu_user_seconds_total{instance=~\"$host:.*\"}, container_label_com_docker_compose_project)",
"hide": 2,
"includeAll": true,
"label": "Compose",
"multi": true,
"name": "compose",
"options": [
{
"selected": true,
"text": "All",
"value": "$__all"
},
{
"selected": false,
"text": "acmesh",
"value": "acmesh"
},
{
"selected": false,
"text": "ddns-updater",
"value": "ddns-updater"
},
{
"selected": false,
"text": "dhcpd",
"value": "dhcpd"
},
{
"selected": false,
"text": "dns",
"value": "dns"
},
{
"selected": false,
"text": "gq-gmc-service",
"value": "gq-gmc-service"
},
{
"selected": false,
"text": "grafana",
"value": "grafana"
},
{
"selected": false,
"text": "iobroker",
"value": "iobroker"
},
{
"selected": false,
"text": "monitor",
"value": "monitor"
},
{
"selected": false,
"text": "mosquitto",
"value": "mosquitto"
},
{
"selected": false,
"text": "portainer",
"value": "portainer"
},
{
"selected": false,
"text": "tt-rss",
"value": "tt-rss"
},
{
"selected": false,
"text": "wallabag",
"value": "wallabag"
},
{
"selected": false,
"text": "zigbee2mqtt",
"value": "zigbee2mqtt"
}
],
"query": "label_values(container_cpu_user_seconds_total{instance=~\"$host:.*\"}, container_label_com_docker_compose_project)",
"refresh": 0,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
"time": {
"from": "now-3h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "browser",
"title": "Docker monitoring",
"uid": "HYpsawWRz",
"version": 26
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment