From 0675c90819fbf42128bac763965d1dac9a845dc5 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. --- integrations/inputunifi/examples/README.md | 4 +++- integrations/inputunifi/examples/up.xml.example | 5 ++--- integrations/inputunifi/pkg/unifi-poller/unifi.go | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/integrations/inputunifi/examples/README.md b/integrations/inputunifi/examples/README.md index d9799785..3522385f 100644 --- a/integrations/inputunifi/examples/README.md +++ b/integrations/inputunifi/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/integrations/inputunifi/examples/up.xml.example b/integrations/inputunifi/examples/up.xml.example index 9054d75d..dfb6a07f 100644 --- a/integrations/inputunifi/examples/up.xml.example +++ b/integrations/inputunifi/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/integrations/inputunifi/pkg/unifi-poller/unifi.go b/integrations/inputunifi/pkg/unifi-poller/unifi.go index 19c39c96..816d8db1 100644 --- a/integrations/inputunifi/pkg/unifi-poller/unifi.go +++ b/integrations/inputunifi/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: