feat(wireguard): add status timeline graph and uptime timer to grafana dashboard
This commit is contained in:
parent
ecdc27b155
commit
d3cc3b896a
|
|
@ -15,7 +15,7 @@ data:
|
|||
"tags": ["network", "vpn", "infrastructure", "prometheus"],
|
||||
"timezone": "browser",
|
||||
"schemaVersion": 39,
|
||||
"version": 2,
|
||||
"version": 3,
|
||||
"refresh": "10s",
|
||||
"editable": false,
|
||||
"graphTooltip": 2,
|
||||
|
|
@ -34,7 +34,7 @@ data:
|
|||
"title": "Exporter Status",
|
||||
"type": "stat",
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"gridPos": {"h": 4, "w": 6, "x": 0, "y": 1},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 0, "y": 1},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
|
|
@ -57,7 +57,7 @@ data:
|
|||
"title": "Interface wg0",
|
||||
"type": "stat",
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"gridPos": {"h": 4, "w": 6, "x": 6, "y": 1},
|
||||
"gridPos": {"h": 4, "w": 5, "x": 4, "y": 1},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
|
|
@ -76,11 +76,32 @@ data:
|
|||
{"expr": "count(wireguard_sent_bytes_total{interface=\"wg0\"}) or on() vector(0)", "legendFormat": "wg0 Status", "refId": "A"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Tunnel Uptime",
|
||||
"type": "stat",
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"gridPos": {"h": 4, "w": 5, "x": 9, "y": 1},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s",
|
||||
"color": {"mode": "fixed", "fixedColor": "blue"}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"graphMode": "none",
|
||||
"colorMode": "value",
|
||||
"textMode": "auto",
|
||||
"reduceOptions": {"values": false, "calcs": ["lastNotNull"]}
|
||||
},
|
||||
"targets": [
|
||||
{"expr": "time() - kube_pod_start_time{namespace=\"wireguard\", pod=~\"wireguard-.*\"}", "legendFormat": "Uptime", "refId": "A"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "FritzBox Peer Status",
|
||||
"type": "stat",
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"gridPos": {"h": 4, "w": 6, "x": 12, "y": 1},
|
||||
"gridPos": {"h": 4, "w": 5, "x": 14, "y": 1},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
|
|
@ -103,7 +124,7 @@ data:
|
|||
"title": "FritzBox Last Handshake",
|
||||
"type": "stat",
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"gridPos": {"h": 4, "w": 6, "x": 18, "y": 1},
|
||||
"gridPos": {"h": 4, "w": 5, "x": 19, "y": 1},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s",
|
||||
|
|
@ -128,17 +149,43 @@ data:
|
|||
{"expr": "time() - wireguard_latest_handshake_seconds{interface=\"wg0\"}", "legendFormat": "Handshake Delay", "refId": "A"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Interface Status Timeline",
|
||||
"type": "state-timeline",
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"gridPos": {"h": 4, "w": 24, "x": 0, "y": 5},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
{"type": "value", "options": {"0": {"text": "DOWN", "color": "red"}, "1": {"text": "UP", "color": "green"}}}
|
||||
],
|
||||
"color": {"mode": "thresholds"},
|
||||
"custom": {
|
||||
"fillOpacity": 70,
|
||||
"lineWidth": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"showValue": "never",
|
||||
"tooltip": {"mode": "single"},
|
||||
"legend": {"showLegend": true, "displayMode": "list"}
|
||||
},
|
||||
"targets": [
|
||||
{"expr": "count(wireguard_sent_bytes_total{interface=\"wg0\"}) or on() vector(0)", "legendFormat": "wg0 Status", "refId": "A"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "📊 Traffic & Performance",
|
||||
"type": "row",
|
||||
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 5},
|
||||
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 9},
|
||||
"collapsed": false
|
||||
},
|
||||
{
|
||||
"title": "FritzBox Traffic Rate",
|
||||
"type": "timeseries",
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 6},
|
||||
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 10},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "Bps",
|
||||
|
|
@ -177,7 +224,7 @@ data:
|
|||
"title": "Total Data Transferred",
|
||||
"type": "stat",
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"gridPos": {"h": 5, "w": 12, "x": 0, "y": 16},
|
||||
"gridPos": {"h": 5, "w": 12, "x": 0, "y": 20},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "bytes",
|
||||
|
|
@ -199,7 +246,7 @@ data:
|
|||
"title": "Handshake Delay History",
|
||||
"type": "timeseries",
|
||||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||||
"gridPos": {"h": 5, "w": 12, "x": 12, "y": 16},
|
||||
"gridPos": {"h": 5, "w": 12, "x": 12, "y": 20},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s",
|
||||
|
|
|
|||
Loading…
Reference in New Issue