Switch Updates. Dashboard fixes. Site output.

This commit is contained in:
David Newhall II 2019-06-06 16:53:51 -07:00
parent 418d1e2fa1
commit 4975e56c42
9 changed files with 3773 additions and 137 deletions

6
Gopkg.lock generated
View File

@ -2,12 +2,12 @@
[[projects]] [[projects]]
digest = "1:91639d25b5400abb27afc5d4e201898f157a239d508dd98bcac2858fdea6869a" digest = "1:e52e3ff16e2e82410ca561073537e336b0aff9f3bded65ee856aec7ec47efbaf"
name = "github.com/golift/unifi" name = "github.com/golift/unifi"
packages = ["."] packages = ["."]
pruneopts = "UT" pruneopts = "UT"
revision = "a88e9234a418f7880d4da4e651899bb5a7185ec7" revision = "3968f3384cbe437d991c27c4338e4c371897ac32"
version = "v2.0.1" version = "v2.0.2"
[[projects]] [[projects]]
branch = "master" branch = "master"

View File

@ -83,6 +83,12 @@ select multiple to put specific stats side-by-side.
![image](examples/unifi-uap-dashboard.png?raw=true) ![image](examples/unifi-uap-dashboard.png?raw=true)
The USW / Switch Dashboard is pretty big with one data-filled section per selected port.
You can drill down into specific sites, switches, and ports. Compare ports in different
sites side-by-side. So easy! This screenshot barely does it justice.
![image](examples/unifi-usw-dashboard.png?raw=true)
## Copyright & License ## Copyright & License
- Copyright © 2016 Garrett Bjerkhoel. - Copyright © 2016 Garrett Bjerkhoel.

View File

@ -43,7 +43,9 @@ func (c *Config) Run() error {
if !c.Quiet { if !c.Quiet {
log.Println("Authenticated to Unifi Controller @", c.UnifiBase, "as user", c.UnifiUser) log.Println("Authenticated to Unifi Controller @", c.UnifiBase, "as user", c.UnifiUser)
} }
if err := c.CheckSites(controller); err != nil {
return err
}
controller.ErrorLog = log.Printf // Log all errors. controller.ErrorLog = log.Printf // Log all errors.
if log.SetFlags(0); c.Debug { if log.SetFlags(0); c.Debug {
log.Println("Debug Logging Enabled") log.Println("Debug Logging Enabled")
@ -83,6 +85,31 @@ func parseFlags() string {
return *configFile return *configFile
} }
// CheckSites makes sure the list of provided sites exists on the controller.
func (c *Config) CheckSites(controller *unifi.Unifi) error {
sites, err := controller.GetSites()
if err != nil {
return err
}
if !c.Quiet {
msg := make([]string, 0)
for _, site := range sites {
msg = append(msg, site.Name+" ("+site.Desc+")")
}
log.Printf("Found %d site(s) on controller: %v", len(msg), strings.Join(msg, ","))
}
FIRST:
for _, s := range c.Sites {
for _, site := range sites {
if s == site.Name || s == "all" {
continue FIRST
}
}
return errors.Errorf("configured site not found on controller: %v", s)
}
return nil
}
// GetConfig parses and returns our configuration data. // GetConfig parses and returns our configuration data.
func GetConfig(configFile string) (Config, error) { func GetConfig(configFile string) (Config, error) {
// Preload our defaults. // Preload our defaults.

View File

@ -4,7 +4,8 @@ This folder contains 3 grafana dashboards to get you started with the new data p
Import these into Grafana to quickly visualize data from your devices. Import these into Grafana to quickly visualize data from your devices.
Created with Grafana 6.2. Created with Grafana 6.2.
They require a few plugins: `Clock`, `Discrete`, `Singlestat`, `Table` These dashboards require a few plugins.
See the [Wiki](https://github.com/davidnewhall/unifi-poller/wiki/Grafana) for more info.
Keep in mind these dashboards are just examples. You should make an Example folder Keep in mind these dashboards are just examples. You should make an Example folder
in Grafana to keep them in, and copy them to new dashboards that you want to change. in Grafana to keep them in, and copy them to new dashboards that you want to change.

View File

@ -1,4 +1,52 @@
{ {
"__inputs": [
{
"name": "DS_UNIFI",
"label": "Unifi",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "6.2.1"
},
{
"type": "panel",
"id": "grafana-piechart-panel",
"name": "Pie Chart",
"version": "1.3.3"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "influxdb",
"name": "InfluxDB",
"version": "1.0.0"
},
{
"type": "panel",
"id": "natel-discrete-panel",
"name": "Discrete",
"version": "0.0.9"
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@ -15,17 +63,17 @@
"editable": true, "editable": true,
"gnetId": null, "gnetId": null,
"graphTooltip": 1, "graphTooltip": 1,
"id": 6, "id": null,
"iteration": 1559783294182, "iteration": 1559859351362,
"links": [], "links": [],
"panels": [ "panels": [
{ {
"columns": [], "columns": [],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"description": "", "description": "",
"fontSize": "80%", "fontSize": "80%",
"gridPos": { "gridPos": {
"h": 10, "h": 13,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 0 "y": 0
@ -202,11 +250,11 @@
}, },
{ {
"columns": [], "columns": [],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"description": "", "description": "",
"fontSize": "80%", "fontSize": "80%",
"gridPos": { "gridPos": {
"h": 10, "h": 13,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 0 "y": 0
@ -219,7 +267,7 @@
"scroll": true, "scroll": true,
"showHeader": true, "showHeader": true,
"sort": { "sort": {
"col": 3, "col": 8,
"desc": true "desc": true
}, },
"styles": [ "styles": [
@ -371,7 +419,7 @@
"label": "Others", "label": "Others",
"threshold": 0 "threshold": 0
}, },
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"description": "", "description": "",
"fontSize": "70%", "fontSize": "70%",
@ -380,7 +428,7 @@
"h": 8, "h": 8,
"w": 6, "w": 6,
"x": 0, "x": 0,
"y": 10 "y": 13
}, },
"hideTimeOverride": true, "hideTimeOverride": true,
"id": 9, "id": 9,
@ -476,7 +524,7 @@
"tags": [] "tags": []
} }
], ],
"timeFrom": "1h", "timeFrom": null,
"title": "Wifi Channels", "title": "Wifi Channels",
"transparent": true, "transparent": true,
"type": "grafana-piechart-panel", "type": "grafana-piechart-panel",
@ -490,7 +538,7 @@
"label": "Others", "label": "Others",
"threshold": 0 "threshold": 0
}, },
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"description": "", "description": "",
"fontSize": "70%", "fontSize": "70%",
@ -499,7 +547,7 @@
"h": 8, "h": 8,
"w": 6, "w": 6,
"x": 6, "x": 6,
"y": 10 "y": 13
}, },
"hideTimeOverride": true, "hideTimeOverride": true,
"id": 11, "id": 11,
@ -558,7 +606,7 @@
] ]
} }
], ],
"timeFrom": "1h", "timeFrom": null,
"title": "AP Radio / Clients", "title": "AP Radio / Clients",
"transparent": true, "transparent": true,
"type": "grafana-piechart-panel", "type": "grafana-piechart-panel",
@ -572,7 +620,7 @@
"label": "Others", "label": "Others",
"threshold": 0 "threshold": 0
}, },
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"description": "", "description": "",
"fontSize": "70%", "fontSize": "70%",
@ -581,7 +629,7 @@
"h": 8, "h": 8,
"w": 6, "w": 6,
"x": 12, "x": 12,
"y": 10 "y": 13
}, },
"hideTimeOverride": true, "hideTimeOverride": true,
"id": 12, "id": 12,
@ -679,7 +727,7 @@
] ]
} }
], ],
"timeFrom": "1h", "timeFrom": null,
"title": "Client MAC OUI Breakdown", "title": "Client MAC OUI Breakdown",
"transparent": true, "transparent": true,
"type": "grafana-piechart-panel", "type": "grafana-piechart-panel",
@ -693,7 +741,7 @@
"label": "Others", "label": "Others",
"threshold": 0 "threshold": 0
}, },
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"description": "", "description": "",
"fontSize": "70%", "fontSize": "70%",
@ -702,7 +750,7 @@
"h": 8, "h": 8,
"w": 6, "w": 6,
"x": 18, "x": 18,
"y": 10 "y": 13
}, },
"hideTimeOverride": true, "hideTimeOverride": true,
"id": 14, "id": 14,
@ -760,7 +808,7 @@
] ]
} }
], ],
"timeFrom": "1h", "timeFrom": null,
"title": "OS/Dev Class/ID Breakdown", "title": "OS/Dev Class/ID Breakdown",
"transparent": true, "transparent": true,
"type": "grafana-piechart-panel", "type": "grafana-piechart-panel",
@ -771,14 +819,14 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"description": "Bandwidth usage per wireless devices as reported by the UAPs. Does not include amazon devices.", "description": "Bandwidth usage per wireless devices as reported by the UAPs. Does not include amazon devices.",
"fill": 1, "fill": 1,
"gridPos": { "gridPos": {
"h": 7, "h": 7,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 18 "y": 21
}, },
"id": 3, "id": 3,
"legend": { "legend": {
@ -966,14 +1014,14 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"description": "Cameras TX / RX bytes per second (calculated in 1 minute buckets).", "description": "Cameras TX / RX bytes per second (calculated in 1 minute buckets).",
"fill": 0, "fill": 0,
"gridPos": { "gridPos": {
"h": 7, "h": 7,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 18 "y": 21
}, },
"id": 15, "id": 15,
"legend": { "legend": {
@ -1143,14 +1191,14 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"description": "Amazon Devices TX / RX bytes per second (calculated in 30 second buckets).", "description": "Amazon Devices TX / RX bytes per second (calculated in 30 second buckets).",
"fill": 0, "fill": 0,
"gridPos": { "gridPos": {
"h": 9, "h": 9,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 25 "y": 28
}, },
"id": 23, "id": 23,
"legend": { "legend": {
@ -1444,14 +1492,14 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"description": "Wired TX / RX bytes per second (calculated in 30 second buckets). Does not include amazon and camera devices. Unaffected by the AP setting.", "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, "fill": 0,
"gridPos": { "gridPos": {
"h": 9, "h": 9,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 25 "y": 28
}, },
"id": 2, "id": 2,
"legend": { "legend": {
@ -1650,7 +1698,7 @@
} }
], ],
"crosshairColor": "#8F070C", "crosshairColor": "#8F070C",
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"description": "Shows which wireless radio a client is connected to. Setting AP does not change this.", "description": "Shows which wireless radio a client is connected to. Setting AP does not change this.",
"display": "timeline", "display": "timeline",
"expandFromQueryS": 0, "expandFromQueryS": 0,
@ -1659,7 +1707,7 @@
"h": 9, "h": 9,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 34 "y": 37
}, },
"highlightOnMouseover": false, "highlightOnMouseover": false,
"id": 17, "id": 17,
@ -1815,7 +1863,7 @@
} }
], ],
"crosshairColor": "#8F070C", "crosshairColor": "#8F070C",
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"description": "Shows IPs assigned to non-static clients.", "description": "Shows IPs assigned to non-static clients.",
"display": "timeline", "display": "timeline",
"expandFromQueryS": 0, "expandFromQueryS": 0,
@ -1824,7 +1872,7 @@
"h": 9, "h": 9,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 34 "y": 37
}, },
"highlightOnMouseover": false, "highlightOnMouseover": false,
"id": 18, "id": 18,
@ -1963,13 +2011,13 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"fill": 0, "fill": 0,
"gridPos": { "gridPos": {
"h": 9, "h": 9,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 43 "y": 46
}, },
"id": 7, "id": 7,
"legend": { "legend": {
@ -1982,7 +2030,7 @@
"min": true, "min": true,
"rightSide": true, "rightSide": true,
"show": true, "show": true,
"sort": "current", "sort": "min",
"sortDesc": true, "sortDesc": true,
"total": false, "total": false,
"values": true "values": true
@ -2102,13 +2150,13 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"fill": 0, "fill": 0,
"gridPos": { "gridPos": {
"h": 9, "h": 9,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 43 "y": 46
}, },
"id": 10, "id": 10,
"legend": { "legend": {
@ -2241,13 +2289,13 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"fill": 0, "fill": 0,
"gridPos": { "gridPos": {
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 0, "x": 0,
"y": 52 "y": 55
}, },
"id": 6, "id": 6,
"legend": { "legend": {
@ -2380,14 +2428,14 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"description": "", "description": "",
"fill": 0, "fill": 0,
"gridPos": { "gridPos": {
"h": 8, "h": 8,
"w": 12, "w": 12,
"x": 12, "x": 12,
"y": 52 "y": 55
}, },
"id": 19, "id": 19,
"legend": { "legend": {
@ -2521,11 +2569,8 @@
"list": [ "list": [
{ {
"allValue": null, "allValue": null,
"current": { "current": {},
"text": "All", "datasource": "${DS_UNIFI}",
"value": "$__all"
},
"datasource": "Unifi",
"definition": "show tag values from \"clients\" with key=\"site_name\"", "definition": "show tag values from \"clients\" with key=\"site_name\"",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,
@ -2546,14 +2591,8 @@
}, },
{ {
"allValue": null, "allValue": null,
"current": { "current": {},
"tags": [], "datasource": "${DS_UNIFI}",
"text": "All",
"value": [
"$__all"
]
},
"datasource": "Unifi",
"definition": "show tag values from \"clients\" with key=\"ap_mac\" where site_name =~ /$Site$/", "definition": "show tag values from \"clients\" with key=\"ap_mac\" where site_name =~ /$Site$/",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,
@ -2574,13 +2613,8 @@
}, },
{ {
"allValue": null, "allValue": null,
"current": { "current": {},
"text": "All", "datasource": "${DS_UNIFI}",
"value": [
"$__all"
]
},
"datasource": "Unifi",
"definition": "show tag values from \"clients\" with key=\"name\" where site_name =~ /$Site$/", "definition": "show tag values from \"clients\" with key=\"name\" where site_name =~ /$Site$/",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,
@ -2628,7 +2662,7 @@
] ]
}, },
"timezone": "", "timezone": "",
"title": "Unifi Clients", "title": "Unifi Client Insights",
"uid": "YVR23BZiz", "uid": "YVR23BZiz",
"version": 45 "version": 48
} }

View File

@ -1,4 +1,58 @@
{ {
"__inputs": [
{
"name": "DS_UNIFI",
"label": "Unifi",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "6.2.1"
},
{
"type": "panel",
"id": "grafana-clock-panel",
"name": "Clock",
"version": "0.1.0"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "influxdb",
"name": "InfluxDB",
"version": "1.0.0"
},
{
"type": "panel",
"id": "singlestat",
"name": "Singlestat",
"version": ""
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
},
{
"type": "panel",
"id": "text",
"name": "Text",
"version": ""
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@ -16,13 +70,13 @@
"editable": true, "editable": true,
"gnetId": 1486, "gnetId": 1486,
"graphTooltip": 1, "graphTooltip": 1,
"id": 7, "id": null,
"iteration": 1559783373023, "iteration": 1559859372283,
"links": [], "links": [],
"panels": [ "panels": [
{ {
"columns": [], "columns": [],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"editable": true, "editable": true,
"error": false, "error": false,
"fontSize": "100%", "fontSize": "100%",
@ -504,11 +558,21 @@
"offsetFromUtc": null, "offsetFromUtc": null,
"offsetFromUtcMinutes": null, "offsetFromUtcMinutes": null,
"options": {}, "options": {},
"refreshSettings": {
"syncWithDashboard": false
},
"timeSettings": { "timeSettings": {
"customFormat": "HH:mm:ss", "customFormat": "HH:mm:ss",
"fontSize": "30px", "fontSize": "30px",
"fontWeight": "normal" "fontWeight": "normal"
}, },
"timezone": null,
"timezoneSettings": {
"fontSize": "12px",
"fontWeight": "normal",
"showTimezone": false,
"zoneFormat": "offsetAbbv"
},
"title": "Now", "title": "Now",
"type": "grafana-clock-panel" "type": "grafana-clock-panel"
}, },
@ -521,7 +585,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)" "rgba(50, 172, 45, 0.97)"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"editable": true, "editable": true,
"error": false, "error": false,
"format": "none", "format": "none",
@ -642,7 +706,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)" "rgba(50, 172, 45, 0.97)"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"editable": true, "editable": true,
"error": false, "error": false,
"format": "none", "format": "none",
@ -759,7 +823,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"#d44a3a" "#d44a3a"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 1, "decimals": 1,
"format": "percent", "format": "percent",
"gauge": { "gauge": {
@ -875,7 +939,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"#d44a3a" "#d44a3a"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 3, "decimals": 3,
"format": "dtdurations", "format": "dtdurations",
"gauge": { "gauge": {
@ -989,7 +1053,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)" "rgba(50, 172, 45, 0.97)"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"editable": true, "editable": true,
"error": false, "error": false,
"format": "none", "format": "none",
@ -1112,7 +1176,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)" "rgba(50, 172, 45, 0.97)"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"editable": true, "editable": true,
"error": false, "error": false,
"format": "none", "format": "none",
@ -1225,7 +1289,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 0, "fill": 0,
@ -1378,7 +1442,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -1531,7 +1595,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -1671,7 +1735,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"editable": true, "editable": true,
"error": false, "error": false,
@ -1859,7 +1923,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 0, "fill": 0,
@ -2043,7 +2107,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 0, "fill": 0,
@ -2226,7 +2290,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -2422,7 +2486,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"editable": true, "editable": true,
"error": false, "error": false,
"fill": 1, "fill": 1,
@ -2618,7 +2682,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"description": "PPS on the na band calculated in 30 second buckets.", "description": "PPS on the na band calculated in 30 second buckets.",
"editable": true, "editable": true,
@ -2803,7 +2867,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"description": "PPS on the ng band calculated in 30 second buckets.", "description": "PPS on the ng band calculated in 30 second buckets.",
"editable": true, "editable": true,
@ -2990,7 +3054,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"editable": true, "editable": true,
"error": false, "error": false,
@ -3302,7 +3366,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"editable": true, "editable": true,
"error": false, "error": false,
@ -3629,13 +3693,8 @@
}, },
{ {
"allValue": null, "allValue": null,
"current": { "current": {},
"text": "All", "datasource": "${DS_UNIFI}",
"value": [
"$__all"
]
},
"datasource": "Unifi",
"definition": "show tag values from \"uap\" with key=\"site_name\"", "definition": "show tag values from \"uap\" with key=\"site_name\"",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,
@ -3656,13 +3715,8 @@
}, },
{ {
"allValue": null, "allValue": null,
"current": { "current": {},
"text": "All", "datasource": "${DS_UNIFI}",
"value": [
"$__all"
]
},
"datasource": "Unifi",
"definition": "show tag values from \"uap\" with key=\"name\" where site_name =~ /$Site$/", "definition": "show tag values from \"uap\" with key=\"name\" where site_name =~ /$Site$/",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,

View File

@ -1,4 +1,58 @@
{ {
"__inputs": [
{
"name": "DS_UNIFI",
"label": "Unifi",
"description": "",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "6.2.1"
},
{
"type": "panel",
"id": "grafana-clock-panel",
"name": "Clock",
"version": "0.1.0"
},
{
"type": "panel",
"id": "graph",
"name": "Graph",
"version": ""
},
{
"type": "datasource",
"id": "influxdb",
"name": "InfluxDB",
"version": "1.0.0"
},
{
"type": "panel",
"id": "singlestat",
"name": "Singlestat",
"version": ""
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
},
{
"type": "panel",
"id": "text",
"name": "Text",
"version": ""
}
],
"annotations": { "annotations": {
"list": [ "list": [
{ {
@ -17,8 +71,8 @@
"editable": true, "editable": true,
"gnetId": 1486, "gnetId": 1486,
"graphTooltip": 1, "graphTooltip": 1,
"id": 9, "id": null,
"iteration": 1559783436821, "iteration": 1559859384864,
"links": [], "links": [],
"panels": [ "panels": [
{ {
@ -39,7 +93,7 @@
}, },
{ {
"columns": [], "columns": [],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"editable": true, "editable": true,
"error": false, "error": false,
"fontSize": "100%", "fontSize": "100%",
@ -504,7 +558,7 @@
"#3f2b5b", "#3f2b5b",
"#511749" "#511749"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 3, "decimals": 3,
"format": "dtdurations", "format": "dtdurations",
"gauge": { "gauge": {
@ -612,7 +666,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"#d44a3a" "#d44a3a"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"format": "none", "format": "none",
"gauge": { "gauge": {
@ -723,7 +777,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"#d44a3a" "#d44a3a"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 1, "decimals": 1,
"description": "", "description": "",
"format": "ms", "format": "ms",
@ -841,7 +895,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"#299c46" "#299c46"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 1, "decimals": 1,
"description": "", "description": "",
"format": "Mbits", "format": "Mbits",
@ -959,7 +1013,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"#299c46" "#299c46"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 1, "decimals": 1,
"description": "", "description": "",
"format": "Mbits", "format": "Mbits",
@ -1077,7 +1131,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"#d44a3a" "#d44a3a"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 1, "decimals": 1,
"format": "percent", "format": "percent",
"gauge": { "gauge": {
@ -1194,7 +1248,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"#d44a3a" "#d44a3a"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 1, "decimals": 1,
"description": "", "description": "",
"format": "percent", "format": "percent",
@ -1311,7 +1365,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"#d44a3a" "#d44a3a"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"format": "none", "format": "none",
"gauge": { "gauge": {
@ -1439,11 +1493,21 @@
"offsetFromUtc": null, "offsetFromUtc": null,
"offsetFromUtcMinutes": null, "offsetFromUtcMinutes": null,
"options": {}, "options": {},
"refreshSettings": {
"syncWithDashboard": false
},
"timeSettings": { "timeSettings": {
"customFormat": "HH:mm:ss", "customFormat": "HH:mm:ss",
"fontSize": "24px", "fontSize": "24px",
"fontWeight": "normal" "fontWeight": "normal"
}, },
"timezone": null,
"timezoneSettings": {
"fontSize": "12px",
"fontWeight": "normal",
"showTimezone": false,
"zoneFormat": "offsetAbbv"
},
"title": "Now", "title": "Now",
"type": "grafana-clock-panel" "type": "grafana-clock-panel"
}, },
@ -1456,7 +1520,7 @@
"rgba(237, 129, 40, 0.89)", "rgba(237, 129, 40, 0.89)",
"#d44a3a" "#d44a3a"
], ],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"format": "none", "format": "none",
"gauge": { "gauge": {
@ -1563,7 +1627,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 2, "decimals": 2,
"description": "", "description": "",
"editable": true, "editable": true,
@ -1722,7 +1786,7 @@
}, },
{ {
"columns": [], "columns": [],
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"fontSize": "90%", "fontSize": "90%",
"gridPos": { "gridPos": {
"h": 7, "h": 7,
@ -2483,7 +2547,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"description": "Spikes on this graph that are missing from the LAN graph indicate gateway-originated traffic, like a scheduled speed test.", "description": "Spikes on this graph that are missing from the LAN graph indicate gateway-originated traffic, like a scheduled speed test.",
"editable": true, "editable": true,
"error": false, "error": false,
@ -2666,7 +2730,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"description": "Spikes on this graph that do not appear on the WAN graph indicate inter-VLAN-routing.", "description": "Spikes on this graph that do not appear on the WAN graph indicate inter-VLAN-routing.",
"editable": true, "editable": true,
"error": false, "error": false,
@ -2849,7 +2913,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 2, "decimals": 2,
"description": "May show problems with your WAN interface.", "description": "May show problems with your WAN interface.",
"editable": true, "editable": true,
@ -3041,7 +3105,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 2, "decimals": 2,
"description": "May show problems with your WAN interface.", "description": "May show problems with your WAN interface.",
"editable": true, "editable": true,
@ -3233,7 +3297,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"description": "PPS on the WAN interface, calculated in 30 second buckets.", "description": "PPS on the WAN interface, calculated in 30 second buckets.",
"editable": true, "editable": true,
@ -3426,7 +3490,7 @@
"bars": false, "bars": false,
"dashLength": 10, "dashLength": 10,
"dashes": false, "dashes": false,
"datasource": "Unifi", "datasource": "${DS_UNIFI}",
"decimals": 0, "decimals": 0,
"description": "PPS on the LAN interface, calculated in 30 second buckets.", "description": "PPS on the LAN interface, calculated in 30 second buckets.",
"editable": true, "editable": true,
@ -3623,11 +3687,8 @@
"list": [ "list": [
{ {
"allValue": null, "allValue": null,
"current": { "current": {},
"text": "All", "datasource": "${DS_UNIFI}",
"value": "$__all"
},
"datasource": "Unifi",
"definition": "show tag values from \"usg\" with key=\"site_name\"", "definition": "show tag values from \"usg\" with key=\"site_name\"",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,
@ -3648,13 +3709,8 @@
}, },
{ {
"allValue": null, "allValue": null,
"current": { "current": {},
"text": "gateway", "datasource": "${DS_UNIFI}",
"value": [
"gateway"
]
},
"datasource": "Unifi",
"definition": "show tag values from \"usg\" with key=\"name\" where site_name =~ /$Site$/", "definition": "show tag values from \"usg\" with key=\"name\" where site_name =~ /$Site$/",
"hide": 0, "hide": 0,
"includeAll": true, "includeAll": true,

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 KiB

File diff suppressed because it is too large Load Diff