Update Grafana dashboard to use new prometheus metrics for speedtest.

This commit is contained in:
Jeff Geerling 2021-03-23 15:45:54 -05:00
parent be6c2a9c3c
commit 4ee10eb715
2 changed files with 224 additions and 196 deletions

View File

@ -21,21 +21,38 @@
"panels": [
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"#299c46",
"rgba(237, 129, 40, 0.89)",
"#d44a3a"
],
"datasource": "prometheus",
"format": "none",
"gauge": {
"maxValue": 50,
"minValue": 0,
"show": true,
"thresholdLabels": false,
"thresholdMarkers": true
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {},
"mappings": [
{
"id": 0,
"op": "=",
"text": "N/A",
"type": 1,
"value": "null"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#299c46",
"value": null
},
{
"color": "blue",
"value": 100
}
]
},
"unit": "bps"
},
"overrides": []
},
"gridPos": {
"h": 9,
@ -46,76 +63,68 @@
"id": 8,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
"options": {
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"mean"
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
"fields": "",
"values": false
},
"tableColumn": "",
"showThresholdLabels": false,
"showThresholdMarkers": true,
"text": {}
},
"pluginVersion": "7.4.5",
"targets": [
{
"expr": "speedtest_bits_per_second{direction=\"downstream\"}",
"expr": "speedtest_download_bits_per_second{}",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "",
"refId": "A"
}
],
"thresholds": "25,40",
"title": "Download",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "avg"
"type": "gauge"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"#299c46",
"rgba(237, 129, 40, 0.89)",
"#d44a3a"
],
"datasource": "prometheus",
"format": "none",
"gauge": {
"maxValue": 20,
"minValue": 0,
"show": true,
"thresholdLabels": false,
"thresholdMarkers": true
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {},
"mappings": [
{
"id": 0,
"op": "=",
"text": "N/A",
"type": 1,
"value": "null"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "blue",
"value": 20
}
]
},
"unit": "bps"
},
"overrides": []
},
"gridPos": {
"h": 9,
@ -126,77 +135,69 @@
"id": 10,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
"options": {
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"mean"
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
"fields": "",
"values": false
},
"tableColumn": "",
"showThresholdLabels": false,
"showThresholdMarkers": true,
"text": {}
},
"pluginVersion": "7.4.5",
"targets": [
{
"expr": "speedtest_bits_per_second{direction=\"upstream\"}",
"expr": "speedtest_upload_bits_per_second{}",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "",
"refId": "A"
}
],
"thresholds": "5,10",
"title": "Upload",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "avg"
"type": "gauge"
},
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"#d44a3a",
"rgba(237, 129, 40, 0.89)",
"#299c46"
],
"datasource": "prometheus",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {},
"decimals": 2,
"format": "ms",
"gauge": {
"maxValue": 100,
"minValue": 0,
"show": true,
"thresholdLabels": false,
"thresholdMarkers": true
"mappings": [
{
"id": 0,
"op": "=",
"text": "N/A",
"type": 1,
"value": "null"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "ms"
},
"overrides": []
},
"gridPos": {
"h": 9,
@ -207,59 +208,34 @@
"id": 12,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
"options": {
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"mean"
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
"fields": "",
"values": false
},
"tableColumn": "",
"showThresholdLabels": false,
"showThresholdMarkers": true,
"text": {}
},
"pluginVersion": "7.4.5",
"targets": [
{
"expr": "speedtest_ping",
"expr": "speedtest_ping_latency_milliseconds",
"format": "time_series",
"instant": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "",
"refId": "A"
}
],
"thresholds": "",
"title": "speedtest ping",
"transparent": false,
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "avg"
"type": "gauge"
},
{
"aliasColors": {},
@ -267,13 +243,22 @@
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {},
"unit": "bps"
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 9
},
"hiddenSeries": false,
"id": 6,
"legend": {
"avg": false,
@ -288,7 +273,11 @@
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.4.5",
"pointradius": 5,
"points": false,
"renderer": "flot",
@ -299,15 +288,24 @@
"steppedLine": false,
"targets": [
{
"expr": "speedtest_bits_per_second{}",
"expr": "speedtest_download_bits_per_second{}",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{direction}}",
"legendFormat": "",
"refId": "A"
},
{
"expr": "speedtest_upload_bits_per_second{}",
"hide": false,
"interval": "",
"legendFormat": "",
"refId": "B"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "speedtest",
"tooltip": {
@ -325,7 +323,7 @@
},
"yaxes": [
{
"format": "short",
"format": "bps",
"label": null,
"logBase": 1,
"max": null,
@ -348,9 +346,10 @@
},
{
"cards": {
"cardHSpacing": 2,
"cardMinWidth": 5,
"cardRound": null,
"cardSpacing": 2
"cardVSpacing": 2
},
"color": {
"cardColor": "#b4ff00",
@ -361,11 +360,13 @@
"mode": "spectrum",
"thresholds": []
},
"data": {
"decimals": null,
"unitFormat": "short"
},
"datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 12,
@ -379,6 +380,11 @@
},
"links": [],
"nullPointMode": "as empty",
"pageSize": 15,
"seriesFilterIndex": -1,
"statusmap": {
"ConfigVersion": "v1"
},
"targets": [
{
"expr": "probe_success",
@ -391,20 +397,29 @@
],
"title": "Panel Title",
"tooltip": {
"show": true
"extraInfo": "",
"freezeOnClick": true,
"items": [],
"show": true,
"showExtraInfo": false,
"showItems": false
},
"type": "flant-statusmap-panel",
"useMax": true,
"usingPagination": false,
"xAxis": {
"labelFormat": "%a %m/%d",
"minBucketWidthToShowWeekends": 4,
"show": true,
"showCrosshair": true,
"showWeekends": true
"show": true
},
"yAxis": {
"show": true,
"showCrosshair": false
"maxWidth": -1,
"minWidth": -1,
"show": true
},
"yAxisSort": "metrics",
"yLabel": {
"delimiter": "",
"labelTemplate": "",
"usingSplitLabel": false
}
},
{
@ -413,13 +428,21 @@
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 9,
"w": 24,
"x": 0,
"y": 18
},
"hiddenSeries": false,
"id": 4,
"legend": {
"avg": false,
@ -433,9 +456,13 @@
"lines": true,
"linewidth": 1,
"links": [],
"minSpan": 2,
"maxPerRow": 12,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.4.5",
"pointradius": 5,
"points": false,
"renderer": "flot",
@ -456,6 +483,7 @@
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "http duration",
"tooltip": {
@ -495,7 +523,7 @@
}
}
],
"schemaVersion": 16,
"schemaVersion": 27,
"style": "dark",
"tags": [
"speedtest",
@ -505,7 +533,7 @@
"list": []
},
"time": {
"from": "now-24h",
"from": "now-30m",
"to": "now"
},
"timepicker": {
@ -536,5 +564,5 @@
"timezone": "browser",
"title": "internet connection",
"uid": "o9mIe_Aik",
"version": 8
"version": 1
}

View File

@ -1,8 +1,8 @@
- targets: # url;humanname;routing;switch
- http://google.com;google.com;external;internetbox
- http://github.com;github.com;external;internetbox
- https://blackdata.xam.dk:5001;blackdata.xam.dk;external;internetbox
- http://192.168.1.1;internetbox;local;internetbox
- http://192.168.1.42;blackdata;local;orbirouter-attic
- http://192.168.1.101;orbirouter;local;orbirouter
- http://www.google.com/;google.com;external;internetbox
- https://github.com/;github.com;external;internetbox
- https://www.jeffgeerling.com;jeffgeerling.com;external;internetbox
# - http://192.168.1.1;internetbox;local;internetbox
# - http://192.168.1.42;blackdata;local;orbirouter-attic
# - http://192.168.1.101;orbirouter;local;orbirouter