diff --git a/examples/unifi-clients-grafana-dash.json b/examples/unifi-clients-grafana-dash.json index 7befce75..8db7fb5f 100644 --- a/examples/unifi-clients-grafana-dash.json +++ b/examples/unifi-clients-grafana-dash.json @@ -3,7 +3,7 @@ "list": [ { "builtIn": 1, - "datasource": "Unifi", + "datasource": "-- Grafana --", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -16,6 +16,7 @@ "gnetId": null, "graphTooltip": 1, "id": 6, + "iteration": 1559783294182, "links": [], "panels": [ { @@ -31,6 +32,7 @@ }, "id": 21, "links": [], + "options": {}, "pageSize": null, "scroll": true, "showHeader": true, @@ -95,11 +97,19 @@ "name" ], "type": "tag" + }, + { + "params": [ + "ap_mac" + ], + "type": "tag" } ], "measurement": "clients", "orderByTime": "ASC", "policy": "default", + "query": "SELECT last(\"ip\") AS \"Address\", last(\"note\") AS \"Note\", last(\"network\") AS \"Network\" FROM \"clients\" WHERE (\"is_wired\" = 'false' AND \"ap_mac\" =~ /^$AP$/) AND $timeFilter GROUP BY \"mac\", \"oui\", \"channel\", \"radio\", \"name\", \"ap_mac\"", + "rawQuery": false, "refId": "A", "resultFormat": "table", "select": [ @@ -163,6 +173,24 @@ "key": "is_wired", "operator": "=", "value": "false" + }, + { + "condition": "AND", + "key": "ap_mac", + "operator": "=~", + "value": "/^$AP$/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$Client$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } @@ -186,11 +214,12 @@ "hideTimeOverride": false, "id": 22, "links": [], + "options": {}, "pageSize": null, "scroll": true, "showHeader": true, "sort": { - "col": 0, + "col": 3, "desc": true }, "styles": [ @@ -254,6 +283,8 @@ "measurement": "clients", "orderByTime": "ASC", "policy": "default", + "query": "SELECT last(\"ip\") AS \"Address\", last(\"note\") AS \"Note\", last(\"network\") AS \"Network\" FROM \"clients\" WHERE (\"is_wired\" != 'false' AND \"name\" =~ /^$Client$/ AND \"site_name\" =~ /$Site$/) AND $timeFilter GROUP BY \"sw_port\", \"mac\", \"oui\", \"use_fixedip\", \"name\"", + "rawQuery": true, "refId": "A", "resultFormat": "table", "select": [ @@ -317,6 +348,12 @@ "key": "is_wired", "operator": "=", "value": "true" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$Client$/" } ] } @@ -357,6 +394,7 @@ "links": [], "maxDataPoints": 3, "nullPointMode": "connected", + "options": {}, "pieType": "pie", "strokeWidth": 1, "targets": [ @@ -373,7 +411,7 @@ "measurement": "clients", "orderByTime": "ASC", "policy": "default", - "query": "select count(distinct(hostname)) FROM \"clients\" WHERE time > now() - 10m AND is_wired = 'true' group by channel", + "query": "select count(distinct(hostname)) FROM \"clients\" WHERE time > now() - 10m AND is_wired = 'true' AND \"site_name\" =~ /$Site$/ group by hostname", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -417,7 +455,7 @@ ], "orderByTime": "ASC", "policy": "default", - "query": "select count(distinct(hostname)) FROM \"clients\" WHERE time > now() - 10m AND is_wired = 'false' group by channel", + "query": "select count(distinct(hostname)) FROM \"clients\" WHERE time > now() - 10m AND (is_wired != 'true' AND \"site_name\" =~ /$Site$/ AND \"ap_mac\" =~ /^$AP$/ AND \"name\" =~ /^$Client$/) group by channel", "rawQuery": true, "refId": "B", "resultFormat": "time_series", @@ -476,11 +514,12 @@ "links": [], "maxDataPoints": 3, "nullPointMode": "connected", + "options": {}, "pieType": "pie", "strokeWidth": "3", "targets": [ { - "alias": "Upstairs / $tag_radio_proto / $tag_radio / $tag_radio_name", + "alias": "$tag_ap_mac / $tag_radio_proto / $tag_radio / $tag_radio_name", "groupBy": [ { "params": [ @@ -492,7 +531,7 @@ "measurement": "clients", "orderByTime": "ASC", "policy": "default", - "query": "select count(distinct(hostname)) FROM \"clients\" WHERE (time > now() - 10m AND ap_mac = '80:2a:a8:10:ae:87') group by radio_proto, radio, radio_name, ap_mac", + "query": "select count(distinct(hostname)) FROM \"clients\" WHERE (time > now() - 10m AND ap_mac =~ /$AP$/ AND \"site_name\" =~ /$Site$/ and \"name\" =~ /^$Client$/) group by radio_proto, radio, radio_name, ap_mac", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -517,44 +556,6 @@ "value": "false" } ] - }, - { - "alias": "Downstairs / $tag_radio_proto / $tag_radio / $tag_radio_name", - "groupBy": [ - { - "params": [ - "$__interval" - ], - "type": "time" - }, - { - "params": [ - "null" - ], - "type": "fill" - } - ], - "orderByTime": "ASC", - "policy": "default", - "query": "select count(distinct(hostname)) FROM \"clients\" WHERE (time > now() - 10m AND ap_mac = '80:2a:a8:10:ae:0c') group by radio_proto, radio, radio_name, ap_mac", - "rawQuery": true, - "refId": "B", - "resultFormat": "time_series", - "select": [ - [ - { - "params": [ - "value" - ], - "type": "field" - }, - { - "params": [], - "type": "mean" - } - ] - ], - "tags": [] } ], "timeFrom": "1h", @@ -588,19 +589,19 @@ "legend": { "header": "", "show": true, - "sort": "current", - "sortDesc": true, + "sortDesc": false, "values": true }, "legendType": "Right side", "links": [], "maxDataPoints": 3, "nullPointMode": "connected", + "options": {}, "pieType": "pie", "strokeWidth": 1, "targets": [ { - "alias": "$tag_oui", + "alias": "w $tag_oui", "groupBy": [ { "params": [ @@ -612,7 +613,7 @@ "measurement": "clients", "orderByTime": "ASC", "policy": "default", - "query": "select count(distinct(hostname)) FROM \"clients\" WHERE (time > now() - 60m) group by oui", + "query": "select count(distinct(hostname)) FROM \"clients\" WHERE (time > now() - 60m AND \"name\" =~ /^$Client$/ AND \"ap_mac\" =~ /^$AP$/ and site_name =~ /$Site$/ and \"name\" =~ /^$Client$/) group by oui", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -637,6 +638,45 @@ "value": "false" } ] + }, + { + "alias": "e $tag_oui", + "groupBy": [ + { + "params": [ + "channel" + ], + "type": "tag" + } + ], + "measurement": "clients", + "orderByTime": "ASC", + "policy": "default", + "query": "select count(distinct(hostname)) FROM \"clients\" WHERE (time > now() - 60m AND \"is_wired\" = 'true' and site_name =~ /$Site$/) group by oui", + "rawQuery": true, + "refId": "B", + "resultFormat": "time_series", + "select": [ + [ + { + "params": [ + "hostname" + ], + "type": "field" + }, + { + "params": [], + "type": "distinct" + } + ] + ], + "tags": [ + { + "key": "is_wired", + "operator": "=", + "value": "false" + } + ] } ], "timeFrom": "1h", @@ -669,13 +709,14 @@ "interval": null, "legend": { "header": "", - "show": true, + "show": false, "values": true }, "legendType": "Right side", "links": [], "maxDataPoints": 3, "nullPointMode": "connected", + "options": {}, "pieType": "pie", "strokeWidth": 1, "targets": [ @@ -692,7 +733,7 @@ "measurement": "clients", "orderByTime": "ASC", "policy": "default", - "query": "select count(distinct(hostname)) FROM \"clients\" WHERE (time > now() - 10m) group by os_class, os_name, dev_cat, dev_family, dev_id ", + "query": "select count(distinct(hostname)) FROM \"clients\" WHERE (time > now() - 10m AND \"ap_mac\" =~ /^$AP$/ AND \"name\" =~ /^$Client$/ AND \"site_name\" =~ /$Site$/) group by os_class, os_name, dev_cat, dev_family, dev_id ", "rawQuery": true, "refId": "A", "resultFormat": "time_series", @@ -757,6 +798,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -856,12 +898,31 @@ "key": "name", "operator": "!~", "value": "/^(amazon-)/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$Client$/" + }, + { + "condition": "AND", + "key": "ap_mac", + "operator": "=~", + "value": "/^$AP$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "UAP Bandwidth / Wireless Devices", "tooltip": { @@ -894,7 +955,11 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -902,7 +967,7 @@ "dashLength": 10, "dashes": false, "datasource": "Unifi", - "description": "Cameras TX / RX bytes per second (calculated in 30 second buckets).", + "description": "Cameras TX / RX bytes per second (calculated in 1 minute buckets).", "fill": 0, "gridPos": { "h": 7, @@ -928,13 +993,14 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, - "stack": false, + "stack": true, "steppedLine": false, "targets": [ { @@ -942,7 +1008,7 @@ "groupBy": [ { "params": [ - "30s" + "1m" ], "type": "time" }, @@ -1020,13 +1086,20 @@ { "key": "name", "operator": "=~", - "value": "/^camera-(.*)/" + "value": "/^camera/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Switch Bandwidth / Cameras", "tooltip": { @@ -1034,7 +1107,6 @@ "sort": 2, "value_type": "individual" }, - "transparent": false, "type": "graph", "xaxis": { "buckets": null, @@ -1060,7 +1132,11 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -1094,6 +1170,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -1191,8 +1268,26 @@ { "condition": "AND", "key": "is_wired", - "operator": "=", - "value": "false" + "operator": "!=", + "value": "true" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$Client$/" + }, + { + "condition": "AND", + "key": "ap_mac", + "operator": "=~", + "value": "/^$AP$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] }, @@ -1284,14 +1379,27 @@ { "condition": "AND", "key": "is_wired", - "operator": "=", - "value": "true" + "operator": "!=", + "value": "false" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$Client$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Switch Bandwidth / Echos & FireTVs", "tooltip": { @@ -1325,7 +1433,11 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -1333,7 +1445,7 @@ "dashLength": 10, "dashes": false, "datasource": "Unifi", - "description": "Wired TX / RX bytes per second (calculated in 30 second buckets). Does not include amazon and camera devices.", + "description": "Wired TX / RX bytes per second (calculated in 30 second buckets). Does not include amazon and camera devices. Unaffected by the AP setting.", "fill": 0, "gridPos": { "h": 9, @@ -1350,7 +1462,7 @@ "min": false, "rightSide": true, "show": true, - "sort": "current", + "sort": "max", "sortDesc": true, "total": false, "values": true @@ -1359,6 +1471,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -1458,12 +1571,25 @@ "key": "name", "operator": "!~", "value": "/^(supermic-bmc|amazon-|camera-)/" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$Client$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Switch Bandwidth / Wired Devices", "tooltip": { @@ -1497,7 +1623,11 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "backgroundColor": "rgba(128,128,128,0.1)", @@ -1521,7 +1651,7 @@ ], "crosshairColor": "#8F070C", "datasource": "Unifi", - "description": "Shows which wireless radio a client is connected to.", + "description": "Shows which wireless radio a client is connected to. Setting AP does not change this.", "display": "timeline", "expandFromQueryS": 0, "extendLastValue": true, @@ -1537,6 +1667,7 @@ "lineColor": "rgba(0,0,0,0.1)", "links": [], "metricNameColor": "#000000", + "options": {}, "rangeMaps": [ { "from": "null", @@ -1579,19 +1710,75 @@ "tags": [ { "key": "is_wired", - "operator": "=", - "value": "false" + "operator": "!=", + "value": "true" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$Client$/" + }, + { + "condition": "AND", + "key": "ap_mac", + "operator": "=~", + "value": "/^$AP$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "textSize": 12, "textSizeTime": 9, + "timeOptions": [ + { + "name": "Years", + "value": "years" + }, + { + "name": "Months", + "value": "months" + }, + { + "name": "Weeks", + "value": "weeks" + }, + { + "name": "Days", + "value": "days" + }, + { + "name": "Hours", + "value": "hours" + }, + { + "name": "Minutes", + "value": "minutes" + }, + { + "name": "Seconds", + "value": "seconds" + }, + { + "name": "Milliseconds", + "value": "milliseconds" + } + ], + "timePrecision": { + "name": "Minutes", + "value": "minutes" + }, "timeTextColor": "#d8d9da", "title": "Wifi Client / AP", - "transparent": false, "type": "natel-discrete-panel", "units": "short", + "useTimePrecision": false, "valueMaps": [ { "op": "=", @@ -1645,6 +1832,7 @@ "lineColor": "rgba(0,0,0,0.1)", "links": [], "metricNameColor": "#000000", + "options": {}, "rangeMaps": [ { "from": "null", @@ -1689,18 +1877,75 @@ "tags": [ { "key": "use_fixedip", - "operator": "=", - "value": "false" + "operator": "!=", + "value": "true" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$Client$/" + }, + { + "condition": "AND", + "key": "ap_mac", + "operator": "=~", + "value": "/^$AP$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "textSize": 12, "textSizeTime": 9, + "timeOptions": [ + { + "name": "Years", + "value": "years" + }, + { + "name": "Months", + "value": "months" + }, + { + "name": "Weeks", + "value": "weeks" + }, + { + "name": "Days", + "value": "days" + }, + { + "name": "Hours", + "value": "hours" + }, + { + "name": "Minutes", + "value": "minutes" + }, + { + "name": "Seconds", + "value": "seconds" + }, + { + "name": "Milliseconds", + "value": "milliseconds" + } + ], + "timePrecision": { + "name": "Minutes", + "value": "minutes" + }, "timeTextColor": "#d8d9da", "title": "Client / IP", "type": "natel-discrete-panel", "units": "short", + "useTimePrecision": false, "valueMaps": [ { "op": "=", @@ -1746,6 +1991,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -1787,12 +2033,31 @@ "key": "is_wired", "operator": "=", "value": "false" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$Client$/" + }, + { + "condition": "AND", + "key": "ap_mac", + "operator": "=~", + "value": "/^$AP$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Received Signal Strength Indicator", "tooltip": { @@ -1826,7 +2091,11 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -1861,6 +2130,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -1902,14 +2172,33 @@ "key": "is_wired", "operator": "=", "value": "false" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$Client$/" + }, + { + "condition": "AND", + "key": "ap_mac", + "operator": "=~", + "value": "/^$AP$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, - "title": "Signal", + "title": "Wireless Signal", "tooltip": { "shared": true, "sort": 2, @@ -1927,7 +2216,7 @@ "yaxes": [ { "format": "dBm", - "label": "Signal Level", + "label": "Signal Power", "logBase": 1, "max": null, "min": null, @@ -1941,7 +2230,11 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -1976,6 +2269,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -2017,12 +2311,31 @@ "key": "is_wired", "operator": "=", "value": "false" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$Client$/" + }, + { + "condition": "AND", + "key": "ap_mac", + "operator": "=~", + "value": "/^$AP$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "UAP Client Stats / Noise", "tooltip": { @@ -2030,7 +2343,6 @@ "sort": 1, "value_type": "individual" }, - "transparent": false, "type": "graph", "xaxis": { "buckets": null, @@ -2057,7 +2369,11 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, @@ -2091,6 +2407,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -2130,14 +2447,33 @@ "tags": [ { "key": "is_wired", - "operator": "=", - "value": "false" + "operator": "!=", + "value": "true" + }, + { + "condition": "AND", + "key": "name", + "operator": "=~", + "value": "/^$Client$/" + }, + { + "condition": "AND", + "key": "ap_mac", + "operator": "=~", + "value": "/^$AP$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "TX Power", "tooltip": { @@ -2145,7 +2481,6 @@ "sort": 2, "value_type": "individual" }, - "transparent": false, "type": "graph", "xaxis": { "buckets": null, @@ -2171,32 +2506,114 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "refresh": "30s", - "schemaVersion": 16, + "schemaVersion": 18, "style": "dark", "tags": [], "templating": { - "list": [] + "list": [ + { + "allValue": null, + "current": { + "text": "All", + "value": "$__all" + }, + "datasource": "Unifi", + "definition": "show tag values from \"clients\" with key=\"site_name\"", + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "Site", + "options": [], + "query": "show tag values from \"clients\" with key=\"site_name\"", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "tags": [], + "text": "All", + "value": [ + "$__all" + ] + }, + "datasource": "Unifi", + "definition": "show tag values from \"clients\" with key=\"ap_mac\" where site_name =~ /$Site$/", + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "AP", + "options": [], + "query": "show tag values from \"clients\" with key=\"ap_mac\" where site_name =~ /$Site$/", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "datasource": "Unifi", + "definition": "show tag values from \"clients\" with key=\"name\" where site_name =~ /$Site$/", + "hide": 0, + "includeAll": true, + "label": null, + "multi": true, + "name": "Client", + "options": [], + "query": "show tag values from \"clients\" with key=\"name\" where site_name =~ /$Site$/", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] }, "time": { "from": "now-3h", - "to": "now" + "to": "now-20s" }, "timepicker": { + "nowDelay": "20s", "refresh_intervals": [ "5s", "10s", "30s", "1m", "5m", - "15m", - "30m", - "1h", - "2h", - "1d" + "15m" ], "time_options": [ "5m", @@ -2213,5 +2630,5 @@ "timezone": "", "title": "Unifi Clients", "uid": "YVR23BZiz", - "version": 25 + "version": 45 } diff --git a/examples/unifi-uap-grafana-dash.json b/examples/unifi-uap-grafana-dash.json index 7d7e7ecb..0bc38dc0 100644 --- a/examples/unifi-uap-grafana-dash.json +++ b/examples/unifi-uap-grafana-dash.json @@ -1,63 +1,9 @@ { - "__inputs": [ - { - "name": "DS_UNIFI", - "label": "Unifi", - "description": "", - "type": "datasource", - "pluginId": "influxdb", - "pluginName": "InfluxDB" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "5.0.4" - }, - { - "type": "panel", - "id": "grafana-clock-panel", - "name": "Clock", - "version": "0.0.9" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "5.0.0" - }, - { - "type": "datasource", - "id": "influxdb", - "name": "InfluxDB", - "version": "5.0.0" - }, - { - "type": "panel", - "id": "singlestat", - "name": "Singlestat", - "version": "5.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "5.0.0" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "5.0.0" - } - ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "${DS_UNIFI}", + "datasource": "-- Grafana --", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -70,13 +16,13 @@ "editable": true, "gnetId": 1486, "graphTooltip": 1, - "id": null, - "iteration": 1524957396402, + "id": 7, + "iteration": 1559783373023, "links": [], "panels": [ { "columns": [], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "editable": true, "error": false, "fontSize": "100%", @@ -89,6 +35,7 @@ "id": 1, "isNew": true, "links": [], + "options": {}, "pageSize": null, "scroll": false, "showHeader": true, @@ -297,6 +244,21 @@ "thresholds": [], "type": "number", "unit": "percent" + }, + { + "alias": "Guests", + "colorMode": null, + "colors": [ + "rgba(245, 54, 54, 0.9)", + "rgba(237, 129, 40, 0.89)", + "rgba(50, 172, 45, 0.97)" + ], + "dateFormat": "YYYY-MM-DD HH:mm:ss", + "decimals": 0, + "pattern": "guest-num_sta", + "thresholds": [], + "type": "number", + "unit": "short" } ], "targets": [ @@ -351,6 +313,12 @@ "device_ap" ], "type": "tag" + }, + { + "params": [ + "guest-num_sta" + ], + "type": "tag" } ], "measurement": "uap", @@ -454,6 +422,24 @@ ], "type": "alias" } + ], + [ + { + "params": [ + "user-num_sta" + ], + "type": "field" + }, + { + "params": [], + "type": "last" + }, + { + "params": [ + "Users" + ], + "type": "alias" + } ] ], "tags": [ @@ -461,6 +447,12 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } @@ -468,7 +460,6 @@ "timeFrom": null, "title": "AP Details", "transform": "table", - "transparent": false, "type": "table" }, { @@ -482,6 +473,7 @@ "id": 34, "links": [], "mode": "html", + "options": {}, "title": "", "transparent": true, "type": "text" @@ -490,6 +482,7 @@ "bgColor": "#3f2b5b", "clockType": "12 hour", "countdownSettings": { + "customFormat": null, "endCountdownTime": "2018-04-29T21:47:00.000Z", "endText": "00:00:00" }, @@ -510,6 +503,7 @@ "mode": "time", "offsetFromUtc": null, "offsetFromUtcMinutes": null, + "options": {}, "timeSettings": { "customFormat": "HH:mm:ss", "fontSize": "30px", @@ -527,7 +521,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "editable": true, "error": false, "format": "none", @@ -563,6 +557,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -621,13 +616,18 @@ "key": "radio", "operator": "=", "value": "na" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": "", "title": "5GHz Radio Channel", - "transparent": false, "type": "singlestat", "valueFontSize": "80%", "valueMaps": [], @@ -642,7 +642,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "editable": true, "error": false, "format": "none", @@ -677,6 +677,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": " dBm", "postfixFontSize": "50%", "prefix": "", @@ -715,7 +716,7 @@ [ { "params": [ - "tx_power" + "vap_tx_power" ], "type": "field" } @@ -732,13 +733,18 @@ "key": "radio", "operator": "=", "value": "na" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": "10,18", "title": "5Ghz Radio Tx Power", - "transparent": false, "type": "singlestat", "valueFontSize": "80%", "valueMaps": [], @@ -753,7 +759,7 @@ "rgba(237, 129, 40, 0.89)", "#d44a3a" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 1, "format": "percent", "gauge": { @@ -787,6 +793,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -800,9 +807,9 @@ ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, + "full": true, "lineColor": "rgb(31, 120, 193)", - "show": false + "show": true }, "tableColumn": "system_uptime", "targets": [ @@ -835,6 +842,12 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } @@ -862,7 +875,7 @@ "rgba(237, 129, 40, 0.89)", "#d44a3a" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 3, "format": "dtdurations", "gauge": { @@ -895,6 +908,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -943,6 +957,12 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } @@ -969,7 +989,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "editable": true, "error": false, "format": "none", @@ -1004,6 +1024,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": " dBm", "postfixFontSize": "50%", "prefix": "", @@ -1042,7 +1063,7 @@ [ { "params": [ - "tx_power" + "vap_tx_power" ], "type": "field" } @@ -1059,13 +1080,18 @@ "key": "device_name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": "10,18", "title": "2.4GHz Radio Tx Power", - "transparent": false, "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ @@ -1086,7 +1112,7 @@ "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "editable": true, "error": false, "format": "none", @@ -1121,6 +1147,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -1176,13 +1203,18 @@ "key": "radio", "operator": "=", "value": "ng" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": "", "title": "2.4GHz Radio Channel", - "transparent": false, "type": "singlestat", "valueFontSize": "80%", "valueMaps": [], @@ -1193,7 +1225,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "editable": true, "error": false, "fill": 0, @@ -1220,6 +1252,7 @@ "linewidth": 2, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -1300,6 +1333,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Load Average", "tooltip": { @@ -1333,14 +1367,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "editable": true, "error": false, "fill": 1, @@ -1367,6 +1405,7 @@ "linewidth": 2, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -1447,6 +1486,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Memory", "tooltip": { @@ -1480,14 +1520,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "editable": true, "error": false, "fill": 1, @@ -1513,6 +1557,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -1581,6 +1626,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Client Connection Quality", "tooltip": { @@ -1614,14 +1660,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 0, "editable": true, "error": false, @@ -1651,6 +1701,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -1763,6 +1814,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "Clients", "tooltip": { @@ -1796,14 +1848,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "editable": true, "error": false, "fill": 0, @@ -1830,6 +1886,7 @@ "linewidth": 3, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -1940,6 +1997,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "5 GHz Channel Utilization", "tooltip": { @@ -1974,14 +2032,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "editable": true, "error": false, "fill": 0, @@ -2008,6 +2070,7 @@ "linewidth": 3, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -2118,6 +2181,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "2.4GHz Channel Utilization", "tooltip": { @@ -2151,14 +2215,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "editable": true, "error": false, "fill": 1, @@ -2187,6 +2255,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -2233,7 +2302,7 @@ [ { "params": [ - "rx_bytes" + "vap_rx_bytes" ], "type": "field" }, @@ -2263,7 +2332,7 @@ [ { "params": [ - "tx_bytes" + "vap_tx_bytes" ], "type": "field" }, @@ -2308,6 +2377,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "5 GHz Traffic", "tooltip": { @@ -2341,14 +2411,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "editable": true, "error": false, "fill": 1, @@ -2377,6 +2451,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -2423,7 +2498,7 @@ [ { "params": [ - "rx_bytes" + "vap_rx_bytes" ], "type": "field" }, @@ -2453,7 +2528,7 @@ [ { "params": [ - "tx_bytes" + "vap_tx_bytes" ], "type": "field" }, @@ -2498,6 +2573,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "2.4GHz Traffic", "tooltip": { @@ -2531,14 +2607,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 0, "description": "PPS on the na band calculated in 30 second buckets.", "editable": true, @@ -2567,6 +2647,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -2613,7 +2694,7 @@ [ { "params": [ - "rx_packets" + "vap_rx_packets" ], "type": "field" }, @@ -2637,7 +2718,7 @@ [ { "params": [ - "tx_packets" + "vap_tx_packets" ], "type": "field" }, @@ -2676,6 +2757,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "5 GHz Packets", "tooltip": { @@ -2710,14 +2792,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 0, "description": "PPS on the ng band calculated in 30 second buckets.", "editable": true, @@ -2748,6 +2834,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -2794,7 +2881,7 @@ [ { "params": [ - "rx_packets" + "vap_rx_packets" ], "type": "field" }, @@ -2818,7 +2905,7 @@ [ { "params": [ - "tx_packets" + "vap_tx_packets" ], "type": "field" }, @@ -2857,6 +2944,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "2.4GHz Packets", "tooltip": { @@ -2891,14 +2979,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 0, "editable": true, "error": false, @@ -2928,6 +3020,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -2980,7 +3073,7 @@ [ { "params": [ - "rx_dropped" + "vap_rx_dropped" ], "type": "field" }, @@ -3004,7 +3097,7 @@ [ { "params": [ - "tx_dropped" + "vap_tx_dropped" ], "type": "field" }, @@ -3028,7 +3121,7 @@ [ { "params": [ - "rx_errors" + "vap_rx_errors" ], "type": "field" }, @@ -3052,7 +3145,7 @@ [ { "params": [ - "tx_errors" + "vap_tx_errors" ], "type": "field" }, @@ -3076,7 +3169,7 @@ [ { "params": [ - "rx_crypts" + "vap_rx_crypts" ], "type": "field" }, @@ -3100,7 +3193,7 @@ [ { "params": [ - "rx_frags" + "vap_rx_frags" ], "type": "field" }, @@ -3124,7 +3217,7 @@ [ { "params": [ - "tx_retries" + "vap_tx_retries" ], "type": "field" }, @@ -3163,6 +3256,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "5GHz Drops/Errors", "tooltip": { @@ -3197,14 +3291,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 0, "editable": true, "error": false, @@ -3234,6 +3332,7 @@ "linewidth": 1, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -3280,7 +3379,7 @@ [ { "params": [ - "rx_dropped" + "vap_rx_dropped" ], "type": "field" }, @@ -3304,7 +3403,7 @@ [ { "params": [ - "tx_dropped" + "vap_tx_dropped" ], "type": "field" }, @@ -3328,7 +3427,7 @@ [ { "params": [ - "rx_errors" + "vap_rx_errors" ], "type": "field" }, @@ -3352,7 +3451,7 @@ [ { "params": [ - "tx_errors" + "vap_tx_errors" ], "type": "field" }, @@ -3376,7 +3475,7 @@ [ { "params": [ - "rx_crypts" + "vap_rx_crypts" ], "type": "field" }, @@ -3400,7 +3499,7 @@ [ { "params": [ - "rx_frags" + "vap_rx_frags" ], "type": "field" }, @@ -3424,7 +3523,7 @@ [ { "params": [ - "tx_retries" + "vap_tx_retries" ], "type": "field" }, @@ -3463,6 +3562,7 @@ ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "2.4GHz Drops/Errors", "tooltip": { @@ -3497,44 +3597,84 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "refresh": "30s", - "schemaVersion": 16, + "schemaVersion": 18, "style": "dark", "tags": [], "templating": { "list": [ { "current": { - "selected": true, "text": "Glances", "value": "Glances" }, "hide": 2, + "includeAll": false, "label": null, + "multi": false, "name": "dataSource", "options": [], "query": "influxdb", "refresh": 1, "regex": "", + "skipUrlSync": false, "type": "datasource" }, { "allValue": null, - "current": {}, - "datasource": "${DS_UNIFI}", + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "datasource": "Unifi", + "definition": "show tag values from \"uap\" with key=\"site_name\"", + "hide": 0, + "includeAll": true, + "label": "", + "multi": true, + "name": "Site", + "options": [], + "query": "show tag values from \"uap\" with key=\"site_name\"", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": null, + "tags": [], + "tagsQuery": null, + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "All", + "value": [ + "$__all" + ] + }, + "datasource": "Unifi", + "definition": "show tag values from \"uap\" with key=\"name\" where site_name =~ /$Site$/", "hide": 0, "includeAll": true, "label": "UniFi AP:", "multi": true, "name": "host", "options": [], - "query": "show tag values from \"uap\" with key=\"name\"", + "query": "show tag values from \"uap\" with key=\"name\" where site_name =~ /$Site$/", "refresh": 1, "regex": "", - "sort": 0, + "skipUrlSync": false, + "sort": 1, "tagValuesQuery": null, "tags": [], "tagsQuery": null, @@ -3573,5 +3713,5 @@ "timezone": "browser", "title": "UniFi UAP Insights", "uid": "8nQ_RPZiz", - "version": 28 + "version": 37 } diff --git a/examples/unifi-usg-grafana-dash.json b/examples/unifi-usg-grafana-dash.json index 26d01dfc..1496ef97 100644 --- a/examples/unifi-usg-grafana-dash.json +++ b/examples/unifi-usg-grafana-dash.json @@ -1,67 +1,14 @@ { - "__inputs": [ - { - "name": "DS_UNIFI", - "label": "Unifi", - "description": "", - "type": "datasource", - "pluginId": "influxdb", - "pluginName": "InfluxDB" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "5.0.4" - }, - { - "type": "panel", - "id": "grafana-clock-panel", - "name": "Clock", - "version": "0.0.9" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "5.0.0" - }, - { - "type": "datasource", - "id": "influxdb", - "name": "InfluxDB", - "version": "5.0.0" - }, - { - "type": "panel", - "id": "singlestat", - "name": "Singlestat", - "version": "5.0.0" - }, - { - "type": "panel", - "id": "table", - "name": "Table", - "version": "5.0.0" - }, - { - "type": "panel", - "id": "text", - "name": "Text", - "version": "5.0.0" - } - ], "annotations": { "list": [ { "builtIn": 1, - "datasource": "${DS_UNIFI}", + "datasource": "-- Grafana --", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", + "showIn": 0, "type": "dashboard" } ] @@ -70,8 +17,8 @@ "editable": true, "gnetId": 1486, "graphTooltip": 1, - "id": null, - "iteration": 1524993362759, + "id": 9, + "iteration": 1559783436821, "links": [], "panels": [ { @@ -85,13 +32,14 @@ "id": 34, "links": [], "mode": "html", + "options": {}, "title": "", "transparent": true, "type": "text" }, { "columns": [], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "editable": true, "error": false, "fontSize": "100%", @@ -104,6 +52,7 @@ "id": 1, "isNew": true, "links": [], + "options": {}, "pageSize": null, "scroll": false, "showHeader": true, @@ -530,6 +479,12 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } @@ -549,7 +504,7 @@ "#3f2b5b", "#511749" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 3, "format": "dtdurations", "gauge": { @@ -582,6 +537,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "20%", "prefix": "", @@ -656,7 +612,7 @@ "rgba(237, 129, 40, 0.89)", "#d44a3a" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 0, "format": "none", "gauge": { @@ -690,6 +646,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -766,7 +723,7 @@ "rgba(237, 129, 40, 0.89)", "#d44a3a" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 1, "description": "", "format": "ms", @@ -801,6 +758,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -849,6 +807,12 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } @@ -877,7 +841,7 @@ "rgba(237, 129, 40, 0.89)", "#299c46" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 1, "description": "", "format": "Mbits", @@ -912,6 +876,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -960,6 +925,12 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } @@ -988,7 +959,7 @@ "rgba(237, 129, 40, 0.89)", "#299c46" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 1, "description": "", "format": "Mbits", @@ -1023,6 +994,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -1071,6 +1043,12 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } @@ -1085,7 +1063,7 @@ { "op": "=", "text": "N/A", - "value": "null" + "value": "0" } ], "valueName": "current" @@ -1099,7 +1077,7 @@ "rgba(237, 129, 40, 0.89)", "#d44a3a" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 1, "format": "percent", "gauge": { @@ -1133,6 +1111,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -1181,6 +1160,12 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } @@ -1209,7 +1194,7 @@ "rgba(237, 129, 40, 0.89)", "#d44a3a" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 1, "description": "", "format": "percent", @@ -1243,6 +1228,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -1291,6 +1277,12 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } @@ -1319,7 +1311,7 @@ "rgba(237, 129, 40, 0.89)", "#d44a3a" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 0, "format": "none", "gauge": { @@ -1353,6 +1345,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "", "postfixFontSize": "50%", "prefix": "", @@ -1424,6 +1417,7 @@ "bgColor": "#3f2b5b", "clockType": "12 hour", "countdownSettings": { + "customFormat": null, "endCountdownTime": "2018-04-29T21:47:00.000Z", "endText": "00:00:00" }, @@ -1444,6 +1438,7 @@ "mode": "time", "offsetFromUtc": null, "offsetFromUtcMinutes": null, + "options": {}, "timeSettings": { "customFormat": "HH:mm:ss", "fontSize": "24px", @@ -1461,7 +1456,7 @@ "rgba(237, 129, 40, 0.89)", "#d44a3a" ], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 0, "format": "none", "gauge": { @@ -1495,6 +1490,7 @@ "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, + "options": {}, "postfix": "M", "postfixFontSize": "30%", "prefix": "", @@ -1567,7 +1563,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 2, "description": "", "editable": true, @@ -1597,6 +1593,7 @@ "linewidth": 3, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -1617,7 +1614,7 @@ "groupBy": [ { "params": [ - "30s" + "1m" ], "type": "time" }, @@ -1670,12 +1667,19 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "WAN Multicast", "tooltip": { @@ -1684,7 +1688,6 @@ "sort": 0, "value_type": "cumulative" }, - "transparent": false, "type": "graph", "xaxis": { "buckets": null, @@ -1711,11 +1714,15 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "columns": [], - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "fontSize": "90%", "gridPos": { "h": 7, @@ -1725,6 +1732,7 @@ }, "id": 43, "links": [], + "options": {}, "pageSize": null, "scroll": true, "showHeader": true, @@ -2181,6 +2189,12 @@ "key": "device_name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] }, @@ -2450,13 +2464,18 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "title": "Networks", "transform": "table", - "transparent": false, "type": "table" }, { @@ -2464,7 +2483,7 @@ "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "description": "Spikes on this graph that are missing from the LAN graph indicate gateway-originated traffic, like a scheduled speed test.", "editable": true, "error": false, @@ -2492,6 +2511,7 @@ "linewidth": 3, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -2517,7 +2537,7 @@ "groupBy": [ { "params": [ - "30s" + "1m" ], "type": "time" }, @@ -2588,12 +2608,19 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "WAN Throughput", "tooltip": { @@ -2628,14 +2655,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "description": "Spikes on this graph that do not appear on the WAN graph indicate inter-VLAN-routing.", "editable": true, "error": false, @@ -2663,6 +2694,7 @@ "linewidth": 3, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -2688,7 +2720,7 @@ "groupBy": [ { "params": [ - "30s" + "1m" ], "type": "time" }, @@ -2759,12 +2791,19 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "LAN Throughput", "tooltip": { @@ -2799,14 +2838,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 2, "description": "May show problems with your WAN interface.", "editable": true, @@ -2837,6 +2880,7 @@ "linewidth": 2, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -2939,12 +2983,19 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "WAN Errors", "tooltip": { @@ -2953,7 +3004,6 @@ "sort": 0, "value_type": "cumulative" }, - "transparent": false, "type": "graph", "xaxis": { "buckets": null, @@ -2980,14 +3030,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 2, "description": "May show problems with your WAN interface.", "editable": true, @@ -3018,6 +3072,7 @@ "linewidth": 2, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -3120,12 +3175,19 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "WAN Drops", "tooltip": { @@ -3134,7 +3196,6 @@ "sort": 0, "value_type": "cumulative" }, - "transparent": false, "type": "graph", "xaxis": { "buckets": null, @@ -3161,14 +3222,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 0, "description": "PPS on the WAN interface, calculated in 30 second buckets.", "editable": true, @@ -3199,6 +3264,7 @@ "linewidth": 3, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -3224,7 +3290,7 @@ "groupBy": [ { "params": [ - "30s" + "1m" ], "type": "time" }, @@ -3301,12 +3367,19 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "WAN Packets", "tooltip": { @@ -3342,14 +3415,18 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, - "datasource": "${DS_UNIFI}", + "datasource": "Unifi", "decimals": 0, "description": "PPS on the LAN interface, calculated in 30 second buckets.", "editable": true, @@ -3380,6 +3457,7 @@ "linewidth": 3, "links": [], "nullPointMode": "connected", + "options": {}, "percentage": false, "pointradius": 5, "points": false, @@ -3405,7 +3483,7 @@ "groupBy": [ { "params": [ - "30s" + "1m" ], "type": "time" }, @@ -3482,12 +3560,19 @@ "key": "name", "operator": "=~", "value": "/^$host$/" + }, + { + "condition": "AND", + "key": "site_name", + "operator": "=~", + "value": "/^$Site$/" } ] } ], "thresholds": [], "timeFrom": null, + "timeRegions": [], "timeShift": null, "title": "LAN Packets", "tooltip": { @@ -3523,29 +3608,65 @@ "min": null, "show": false } - ] + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], "refresh": "30s", - "schemaVersion": 16, + "schemaVersion": 18, "style": "dark", "tags": [], "templating": { "list": [ { "allValue": null, - "current": {}, - "datasource": "${DS_UNIFI}", + "current": { + "text": "All", + "value": "$__all" + }, + "datasource": "Unifi", + "definition": "show tag values from \"usg\" with key=\"site_name\"", + "hide": 0, + "includeAll": true, + "label": "", + "multi": true, + "name": "Site", + "options": [], + "query": "show tag values from \"usg\" with key=\"site_name\"", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "tagValuesQuery": null, + "tags": [], + "tagsQuery": null, + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": { + "text": "gateway", + "value": [ + "gateway" + ] + }, + "datasource": "Unifi", + "definition": "show tag values from \"usg\" with key=\"name\" where site_name =~ /$Site$/", "hide": 0, "includeAll": true, "label": "UniFi USG:", "multi": true, "name": "host", "options": [], - "query": "show tag values from \"usg\" with key=\"name\"", + "query": "show tag values from \"usg\" with key=\"name\" where site_name =~ /$Site$/", "refresh": 1, "regex": "", - "sort": 0, + "skipUrlSync": false, + "sort": 1, "tagValuesQuery": null, "tags": [], "tagsQuery": null, @@ -3584,5 +3705,5 @@ "timezone": "browser", "title": "UniFi USG Insights", "uid": "WX6RJOMik", - "version": 1 + "version": 33 }