Compare commits

...

2 Commits

Author SHA1 Message Date
Stefan Hoffmann
ff9558c3ee Added some Output
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2021-03-26 14:37:53 +01:00
Stefan Hoffmann
a67089dcd5 Removed omitempty from loadavg and memory 2021-03-26 14:37:42 +01:00
2 changed files with 5 additions and 2 deletions

View File

@ -245,16 +245,19 @@ func processAPIs() {
var links []link
if conf.Unms.Enabled == true {
fmt.Println("Processing UNMS")
unmsNodes, unmsLinks := processUNMSAPI()
nodes = append(nodes, unmsNodes...)
links = append(links, unmsLinks...)
}
if conf.Unifi.Enabled == true {
fmt.Println("Processing Unifi")
ucNodes, ucLinks := processUcAPIs()
nodes = append(nodes, ucNodes...)
links = append(links, ucLinks...)
}
if conf.Meshviewer.Enabled == true {
fmt.Println("Processing Meshviewer")
mvNodes, mvLinks := getMeshviewer()
nodes = append(nodes, mvNodes...)
links = append(links, mvLinks...)

View File

@ -107,8 +107,8 @@ type node struct {
ClientsWifi5 int `json:"clients_wifi5"`
ClientsOther int `json:"clients_other"`
RootFSUsage int `json:"rootfs_usage,omitempty"`
LoadAVG float64 `json:"loadavg,omitempty"`
MemoryUsage float64 `json:"memory_usage,omitempty"`
LoadAVG float64 `json:"loadavg"`
MemoryUsage float64 `json:"memory_usage"`
Uptime string `json:"uptime"`
GatewayNexthop string `json:"gateway_nexthop"`
Gateway string `json:"gateway"`