diff --git a/main.go b/main.go index 0e0bb20..4607828 100644 --- a/main.go +++ b/main.go @@ -26,7 +26,7 @@ const ( // flags var configPath = flag.String("configPath", "config.json", "Path to config.json") var version = "development" -var delay time.Duration = 60 * time.Second +var delay time.Duration = 5 * time.Second var conf = loadconfig(*configPath) var ucDev = getDevices(conf.Unifi.UCDevicesURL) @@ -100,14 +100,16 @@ func processUcAPIs() ([]node, []link) { if isRemoteMACpublished(jsonDevice.MAC, d.Devices) == true { links = ucAddLink(jsonDevice, links) } - load, err := strconv.ParseFloat(currentDevice.Sysstats.CPU, 64) if err != nil { - log.Fatalln(err) + fmt.Println("Error: ", currentDevice.Name) + //log.Fatalln(err) + load = 0 } mem, err := strconv.ParseFloat(currentDevice.Sysstats.Memory, 64) if err != nil { - log.Fatalln(err) + //log.Fatalln(err) + load = 0 } var model = lookupModels(currentDevice.Model) var clients = currentDevice.Users