- Eine VM mit Linux
- InfuxDB
- Grafana
- PHP + CURL
- Datenbank + User in InfluxDB anlegen
- Username, Host, Password in
test.php
anpassen test.sh
um eigene Download Testserver erweiterntest.sh
als Cron aufrufen
- In Grafana ein Dashboard erstellen
- InfluxDB als Datenquelle anlegen
- Graf erstellen
Beispiel:
Beispiel Panel JSON:
{
"aliasColors": {
"bitspersec.mean": "#BF1B00"
},
"bars": false,
"datasource": "public_speedtest",
"decimals": 2,
"editable": true,
"error": false,
"fill": 1,
"grid": {},
"height": "400",
"id": 4,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": true,
"rightSide": false,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "connected",
"percentage": false,
"pointradius": 3,
"points": true,
"renderer": "flot",
"seriesOverrides": [],
"span": 12,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "$tag_source",
"dsType": "influxdb",
"groupBy": [
{
"params": [
"$interval"
],
"type": "time"
},
{
"params": [
"host"
],
"type": "tag"
},
{
"params": [
"source"
],
"type": "tag"
},
{
"params": [
"null"
],
"type": "fill"
}
],
"measurement": "bitspersec",
"policy": "default",
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "mean"
}
]
],
"tags": []
}
],
"thresholds": [],
"timeFrom": "7d",
"timeShift": null,
"title": "",
"tooltip": {
"msResolution": true,
"shared": true,
"sort": 0,
"value_type": "cumulative"
},
"type": "graph",
"xaxis": {
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "bps",
"label": "Megabit pro Sekunde",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "bps",
"label": "",
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}