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,
"gnetId": null,
"graphTooltip": 0,
"iteration": 1637358897801,
"iteration": 1638128079972,
"links": [],
"liveNow": false,
"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,
"fieldConfig": {
@ -81,7 +177,7 @@
"h": 8,
"w": 12,
"x": 0,
"y": 0
"y": 3
},
"id": 5,
"options": {
@ -102,7 +198,7 @@
"targets": [
{
"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,
"interval": "",
"legendFormat": "Traffic (forward)",
@ -110,21 +206,21 @@
},
{
"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": "",
"legendFormat": "Traffic (rx)",
"refId": "A"
},
{
"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,
"interval": "",
"legendFormat": "Traffic (tx)",
"refId": "C"
}
],
"title": "Traffic - $node_id - $hostname -",
"title": "Traffic",
"type": "timeseries"
},
{
@ -183,7 +279,7 @@
"h": 8,
"w": 12,
"x": 12,
"y": 0
"y": 3
},
"id": 2,
"options": {
@ -204,7 +300,7 @@
"targets": [
{
"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": "",
"legendFormat": "clients",
"refId": "A"
@ -239,143 +335,186 @@
"h": 7,
"w": 12,
"x": 0,
"y": 8
"y": 11
},
"id": 11,
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "center",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
{
"id": 11,
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 11
},
"text": {
"titleSize": 30
},
"textMode": "value_and_name"
},
"pluginVersion": "8.2.3",
"repeat": null,
"targets": [
{
"exemplar": true,
"expr": "increase(node_traffic.forward.bytes{nodeid=\"$node_id\"}[24h])",
"hide": false,
"interval": "",
"legendFormat": "forward 24h",
"refId": "A"
},
{
"exemplar": true,
"expr": "increase(node_traffic.rx.bytes{nodeid=\"$node_id\"}[24h])",
"interval": "",
"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"
"type": "stat",
"title": "Traffic",
"pluginVersion": "8.2.3",
"fieldConfig": {
"defaults": {
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"mappings": [],
"color": {
"mode": "thresholds"
},
"min": 0,
"unit": "bytes"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 2,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "always",
"spanNulls": 600000,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
"overrides": []
},
"options": {
"reduceOptions": {
"values": false,
"calcs": [
"lastNotNull"
],
"fields": ""
},
"orientation": "auto",
"text": {},
"textMode": "value_and_name",
"colorMode": "value",
"graphMode": "none",
"justifyMode": "center"
},
"targets": [
{
"expr": "max by (nodeid) (increase(node_traffic.forward.bytes{nodeid=\"$node_id\"}[1y]))",
"legendFormat": "forward 1y",
"interval": "",
"exemplar": true,
"hide": false,
"refId": "A",
"instant": true
},
{
"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,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 22,
"w": 12,
"x": 12,
"y": 8
}
],
"repeat": null,
"timeFrom": null,
"hideTimeOverride": false,
"interval": null,
"maxDataPoints": null,
"datasource": null
},
"id": 7,
"options": {
@ -396,7 +535,7 @@
"targets": [
{
"exemplar": true,
"expr": "link_tq{source.id=\"$node_id\"}",
"expr": "avg by (nodeid,target.id,target.hostname) (link_tq{source.id=\"$node_id\"})",
"interval": "",
"intervalFactor": 1,
"legendFormat": "to {{target.id}} {{target.hostname}}",
@ -406,68 +545,6 @@
"title": "Links zu anderen Knoten",
"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,
"fieldConfig": {
@ -548,7 +625,7 @@
"targets": [
{
"exemplar": true,
"expr": "node_load{nodeid=\"$node_id\"}",
"expr": "max by (nodeid) (node_load{nodeid=\"$node_id\"})",
"interval": "",
"intervalFactor": 10,
"legendFormat": "load",
@ -658,7 +735,7 @@
"targets": [
{
"exemplar": true,
"expr": "node_memory.total{nodeid=\"$node_id\"}",
"expr": "max by (nodeid) (node_memory.total{nodeid=\"$node_id\"})",
"interval": "",
"intervalFactor": 10,
"legendFormat": "total",
@ -666,7 +743,7 @@
},
{
"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,
"interval": "",
"legendFormat": "used",
@ -687,11 +764,11 @@
"allValue": null,
"current": {
"selected": false,
"text": "30b5c2cb6e20",
"value": "30b5c2cb6e20"
"text": "f4f26deaf460 - kirschberg4",
"value": "f4f26deaf460"
},
"datasource": null,
"definition": "label_values(nodeid)",
"definition": "query_result(label_join( max by (hostname,nodeid) (node_clients.total[1y]) , \"result\", \" - \", \"nodeid\", \"hostname\"))",
"description": null,
"error": null,
"hide": 0,
@ -701,51 +778,24 @@
"name": "node_id",
"options": [],
"query": {
"query": "label_values(nodeid)",
"query": "query_result(label_join( max by (hostname,nodeid) (node_clients.total[1y]) , \"result\", \" - \", \"nodeid\", \"hostname\"))",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"regex": "/nodeid=\"(?<value>[^\"]+)|result=\"(?<text>[^\"]+)/g",
"skipUrlSync": false,
"sort": 5,
"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": {
"from": "now-24h",
"from": "now-6M",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Node (public)",
"uid": "KoKOqJc7k",
"version": 14
"version": 25
}