From 06b36bf7d7695dbcd0961aff6cc4a3e529ca3388 Mon Sep 17 00:00:00 2001 From: David Newhall II Date: Fri, 21 Jun 2019 04:22:10 -0700 Subject: [PATCH] Tested and working. --- examples/README.md | 4 +++- examples/up.xml.example | 5 ++--- pkg/unifi-poller/unifi.go | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/README.md b/examples/README.md index d9799785..3522385f 100644 --- a/examples/README.md +++ b/examples/README.md @@ -14,4 +14,6 @@ new benefits to the existing dashboards. When that happens I update them. Keeping an Example set allows you to update too, inspect the changes, and apply them to your own custom dashboards. -This folder also contains an example configuration file and some dashboard screenshots. +This folder also contains dashboard screenshots and example configuration files in four supported formats. +You can use any format you want for the config file, just give it the appropriate prefix for the format. +ie. an xml file should end with `.xml`. diff --git a/examples/up.xml.example b/examples/up.xml.example index 9054d75d..dfb6a07f 100644 --- a/examples/up.xml.example +++ b/examples/up.xml.example @@ -7,9 +7,8 @@ 30s 0 false - - default - +default +site2 4BB9345C-2341-48D7-99F5-E01B583FF77F https://127.0.0.1:8443 influxdb diff --git a/pkg/unifi-poller/unifi.go b/pkg/unifi-poller/unifi.go index 19c39c96..816d8db1 100644 --- a/pkg/unifi-poller/unifi.go +++ b/pkg/unifi-poller/unifi.go @@ -22,6 +22,7 @@ func (u *UnifiPoller) CheckSites() error { } u.Logf("Found %d site(s) on controller: %v", len(msg), strings.Join(msg, ", ")) if StringInSlice("all", u.Sites) { + u.Sites = []string{"all"} return nil } FIRST: