Skip to content

Instantly share code, notes, and snippets.

@foosel
Last active February 7, 2024 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foosel/ec0b6355d1d0c3ab65ee4df79d795a73 to your computer and use it in GitHub Desktop.
Save foosel/ec0b6355d1d0c3ab65ee4df79d795a73 to your computer and use it in GitHub Desktop.
Panel JSON for my network monitoring visualizations as per https://foosel.net/blog/2021-03-28-homelab-uplink-monitoring
{
"alert": {
"alertRuleTags": {},
"conditions": [
{
"evaluator": {
"params": [
10000000
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"C",
"1h",
"now"
]
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
},
{
"evaluator": {
"params": [
35
],
"type": "lt"
},
"operator": {
"type": "or"
},
"query": {
"params": [
"D",
"1h",
"now"
]
},
"reducer": {
"params": [],
"type": "max"
},
"type": "query"
},
{
"evaluator": {
"params": [
250
],
"type": "lt"
},
"operator": {
"type": "or"
},
"query": {
"params": [
"C",
"1h",
"now"
]
},
"reducer": {
"params": [],
"type": "max"
},
"type": "query"
}
],
"executionErrorState": "alerting",
"for": "120m",
"frequency": "600s",
"handler": 1,
"name": "Bandwidth alert",
"noDataState": "no_data",
"notifications": []
},
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"fieldConfig": {
"defaults": {
"links": []
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 10,
"w": 12,
"x": 12,
"y": 0
},
"hiddenSeries": false,
"id": 23763571993,
"legend": {
"alignAsTable": false,
"avg": false,
"current": true,
"max": true,
"min": true,
"rightSide": false,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.1",
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"$$hashKey": "object:2577",
"alias": "Used download",
"bars": true,
"lines": false
},
{
"$$hashKey": "object:2578",
"alias": "Used upload",
"bars": true,
"lines": false,
"transform": "negative-Y"
},
{
"$$hashKey": "object:2579",
"alias": "Max download",
"dashLength": 5,
"dashes": true,
"fill": 0,
"legend": false,
"linewidth": 2,
"spaceLength": 5
},
{
"$$hashKey": "object:2580",
"alias": "Max upload",
"dashLength": 5,
"dashes": true,
"fill": 0,
"legend": false,
"linewidth": 2,
"spaceLength": 5,
"transform": "negative-Y"
},
{
"$$hashKey": "object:2581",
"alias": "Speedtest upload",
"transform": "negative-Y"
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "Speedtest download",
"groupBy": [
{
"params": [
"1h"
],
"type": "time"
},
{
"params": [
"previous"
],
"type": "fill"
}
],
"measurement": "Mbit/s",
"orderByTime": "ASC",
"policy": "default",
"refId": "C",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "max"
}
]
],
"tags": [
{
"key": "entity_id",
"operator": "=",
"value": "speedtest_download"
}
]
},
{
"alias": "Speedtest upload",
"groupBy": [
{
"params": [
"1h"
],
"type": "time"
},
{
"params": [
"previous"
],
"type": "fill"
}
],
"measurement": "Mbit/s",
"orderByTime": "ASC",
"policy": "default",
"refId": "D",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "max"
}
]
],
"tags": [
{
"key": "entity_id",
"operator": "=",
"value": "speedtest_upload"
}
]
},
{
"alias": "Used download",
"groupBy": [
{
"params": [
"1h"
],
"type": "time"
},
{
"params": [
"previous"
],
"type": "fill"
}
],
"hide": false,
"measurement": "KB/s",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"* 8 / 1000"
],
"type": "math"
}
]
],
"tags": [
{
"key": "entity_id",
"operator": "=",
"value": "fritz_downstream_current"
}
]
},
{
"alias": "Used upload",
"groupBy": [
{
"params": [
"1h"
],
"type": "time"
},
{
"params": [
"previous"
],
"type": "fill"
}
],
"hide": false,
"measurement": "KB/s",
"orderByTime": "ASC",
"policy": "default",
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
},
{
"params": [
"* 8 / 1000"
],
"type": "math"
}
]
],
"tags": [
{
"key": "entity_id",
"operator": "=",
"value": "fritz_upstream_current"
}
]
}
],
"thresholds": [
{
"value": 10000000,
"op": "gt",
"visible": true,
"fill": true,
"line": true,
"colorMode": "critical"
}
],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Bandwidth",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:1207",
"decimals": null,
"format": "Mbits",
"label": "",
"logBase": 1,
"max": "550",
"min": "-60",
"show": true
},
{
"$$hashKey": "object:1208",
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": false
}
],
"yaxis": {
"align": false,
"alignLevel": null
},
"datasource": null
}
{
"alert": {
"alertRuleTags": {},
"conditions": [
{
"evaluator": {
"params": [
500000
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"B",
"1h",
"now"
]
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
},
{
"evaluator": {
"params": [
25
],
"type": "gt"
},
"operator": {
"type": "or"
},
"query": {
"params": [
"A",
"10m",
"now"
]
},
"reducer": {
"params": [],
"type": "max"
},
"type": "query"
}
],
"executionErrorState": "alerting",
"for": "0m",
"frequency": "60s",
"handler": 1,
"name": "External ping alert",
"noDataState": "alerting",
"notifications": []
},
"aliasColors": {},
"dashLength": 10,
"datasource": "InfluxDB infping",
"fieldConfig": {
"defaults": {
"links": [],
"unit": "ms"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Loss"
},
"properties": [
{
"id": "unit",
"value": "percent"
}
]
}
]
},
"gridPos": {
"h": 10,
"w": 12,
"x": 0,
"y": 10
},
"id": 23763571993,
"legend": {
"alignAsTable": false,
"avg": false,
"current": true,
"max": true,
"min": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"pluginVersion": "7.5.1",
"pointradius": 5,
"renderer": "flot",
"seriesOverrides": [
{
"$$hashKey": "object:3685",
"alias": "Loss",
"bars": true,
"color": "#C4162A",
"lines": false,
"yaxis": 2
}
],
"spaceLength": 10,
"targets": [
{
"alias": "Google DNS",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"previous"
],
"type": "fill"
}
],
"measurement": "ping",
"orderByTime": "ASC",
"policy": "default",
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"avg"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "rx_host",
"operator": "=",
"value": "8.8.8.8"
}
]
},
{
"alias": "Cloudflare DNS",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"previous"
],
"type": "fill"
}
],
"measurement": "ping",
"orderByTime": "ASC",
"policy": "default",
"refId": "C",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"avg"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "rx_host",
"operator": "=",
"value": "1.1.1.1"
}
]
},
{
"alias": "QuadNine DNS",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"previous"
],
"type": "fill"
}
],
"measurement": "ping",
"orderByTime": "ASC",
"policy": "default",
"refId": "D",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"avg"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "rx_host",
"operator": "=",
"value": "9.9.9.9"
}
]
},
{
"alias": "Loss",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT mean(\"loss\") FROM \"ping\" WHERE (\"rx_host\" = '8.8.8.8' OR \"rx_host\" = '8.8.4.4' OR \"rx_host\" = '1.1.1.1' OR \"rx_host\" = '1.0.0.1' OR \"rx_host\" = '9.9.9.9') AND $timeFilter GROUP BY time($__interval) fill(null)",
"rawQuery": true,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": []
}
],
"thresholds": [
{
"value": 500000,
"op": "gt",
"visible": true,
"fill": true,
"line": true,
"colorMode": "critical"
}
],
"timeRegions": [],
"title": "Ping external",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"$$hashKey": "object:3667",
"format": "ms",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"$$hashKey": "object:3668",
"format": "percent",
"label": null,
"logBase": 1,
"max": "100",
"min": "0",
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
},
"bars": false,
"dashes": false,
"fill": 0,
"fillGradient": 0,
"hiddenSeries": false,
"percentage": false,
"points": false,
"stack": false,
"steppedLine": false,
"timeFrom": null,
"timeShift": null
}
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "InfluxDB infping",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 23763571993,
"legend": {
"alignAsTable": false,
"avg": true,
"current": true,
"max": true,
"min": true,
"rightSide": false,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"maxPerRow": 2,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.5.1",
"pointradius": 5,
"points": false,
"renderer": "flot",
"repeat": "host",
"repeatDirection": "h",
"seriesOverrides": [
{
"$$hashKey": "object:1891",
"alias": "loss",
"bars": true,
"color": "#bf1b00",
"lines": false,
"pointradius": 1,
"points": true,
"yaxis": 2
},
{
"$$hashKey": "object:1892",
"alias": "max",
"color": "#6ed0e0",
"fillBelowTo": "min",
"lines": false
},
{
"$$hashKey": "object:1893",
"alias": "min",
"lines": false
},
{
"$$hashKey": "object:1894",
"alias": "avg",
"color": "#cffaff",
"fill": 0
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "min",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"previous"
],
"type": "fill"
}
],
"measurement": "ping",
"orderByTime": "ASC",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"min"
],
"type": "field"
},
{
"params": [],
"type": "min"
}
]
],
"tags": [
{
"key": "rx_host",
"operator": "=",
"value": "$host"
}
]
},
{
"alias": "avg",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"previous"
],
"type": "fill"
}
],
"measurement": "ping",
"orderByTime": "ASC",
"policy": "default",
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"avg"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "rx_host",
"operator": "=",
"value": "$host"
}
]
},
{
"alias": "max",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"previous"
],
"type": "fill"
}
],
"measurement": "ping",
"orderByTime": "ASC",
"policy": "default",
"refId": "C",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"max"
],
"type": "field"
},
{
"params": [],
"type": "max"
}
]
],
"tags": [
{
"key": "rx_host",
"operator": "=",
"value": "$host"
}
]
},
{
"alias": "loss",
"groupBy": [
{
"params": [
"$__interval"
],
"type": "time"
},
{
"params": [
"previous"
],
"type": "fill"
}
],
"measurement": "ping",
"orderByTime": "ASC",
"policy": "default",
"refId": "D",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"loss"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": [
{
"key": "rx_host",
"operator": "=",
"value": "$host"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "$host",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "ms",
"label": null,
"logBase": 10,
"max": null,
"min": "0",
"show": true
},
{
"format": "percent",
"label": null,
"logBase": 1,
"max": "100",
"min": ".00001",
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
},
"scopedVars": {
"host": {
"selected": false,
"text": "1.0.0.1",
"value": "1.0.0.1"
}
}
}
@ccamacho
Copy link

ccamacho commented Feb 7, 2024

@foosel do you have by any chance some mock data for influxdb to make the panels to work?

@foosel
Copy link
Author

foosel commented Feb 7, 2024

Sorry, no

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment