updated repo with the latest dashboards

This commit is contained in:
blat 2022-08-10 15:44:31 +02:00
parent 55691e1f2f
commit cea89884b9
4 changed files with 4065 additions and 4003 deletions

37
README.md Normal file
View file

@ -0,0 +1,37 @@
# Grafana Dashboards for openwrt-libremesh devices
## A scrape configuration containing the tags `group` and `host`
Esempio dal file di configurazione di prometheus /etc/prometheus/prometheus.yml con le etichette host e group
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['10.170.x.x:9090']
labels:
host: 'ninux-59a9ea'
group: 'mesh_stations'
- targets: ['10.170.x.x:9090']
labels:
host: 'stercoraro'
group: 'mesh_routers'
- targets: ['10.170.x.x:9090']
labels:
host: 'cervo-volante'
group: 'home_routers'
## Collector Configuration Details
Al momento stiamo suddividendo gli host in 3 gruppi `mesh_routers`, `mesh_stations`, `home_routers`, per poi filtrare più comodamente le metriche (e.g. non mostrare l'attività wireless dei router ma solo quella delle antenne)
Manteniamo monitorati alcuni home_routers nel caso per esempio questi siano direttamente connessi ad un gateway per avere un'informazione in più sul carico complessivo del gateway, e per avere riscontro delle informazioni del gateway relative all'interfaccia fisica corrispondente al collegamento con l'home_router.
## Alcuni riferimenti
https://docs.victoriametrics.com/MetricsQL.html
https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html
https://valyala.medium.com/promql-tutorial-for-beginners-9ab455142085

View file

@ -1,734 +0,0 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "Prometheus croara",
"enable": false,
"expr": "ALERTS",
"hide": false,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"step": "60s",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
},
{
"datasource": null,
"enable": false,
"expr": "node_boot_time_seconds{host=~\"$name\"} * 1000",
"iconColor": "red",
"name": "mark reboots",
"titleFormat": "",
"useValueForTime": false
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 41,
"iteration": 1651791125117,
"links": [],
"panels": [
{
"alert": {
"alertRuleTags": {},
"conditions": [
{
"evaluator": {
"params": [
1
],
"type": "lt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"A",
"5m",
"now"
]
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
}
],
"executionErrorState": "alerting",
"for": "5m",
"frequency": "1m",
"handler": 1,
"name": "Down - Croara",
"noDataState": "no_data",
"notifications": []
},
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "green",
"value": 1
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 0
},
"id": 680,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"pluginVersion": "8.1.8",
"targets": [
{
"exemplar": true,
"expr": "up{group=\"mesh_stations\"}",
"format": "time_series",
"instant": false,
"interval": "",
"legendFormat": "{{host}} - {{instance}}",
"refId": "A"
}
],
"thresholds": [
{
"colorMode": "critical",
"op": "lt",
"value": 1,
"visible": true
}
],
"title": "Down - Croara",
"type": "timeseries"
},
{
"alert": {
"alertRuleTags": {},
"conditions": [
{
"evaluator": {
"params": [
1
],
"type": "lt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"A",
"5m",
"now"
]
},
"reducer": {
"params": [],
"type": "last"
},
"type": "query"
}
],
"executionErrorState": "alerting",
"for": "5m",
"frequency": "1m",
"handler": 1,
"message": "",
"name": "Down - Valsamoggia",
"noDataState": "no_data",
"notifications": []
},
"datasource": "Prometheus valsamoggia",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 0
},
"id": 682,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"exemplar": true,
"expr": "up{group=\"mesh_stations\"}",
"interval": "",
"legendFormat": "{{host}} - {{instance}}",
"refId": "A"
}
],
"thresholds": [
{
"colorMode": "critical",
"op": "lt",
"value": 1,
"visible": true
}
],
"title": "Down - Valsamoggia",
"type": "timeseries"
},
{
"alert": {
"alertRuleTags": {},
"conditions": [
{
"evaluator": {
"params": [
10
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"A",
"5m",
"now"
]
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
},
{
"evaluator": {
"params": [
10
],
"type": "gt"
},
"operator": {
"type": "or"
},
"query": {
"params": [
"B",
"5m",
"now"
]
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
}
],
"executionErrorState": "alerting",
"for": "5m",
"frequency": "1m",
"handler": 1,
"name": "Drops - Croara",
"noDataState": "no_data",
"notifications": []
},
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": -10
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 8
},
"id": 684,
"options": {
"legend": {
"calcs": [
"min",
"max",
"mean",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"exemplar": true,
"expr": "irate(node_network_receive_drop_total[5m])",
"hide": false,
"instant": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{host}} # {{device}} Receive Drops",
"refId": "A"
},
{
"exemplar": true,
"expr": "irate(node_network_transmit_drop_total[5m])",
"format": "time_series",
"hide": false,
"instant": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{host}} # {{device}} Trasmit Drops",
"refId": "B"
}
],
"thresholds": [
{
"colorMode": "critical",
"op": "gt",
"value": 10,
"visible": true
}
],
"title": "Drops - Croara",
"type": "timeseries"
},
{
"alert": {
"alertRuleTags": {},
"conditions": [
{
"evaluator": {
"params": [
10
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"A",
"5m",
"now"
]
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
},
{
"evaluator": {
"params": [
10
],
"type": "gt"
},
"operator": {
"type": "or"
},
"query": {
"params": [
"B",
"5m",
"now"
]
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
}
],
"executionErrorState": "alerting",
"for": "5m",
"frequency": "1m",
"handler": 1,
"name": "Drops - Valsamoggia",
"noDataState": "no_data",
"notifications": []
},
"datasource": "Prometheus valsamoggia",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": -10
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 8
},
"id": 686,
"options": {
"legend": {
"calcs": [
"min",
"max",
"mean",
"lastNotNull"
],
"displayMode": "table",
"placement": "bottom"
},
"tooltip": {
"mode": "single"
}
},
"targets": [
{
"exemplar": true,
"expr": "irate(node_network_receive_drop_total{device=\"eth0\"}[5m])",
"hide": false,
"instant": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{host}} # {{device}} Receive Drops",
"refId": "A"
},
{
"exemplar": true,
"expr": "irate(node_network_transmit_drop_total[5m])",
"format": "time_series",
"hide": false,
"instant": false,
"interval": "",
"intervalFactor": 2,
"legendFormat": "{{host}} # {{device}} Trasmit Drops",
"refId": "B"
}
],
"thresholds": [
{
"colorMode": "critical",
"op": "gt",
"value": 10,
"visible": true
}
],
"title": "Drops - Valsamoggia",
"type": "timeseries"
}
],
"refresh": false,
"schemaVersion": 30,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"description": null,
"error": null,
"hide": 2,
"label": "Job",
"name": "job",
"query": "prometheus",
"skipUrlSync": false,
"type": "constant"
},
{
"allValue": null,
"current": {
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": "${data_source}",
"definition": "label_values(node_uname_info{job=~\"$job\"}, host)",
"description": null,
"error": null,
"hide": 2,
"includeAll": true,
"label": "Host:",
"multi": true,
"name": "name",
"options": [],
"query": {
"query": "label_values(node_uname_info{job=~\"$job\"}, host)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 1,
"type": "query"
},
{
"allValue": null,
"current": {
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": "${data_source}",
"definition": "label_values(node_uname_info{nodename=~\"$name\"}, instance)",
"description": null,
"error": null,
"hide": 2,
"includeAll": true,
"label": "WIFI Host:",
"multi": true,
"name": "node",
"options": [],
"query": {
"query": "label_values(node_uname_info{nodename=~\"$name\"}, instance)",
"refId": "StandardVariableQuery"
},
"refresh": 1,
"regex": "/([^:]+):.*/",
"skipUrlSync": false,
"sort": 1,
"type": "query"
},
{
"current": {
"selected": false,
"text": "Prometheus valsamoggia",
"value": "Prometheus valsamoggia"
},
"description": "",
"error": null,
"hide": 0,
"includeAll": false,
"label": "Data source",
"multi": false,
"name": "data_source",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
},
"time": {
"from": "now-24h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Alert",
"uid": "m0Xg9FLnz_alert",
"version": 9
}

File diff suppressed because it is too large Load diff