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

View File

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