Compare commits

...

2 Commits

Author SHA1 Message Date
Michael Wyraz 277db0e334 Improve dashboard 2021-11-28 21:07:28 +01:00
Michael Wyraz 8112426135 Better solution for node-id selector in grafana 2021-11-20 14:32:17 +01:00
1 changed files with 291 additions and 241 deletions

View File

@ -22,10 +22,106 @@
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"gnetId": null, "gnetId": null,
"graphTooltip": 0, "graphTooltip": 0,
"iteration": 1637358897801, "iteration": 1638128079972,
"links": [], "links": [],
"liveNow": false, "liveNow": false,
"panels": [ "panels": [
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 24,
"x": 0,
"y": 0
},
"id": 15,
"interval": null,
"links": [
{
"targetBlank": true,
"title": "Zur Karte",
"url": "../#!/de/map/$node_id"
}
],
"maxDataPoints": 1,
"options": {
"showHeader": true
},
"pluginVersion": "8.2.3",
"targets": [
{
"exemplar": true,
"expr": "max by (nodeid,hostname,firmware_base,firmware_release,model,owner,autoupdater) (node_time.up{nodeid=\"$node_id\"}[1y])",
"format": "table",
"instant": true,
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Knoteninformationen",
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true,
"Value": false
},
"indexByName": {
"Time": 5,
"Value": 7,
"autoupdater": 6,
"firmware_base": 3,
"firmware_release": 4,
"hostname": 1,
"model": 2,
"nodeid": 0
},
"renameByName": {
"Value": "Uptime",
"autoupdater": "Auto-Updater",
"firmware_base": "Firmware",
"firmware_release": "Version",
"hostname": "Hostname",
"model": "Modell",
"nodeid": " Node-ID",
"owner": "Kontakt"
}
}
}
],
"transparent": true,
"type": "table"
},
{ {
"datasource": null, "datasource": null,
"fieldConfig": { "fieldConfig": {
@ -81,7 +177,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 0 "y": 3
}, },
"id": 5, "id": 5,
"options": { "options": {
@ -102,7 +198,7 @@
"targets": [ "targets": [
{ {
"exemplar": true, "exemplar": true,
"expr": "max_over_time(irate(node_traffic.forward.bytes{nodeid=\"$node_id\"})[2m])", "expr": "max_over_time(irate(max by (nodeid) (node_traffic.forward.bytes{nodeid=\"$node_id\"})[2m]))",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "Traffic (forward)", "legendFormat": "Traffic (forward)",
@ -110,21 +206,21 @@
}, },
{ {
"exemplar": true, "exemplar": true,
"expr": "max_over_time(irate(node_traffic.rx.bytes{nodeid=\"$node_id\"})[2m])", "expr": "max_over_time(irate(max by (nodeid) (node_traffic.rx.bytes{nodeid=\"$node_id\"})[2m]))",
"interval": "", "interval": "",
"legendFormat": "Traffic (rx)", "legendFormat": "Traffic (rx)",
"refId": "A" "refId": "A"
}, },
{ {
"exemplar": true, "exemplar": true,
"expr": "max_over_time(irate(node_traffic.tx.bytes{nodeid=\"$node_id\"})[2m])", "expr": "max_over_time(irate(max by (nodeid) (node_traffic.tx.bytes{nodeid=\"$node_id\"})[2m]))",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "Traffic (tx)", "legendFormat": "Traffic (tx)",
"refId": "C" "refId": "C"
} }
], ],
"title": "Traffic - $node_id - $hostname -", "title": "Traffic",
"type": "timeseries" "type": "timeseries"
}, },
{ {
@ -183,7 +279,7 @@
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 0 "y": 3
}, },
"id": 2, "id": 2,
"options": { "options": {
@ -204,7 +300,7 @@
"targets": [ "targets": [
{ {
"exemplar": true, "exemplar": true,
"expr": "max_over_time(node_clients.total{nodeid=\"$node_id\"}[10m])", "expr": "max by (nodeid)(max_over_time(node_clients.total{nodeid=\"$node_id\"}[10m]))",
"interval": "", "interval": "",
"legendFormat": "clients", "legendFormat": "clients",
"refId": "A" "refId": "A"
@ -239,143 +335,186 @@
"h": 7, "h": 7,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 8 "y": 11
}, },
"id": 11, {
"options": { "id": 11,
"colorMode": "value", "gridPos": {
"graphMode": "none", "h": 7,
"justifyMode": "center", "w": 12,
"orientation": "auto", "x": 0,
"reduceOptions": { "y": 11
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
}, },
"text": { "type": "stat",
"titleSize": 30 "title": "Traffic",
}, "pluginVersion": "8.2.3",
"textMode": "value_and_name" "fieldConfig": {
}, "defaults": {
"pluginVersion": "8.2.3", "thresholds": {
"repeat": null, "mode": "absolute",
"targets": [ "steps": [
{ {
"exemplar": true, "color": "green",
"expr": "increase(node_traffic.forward.bytes{nodeid=\"$node_id\"}[24h])", "value": null
"hide": false, }
"interval": "", ]
"legendFormat": "forward 24h", },
"refId": "A" "mappings": [],
}, "color": {
{ "mode": "thresholds"
"exemplar": true, },
"expr": "increase(node_traffic.rx.bytes{nodeid=\"$node_id\"}[24h])", "min": 0,
"interval": "", "unit": "bytes"
"legendFormat": "rx 24h",
"refId": "B"
},
{
"exemplar": true,
"expr": "increase(node_traffic.tx.bytes{nodeid=\"$node_id\"}[24h])",
"hide": false,
"interval": "",
"legendFormat": "tx 24h",
"refId": "C"
},
{
"exemplar": true,
"expr": "increase(node_traffic.forward.bytes{nodeid=\"$node_id\"}[1h])",
"hide": false,
"interval": "",
"legendFormat": "forward 1h",
"refId": "D"
},
{
"exemplar": true,
"expr": "increase(node_traffic.rx.bytes{nodeid=\"$node_id\"}[1h])",
"hide": false,
"interval": "",
"legendFormat": "rx 1h",
"refId": "E"
},
{
"exemplar": true,
"expr": "increase(node_traffic.tx.bytes{nodeid=\"$node_id\"}[1h])",
"hide": false,
"interval": "",
"legendFormat": "tx 1h",
"refId": "F"
}
],
"title": "Traffic",
"type": "stat"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
}, },
"custom": { "overrides": []
"axisLabel": "", },
"axisPlacement": "auto", "options": {
"barAlignment": 0, "reduceOptions": {
"drawStyle": "line", "values": false,
"fillOpacity": 0, "calcs": [
"gradientMode": "none", "lastNotNull"
"hideFrom": { ],
"legend": false, "fields": ""
"tooltip": false, },
"viz": false "orientation": "auto",
}, "text": {},
"lineInterpolation": "linear", "textMode": "value_and_name",
"lineStyle": { "colorMode": "value",
"fill": "solid" "graphMode": "none",
}, "justifyMode": "center"
"lineWidth": 1, },
"pointSize": 2, "targets": [
"scaleDistribution": { {
"type": "linear" "expr": "max by (nodeid) (increase(node_traffic.forward.bytes{nodeid=\"$node_id\"}[1y]))",
}, "legendFormat": "forward 1y",
"showPoints": "always", "interval": "",
"spanNulls": 600000, "exemplar": true,
"stacking": { "hide": false,
"group": "A", "refId": "A",
"mode": "none" "instant": true
}, },
"thresholdsStyle": { {
"mode": "off" "expr": "max by (nodeid) (increase(node_traffic.rx.bytes{nodeid=\"$node_id\"}[1y]))",
"legendFormat": "rx 1y",
"interval": "",
"exemplar": true,
"refId": "B",
"instant": true
},
{
"expr": "max by (nodeid) (increase(node_traffic.tx.bytes{nodeid=\"$node_id\"}[1y]))",
"legendFormat": "tx 1y",
"interval": "",
"exemplar": true,
"hide": false,
"refId": "C",
"instant": true
},
{
"expr": "max by (nodeid) (increase(node_traffic.forward.bytes{nodeid=\"$node_id\"}[30d]))",
"legendFormat": "forward 30d",
"interval": "",
"exemplar": true,
"hide": false,
"refId": "D",
"instant": true
},
{
"expr": "max by (nodeid) (increase(node_traffic.rx.bytes{nodeid=\"$node_id\"}[30d]))",
"legendFormat": "rx 30d",
"interval": "",
"exemplar": true,
"hide": false,
"refId": "E",
"instant": true
},
{
"expr": "max by (nodeid) (increase(node_traffic.tx.bytes{nodeid=\"$node_id\"}[30d]))",
"legendFormat": "tx 30d",
"interval": "",
"exemplar": true,
"hide": false,
"refId": "F",
"instant": true
},
{
"expr": "max by (nodeid) (increase(node_traffic.forward.bytes{nodeid=\"$node_id\"}[24h]))",
"legendFormat": "forward 24h",
"interval": "",
"exemplar": true,
"hide": false,
"refId": "G",
"instant": true
},
{
"expr": "max by (nodeid) (increase(node_traffic.rx.bytes{nodeid=\"$node_id\"}[24h]))",
"legendFormat": "rx 24h",
"interval": "",
"exemplar": true,
"refId": "H",
"hide": false,
"instant": true
},
{
"expr": "max by (nodeid) (increase(node_traffic.tx.bytes{nodeid=\"$node_id\"}[24h]))",
"legendFormat": "tx 24h",
"interval": "",
"exemplar": true,
"hide": false,
"refId": "I",
"instant": true
},
{
"expr": "max by (nodeid) (increase(node_traffic.forward.bytes{nodeid=\"$node_id\"}[1h]))",
"legendFormat": "forward 1h",
"interval": "",
"exemplar": true,
"hide": false,
"refId": "J",
"instant": true
},
{
"expr": "max by (nodeid) (increase(node_traffic.rx.bytes{nodeid=\"$node_id\"}[1h]))",
"legendFormat": "rx 1h",
"interval": "",
"exemplar": true,
"hide": false,
"refId": "K",
"instant": true
},
{
"expr": "max by (nodeid) (increase(node_traffic.tx.bytes{nodeid=\"$node_id\"}[1h]))",
"legendFormat": "tx 1h",
"interval": "",
"exemplar": true,
"hide": false,
"refId": "L",
"instant": true
}
],
"transformations": [
{
"id": "seriesToRows",
"options": {}
},
{
"id": "rowsToFields",
"options": {
"mappings": [
{
"fieldName": "Time",
"handlerKey": "__ignore"
}
]
} }
}, }
"mappings": [], ],
"max": 100, "repeat": null,
"min": 0, "timeFrom": null,
"thresholds": { "hideTimeOverride": false,
"mode": "absolute", "interval": null,
"steps": [ "maxDataPoints": null,
{ "datasource": null
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 22,
"w": 12,
"x": 12,
"y": 8
}, },
"id": 7, "id": 7,
"options": { "options": {
@ -396,7 +535,7 @@
"targets": [ "targets": [
{ {
"exemplar": true, "exemplar": true,
"expr": "link_tq{source.id=\"$node_id\"}", "expr": "avg by (nodeid,target.id,target.hostname) (link_tq{source.id=\"$node_id\"})",
"interval": "", "interval": "",
"intervalFactor": 1, "intervalFactor": 1,
"legendFormat": "to {{target.id}} {{target.hostname}}", "legendFormat": "to {{target.id}} {{target.hostname}}",
@ -406,68 +545,6 @@
"title": "Links zu anderen Knoten", "title": "Links zu anderen Knoten",
"type": "timeseries" "type": "timeseries"
}, },
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"fixedColor": "dark-green",
"mode": "fixed"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 12,
"x": 0,
"y": 15
},
"id": 13,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "8.2.3",
"targets": [
{
"exemplar": true,
"expr": "vm_app_uptime_seconds{}",
"format": "time_series",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"title": "Uptime",
"type": "stat"
},
{ {
"datasource": null, "datasource": null,
"fieldConfig": { "fieldConfig": {
@ -548,7 +625,7 @@
"targets": [ "targets": [
{ {
"exemplar": true, "exemplar": true,
"expr": "node_load{nodeid=\"$node_id\"}", "expr": "max by (nodeid) (node_load{nodeid=\"$node_id\"})",
"interval": "", "interval": "",
"intervalFactor": 10, "intervalFactor": 10,
"legendFormat": "load", "legendFormat": "load",
@ -658,7 +735,7 @@
"targets": [ "targets": [
{ {
"exemplar": true, "exemplar": true,
"expr": "node_memory.total{nodeid=\"$node_id\"}", "expr": "max by (nodeid) (node_memory.total{nodeid=\"$node_id\"})",
"interval": "", "interval": "",
"intervalFactor": 10, "intervalFactor": 10,
"legendFormat": "total", "legendFormat": "total",
@ -666,7 +743,7 @@
}, },
{ {
"exemplar": true, "exemplar": true,
"expr": "node_memory.total{nodeid=\"$node_id\"}-node_memory.available{nodeid=\"$node_id\"}", "expr": "max by (nodeid) (node_memory.total{nodeid=\"$node_id\"}-node_memory.available{nodeid=\"$node_id\"})",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "used", "legendFormat": "used",
@ -687,11 +764,11 @@
"allValue": null, "allValue": null,
"current": { "current": {
"selected": false, "selected": false,
"text": "30b5c2cb6e20", "text": "f4f26deaf460 - kirschberg4",
"value": "30b5c2cb6e20" "value": "f4f26deaf460"
}, },
"datasource": null, "datasource": null,
"definition": "label_values(nodeid)", "definition": "query_result(label_join( max by (hostname,nodeid) (node_clients.total[1y]) , \"result\", \" - \", \"nodeid\", \"hostname\"))",
"description": null, "description": null,
"error": null, "error": null,
"hide": 0, "hide": 0,
@ -701,51 +778,24 @@
"name": "node_id", "name": "node_id",
"options": [], "options": [],
"query": { "query": {
"query": "label_values(nodeid)", "query": "query_result(label_join( max by (hostname,nodeid) (node_clients.total[1y]) , \"result\", \" - \", \"nodeid\", \"hostname\"))",
"refId": "StandardVariableQuery" "refId": "StandardVariableQuery"
}, },
"refresh": 1, "refresh": 1,
"regex": "", "regex": "/nodeid=\"(?<value>[^\"]+)|result=\"(?<text>[^\"]+)/g",
"skipUrlSync": false, "skipUrlSync": false,
"sort": 5, "sort": 5,
"type": "query" "type": "query"
},
{
"allValue": null,
"current": {
"selected": false,
"text": "BHC-West02-Outdoor",
"value": "BHC-West02-Outdoor"
},
"datasource": null,
"definition": "query_result( max by (hostname) (node_clients.total{nodeid=\"$node_id\"}[1y]) )",
"description": null,
"error": null,
"hide": 2,
"includeAll": false,
"label": null,
"multi": false,
"name": "hostname",
"options": [],
"query": {
"query": "query_result( max by (hostname) (node_clients.total{nodeid=\"$node_id\"}[1y]) )",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "/hostname=\"(?<value>[^\"]+)/g",
"skipUrlSync": false,
"sort": 0,
"type": "query"
} }
] ]
}, },
"time": { "time": {
"from": "now-24h", "from": "now-6M",
"to": "now" "to": "now"
}, },
"timepicker": {}, "timepicker": {},
"timezone": "", "timezone": "",
"title": "Node (public)", "title": "Node (public)",
"uid": "KoKOqJc7k", "uid": "KoKOqJc7k",
"version": 14 "version": 25
} }