Browse Source

added active hosts panel

pull/1/head
sberk42 4 years ago
parent
commit
f47a658a59
  1. 229
      grafana/Dashboard.json

229
grafana/Dashboard.json

@ -45,12 +45,6 @@
"id": "stat", "id": "stat",
"name": "Stat", "name": "Stat",
"version": "" "version": ""
},
{
"type": "panel",
"id": "table-old",
"name": "Table (old)",
"version": ""
} }
], ],
"annotations": { "annotations": {
@ -541,6 +535,7 @@
{ {
"cacheTimeout": null, "cacheTimeout": null,
"datasource": "${DS_PROMETHEUS}", "datasource": "${DS_PROMETHEUS}",
"description": "",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"custom": {}, "custom": {},
@ -1845,159 +1840,113 @@
} }
}, },
{ {
"columns": [], "aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "${DS_PROMETHEUS}", "datasource": "${DS_PROMETHEUS}",
"fieldConfig": { "fieldConfig": {
"defaults": { "defaults": {
"custom": {} "custom": {
"align": null
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
}, },
"overrides": [] "overrides": []
}, },
"fontSize": "100%", "fill": 1,
"fillGradient": 0,
"gridPos": { "gridPos": {
"h": 7, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 15 "y": 15
}, },
"id": 14, "hiddenSeries": false,
"links": [], "id": 26,
"pageSize": null, "legend": {
"scroll": true, "avg": false,
"showHeader": true, "current": false,
"sort": { "max": false,
"col": 0, "min": false,
"desc": true "show": true,
"total": false,
"values": false
}, },
"styles": [ "lines": true,
{ "linewidth": 1,
"alias": "Time", "nullPointMode": "null",
"align": "auto", "percentage": false,
"dateFormat": "MMMM D, YYYY LT", "pluginVersion": "7.1.5",
"pattern": "Time", "pointradius": 2,
"type": "date" "points": false,
}, "renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": true,
"steppedLine": false,
"targets": [
{ {
"alias": "", "expr": "gateway_host_active",
"align": "auto", "interval": "",
"colorMode": null, "legendFormat": "{{hostname}} ({{macaddress}})",
"colors": [ "refId": "A"
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
"decimals": 2,
"pattern": "/.*/",
"thresholds": [],
"type": "number",
"unit": "decbytes"
} }
], ],
"targets": [ "thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Active Hosts",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{ {
"alias": "Download", "format": "none",
"dsType": "prometheus", "label": null,
"expr": "gateway_wan_bytes_received", "logBase": 1,
"groupBy": [ "max": null,
{ "min": null,
"params": [ "show": true
"1d"
],
"type": "time"
}
],
"interval": "",
"legendFormat": "Download",
"measurement": "fritzbox_value",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT non_negative_difference(last(cumulative_sum)) FROM (\nSELECT cumulative_sum(non_negative_difference(\"value\")) FROM \"fritzbox_value\" WHERE (\"type_instance\" = 'totalbytesreceived') AND $timeFilter \n) WHERE $timeFilter GROUP BY time(1d) tz('Europe/Berlin')",
"rawQuery": true,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "max"
},
{
"params": [
"10s"
],
"type": "non_negative_derivative"
}
]
],
"tags": [
{
"key": "type_instance",
"operator": "=",
"value": "totalbytesreceived"
}
],
"target": ""
}, },
{ {
"alias": "Upload", "format": "short",
"dsType": "prometheus", "label": null,
"expr": "gateway_wan_bytes_sent", "logBase": 1,
"groupBy": [ "max": null,
{ "min": null,
"params": [ "show": true
"1d"
],
"type": "time"
}
],
"interval": "",
"legendFormat": "Upload",
"measurement": "fritzbox_value",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT non_negative_difference(last(cumulative_sum)) FROM (\nSELECT cumulative_sum(non_negative_difference(\"value\")) FROM \"fritzbox_value\" WHERE (\"type_instance\" = 'totalbytessent') AND $timeFilter\n) WHERE $timeFilter GROUP BY time(1d) tz('Europe/Berlin')",
"rawQuery": true,
"refId": "B",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"value"
],
"type": "field"
},
{
"params": [],
"type": "max"
},
{
"params": [
"10s"
],
"type": "non_negative_derivative"
}
]
],
"tags": [
{
"key": "type_instance",
"operator": "=",
"value": "totalbytesreceived"
}
],
"target": ""
} }
], ],
"title": "Daily Traffic", "yaxis": {
"transform": "timeseries_to_columns", "align": false,
"type": "table-old" "alignLevel": null
}
}, },
{ {
"aliasColors": { "aliasColors": {
@ -2241,5 +2190,5 @@
"timezone": "", "timezone": "",
"title": "FRITZ!Box Status", "title": "FRITZ!Box Status",
"uid": "000000013", "uid": "000000013",
"version": 5 "version": 11
} }
Loading…
Cancel
Save