Last active
February 22, 2023 10:06
-
-
Save mfominov/4d2eb96f8b464781af171af3581794e6 to your computer and use it in GitHub Desktop.
wireguard dashboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": { | |
"type": "datasource", | |
"uid": "grafana" | |
}, | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", | |
"target": { | |
"limit": 100, | |
"matchAny": false, | |
"tags": [], | |
"type": "dashboard" | |
}, | |
"type": "dashboard" | |
} | |
] | |
}, | |
"editable": true, | |
"fiscalYearStartMonth": 0, | |
"graphTooltip": 0, | |
"id": 5, | |
"links": [], | |
"liveNow": false, | |
"panels": [ | |
{ | |
"columns": [ | |
{ | |
"$$hashKey": "object:85", | |
"text": "Current", | |
"value": "current" | |
} | |
], | |
"datasource": { | |
"type": "prometheus", | |
"uid": "_hGqVG17z" | |
}, | |
"fontSize": "100%", | |
"gridPos": { | |
"h": 8, | |
"w": 12, | |
"x": 0, | |
"y": 0 | |
}, | |
"id": 7, | |
"links": [], | |
"pluginVersion": "6.2.1", | |
"scroll": true, | |
"showHeader": true, | |
"sort": { | |
"col": 1, | |
"desc": false | |
}, | |
"styles": [ | |
{ | |
"$$hashKey": "object:313", | |
"alias": "", | |
"align": "auto", | |
"colorMode": "row", | |
"colors": [ | |
"rgba(50, 172, 45, 0.97)", | |
"rgba(237, 129, 40, 0.89)", | |
"rgba(245, 54, 54, 0.9)" | |
], | |
"dateFormat": "YYYY-MM-DD HH:mm:ss", | |
"decimals": 0, | |
"mappingType": 1, | |
"pattern": "Current", | |
"thresholds": [ | |
"3600", | |
"172800" | |
], | |
"type": "number", | |
"unit": "s" | |
} | |
], | |
"targets": [ | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "_hGqVG17z" | |
}, | |
"editorMode": "code", | |
"exemplar": true, | |
"expr": "time() - (wireguard_latest_handshake_seconds{friendly_name=~\"$friendly_name\"} != 0)", | |
"format": "time_series", | |
"interval": "", | |
"intervalFactor": 1, | |
"legendFormat": "{{friendly_name}}", | |
"range": true, | |
"refId": "A" | |
} | |
], | |
"title": "Last handshake", | |
"transform": "timeseries_aggregations", | |
"type": "table-old" | |
}, | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "_hGqVG17z" | |
}, | |
"fieldConfig": { | |
"defaults": { | |
"color": { | |
"mode": "palette-classic" | |
}, | |
"custom": { | |
"axisCenteredZero": false, | |
"axisColorMode": "text", | |
"axisLabel": "", | |
"axisPlacement": "auto", | |
"barAlignment": 0, | |
"drawStyle": "line", | |
"fillOpacity": 10, | |
"gradientMode": "none", | |
"hideFrom": { | |
"legend": false, | |
"tooltip": false, | |
"viz": false | |
}, | |
"lineInterpolation": "linear", | |
"lineWidth": 2, | |
"pointSize": 5, | |
"scaleDistribution": { | |
"type": "linear" | |
}, | |
"showPoints": "never", | |
"spanNulls": false, | |
"stacking": { | |
"group": "A", | |
"mode": "none" | |
}, | |
"thresholdsStyle": { | |
"mode": "off" | |
} | |
}, | |
"links": [], | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "red", | |
"value": 80 | |
} | |
] | |
}, | |
"unit": "Bps" | |
}, | |
"overrides": [ | |
{ | |
"matcher": { | |
"id": "byName", | |
"options": "sent 10.70.0.2" | |
}, | |
"properties": [ | |
{ | |
"id": "color", | |
"value": { | |
"fixedColor": "green", | |
"mode": "fixed" | |
} | |
} | |
] | |
} | |
] | |
}, | |
"gridPos": { | |
"h": 8, | |
"w": 12, | |
"x": 12, | |
"y": 0 | |
}, | |
"id": 4, | |
"links": [], | |
"options": { | |
"legend": { | |
"calcs": [ | |
"mean", | |
"max" | |
], | |
"displayMode": "table", | |
"placement": "right", | |
"showLegend": true | |
}, | |
"tooltip": { | |
"mode": "multi", | |
"sort": "none" | |
} | |
}, | |
"pluginVersion": "8.5.16", | |
"targets": [ | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "_hGqVG17z" | |
}, | |
"editorMode": "code", | |
"exemplar": true, | |
"expr": "irate(wireguard_received_bytes_total{friendly_name=~\"$friendly_name\"}[$__interval])", | |
"format": "time_series", | |
"instant": false, | |
"interval": "", | |
"intervalFactor": 1, | |
"legendFormat": "received {{friendly_name}}", | |
"refId": "A" | |
}, | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "_hGqVG17z" | |
}, | |
"exemplar": true, | |
"expr": "-irate(wireguard_sent_bytes_total{friendly_name=~\"$friendly_name\"}[5m])", | |
"format": "time_series", | |
"interval": "", | |
"intervalFactor": 1, | |
"legendFormat": "sent {{friendly_name}}", | |
"refId": "B" | |
} | |
], | |
"title": "Throughput", | |
"transparent": true, | |
"type": "timeseries" | |
}, | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "_hGqVG17z" | |
}, | |
"fieldConfig": { | |
"defaults": { | |
"color": { | |
"mode": "palette-classic" | |
}, | |
"custom": { | |
"axisCenteredZero": false, | |
"axisColorMode": "text", | |
"axisLabel": "", | |
"axisPlacement": "auto", | |
"barAlignment": 0, | |
"drawStyle": "line", | |
"fillOpacity": 10, | |
"gradientMode": "none", | |
"hideFrom": { | |
"legend": false, | |
"tooltip": false, | |
"viz": false | |
}, | |
"lineInterpolation": "smooth", | |
"lineWidth": 2, | |
"pointSize": 5, | |
"scaleDistribution": { | |
"type": "linear" | |
}, | |
"showPoints": "never", | |
"spanNulls": false, | |
"stacking": { | |
"group": "A", | |
"mode": "none" | |
}, | |
"thresholdsStyle": { | |
"mode": "off" | |
} | |
}, | |
"links": [], | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "red", | |
"value": 80 | |
} | |
] | |
}, | |
"unit": "bytes" | |
}, | |
"overrides": [ | |
{ | |
"matcher": { | |
"id": "byName", | |
"options": "sent 10.70.0.2" | |
}, | |
"properties": [ | |
{ | |
"id": "color", | |
"value": { | |
"fixedColor": "green", | |
"mode": "fixed" | |
} | |
} | |
] | |
} | |
] | |
}, | |
"gridPos": { | |
"h": 10, | |
"w": 24, | |
"x": 0, | |
"y": 8 | |
}, | |
"id": 9, | |
"links": [], | |
"options": { | |
"legend": { | |
"calcs": [ | |
"mean", | |
"max", | |
"sum" | |
], | |
"displayMode": "table", | |
"placement": "right", | |
"showLegend": true, | |
"sortBy": "Total", | |
"sortDesc": true | |
}, | |
"tooltip": { | |
"mode": "multi", | |
"sort": "none" | |
} | |
}, | |
"pluginVersion": "8.5.16", | |
"targets": [ | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "_hGqVG17z" | |
}, | |
"editorMode": "code", | |
"exemplar": false, | |
"expr": "sum (increase(wireguard_sent_bytes_total{friendly_name=~\"$friendly_name\"}[$__interval])) by (friendly_name)", | |
"format": "time_series", | |
"instant": false, | |
"interval": "", | |
"intervalFactor": 1, | |
"legendFormat": "{{friendly_name}}", | |
"range": true, | |
"refId": "A" | |
} | |
], | |
"title": "Traffic by User", | |
"transparent": true, | |
"type": "timeseries" | |
}, | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "_hGqVG17z" | |
}, | |
"fieldConfig": { | |
"defaults": { | |
"color": { | |
"mode": "palette-classic" | |
}, | |
"custom": { | |
"axisCenteredZero": false, | |
"axisColorMode": "text", | |
"axisLabel": "", | |
"axisPlacement": "auto", | |
"barAlignment": 0, | |
"drawStyle": "line", | |
"fillOpacity": 10, | |
"gradientMode": "none", | |
"hideFrom": { | |
"legend": false, | |
"tooltip": false, | |
"viz": false | |
}, | |
"lineInterpolation": "linear", | |
"lineWidth": 2, | |
"pointSize": 5, | |
"scaleDistribution": { | |
"type": "linear" | |
}, | |
"showPoints": "never", | |
"spanNulls": false, | |
"stacking": { | |
"group": "A", | |
"mode": "none" | |
}, | |
"thresholdsStyle": { | |
"mode": "off" | |
} | |
}, | |
"links": [], | |
"mappings": [], | |
"thresholds": { | |
"mode": "absolute", | |
"steps": [ | |
{ | |
"color": "green", | |
"value": null | |
}, | |
{ | |
"color": "red", | |
"value": 80 | |
} | |
] | |
}, | |
"unit": "bytes" | |
}, | |
"overrides": [ | |
{ | |
"matcher": { | |
"id": "byName", | |
"options": "sent 10.70.0.2" | |
}, | |
"properties": [ | |
{ | |
"id": "color", | |
"value": { | |
"fixedColor": "green", | |
"mode": "fixed" | |
} | |
} | |
] | |
} | |
] | |
}, | |
"gridPos": { | |
"h": 10, | |
"w": 24, | |
"x": 0, | |
"y": 18 | |
}, | |
"id": 8, | |
"links": [], | |
"options": { | |
"legend": { | |
"calcs": [ | |
"mean", | |
"max", | |
"sum" | |
], | |
"displayMode": "table", | |
"placement": "right", | |
"showLegend": true | |
}, | |
"tooltip": { | |
"mode": "multi", | |
"sort": "none" | |
} | |
}, | |
"pluginVersion": "8.5.16", | |
"targets": [ | |
{ | |
"datasource": { | |
"type": "prometheus", | |
"uid": "_hGqVG17z" | |
}, | |
"editorMode": "code", | |
"exemplar": true, | |
"expr": "sum(increase(wireguard_sent_bytes_total[$__interval]))", | |
"format": "time_series", | |
"instant": false, | |
"interval": "", | |
"intervalFactor": 1, | |
"legendFormat": "Total WG traffic", | |
"refId": "A" | |
} | |
], | |
"title": "Traffic", | |
"transparent": true, | |
"type": "timeseries" | |
} | |
], | |
"refresh": false, | |
"revision": 1, | |
"schemaVersion": 38, | |
"style": "dark", | |
"tags": [ | |
"prometheus", | |
"network" | |
], | |
"templating": { | |
"list": [ | |
{ | |
"current": { | |
"selected": true, | |
"text": [ | |
"All" | |
], | |
"value": [ | |
"$__all" | |
] | |
}, | |
"datasource": { | |
"type": "prometheus", | |
"uid": "_hGqVG17z" | |
}, | |
"definition": "label_values(wireguard_latest_handshake_seconds,friendly_name)", | |
"hide": 0, | |
"includeAll": true, | |
"label": "VPN User", | |
"multi": true, | |
"name": "friendly_name", | |
"options": [], | |
"query": { | |
"query": "label_values(wireguard_latest_handshake_seconds,friendly_name)", | |
"refId": "StandardVariableQuery" | |
}, | |
"refresh": 2, | |
"regex": "", | |
"skipUrlSync": false, | |
"sort": 0, | |
"type": "query" | |
} | |
] | |
}, | |
"time": { | |
"from": "2023-01-31T21:00:00.000Z", | |
"to": "2023-02-22T20:59:59.000Z" | |
}, | |
"timepicker": { | |
"refresh_intervals": [ | |
"10s", | |
"30s", | |
"1m", | |
"5m", | |
"15m", | |
"30m", | |
"1h", | |
"2h", | |
"1d" | |
], | |
"time_options": [ | |
"5m", | |
"15m", | |
"1h", | |
"6h", | |
"12h", | |
"24h", | |
"2d", | |
"7d", | |
"30d" | |
] | |
}, | |
"timezone": "", | |
"title": "WireGuard", | |
"uid": "c0T_8RkZz", | |
"version": 24, | |
"weekStart": "" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment