Compare commits

..

2 Commits

Author SHA1 Message Date
Stefan Hoffmann
7630e90b90 delay time = 60
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2021-02-14 00:40:40 +01:00
Stefan Hoffmann
1c1f556e24 types 2021-02-14 00:40:03 +01:00
2 changed files with 19 additions and 19 deletions

View File

@ -25,7 +25,7 @@ const (
// flags // flags
var configPath = flag.String("configPath", "config.json", "Path to config.json") var configPath = flag.String("configPath", "config.json", "Path to config.json")
var version = "development" var version = "development"
var delay time.Duration = 5 * time.Second var delay time.Duration = 60 * time.Second
var conf = loadconfig(*configPath) var conf = loadconfig(*configPath)
var ucDev = getDevices(conf.Unifi.UCDevicesURL) var ucDev = getDevices(conf.Unifi.UCDevicesURL)

View File

@ -97,34 +97,34 @@ type link struct {
} }
type node struct { type node struct {
Firstseen string `json:"firstseen,omitempty"` Firstseen string `json:"firstseen"`
Lastseen string `json:"lastseen,omitempty"` Lastseen string `json:"lastseen"`
IsOnline bool `json:"is_online,omitempty"` IsOnline bool `json:"is_online"`
IsGateway bool `json:"is_gateway,omitempty"` IsGateway bool `json:"is_gateway,omitempty"`
Clients int `json:"clients,omitempty"` Clients int `json:"clients"`
ClientsWifi24 int `json:"clients_wifi24,omitempty"` ClientsWifi24 int `json:"clients_wifi24"`
ClientsWifi5 int `json:"clients_wifi5,omitempty"` ClientsWifi5 int `json:"clients_wifi5"`
ClientsOther int `json:"clients_other,omitempty"` ClientsOther int `json:"clients_other"`
RootFSUsage int `json:"rootfs_usage,omitempty"` RootFSUsage int `json:"rootfs_usage,omitempty"`
LoadAVG float64 `json:"loadavg,omitempty"` LoadAVG float64 `json:"loadavg,omitempty"`
MemoryUsage float64 `json:"memory_usage,omitempty"` MemoryUsage float64 `json:"memory_usage,omitempty"`
Uptime string `json:"uptime,omitempty"` Uptime string `json:"uptime"`
GatewayNexthop string `json:"gateway_nexthop,omitempty"` GatewayNexthop string `json:"gateway_nexthop"`
Gateway string `json:"gateway,omitempty"` Gateway string `json:"gateway"`
Location *struct { Location *struct {
Longitude float64 `json:"longitude"` Longitude float64 `json:"longitude"`
Latitude float64 `json:"latitude"` Latitude float64 `json:"latitude"`
} `json:"location,omitempty"` } `json:"location,omitempty"`
NodeID string `json:"node_id,omitempty"` NodeID string `json:"node_id"`
MAC string `json:"mac,omitempty"` MAC string `json:"mac"`
Adresses []string `json:"addresses,omitempty"` Adresses []string `json:"addresses"`
Domain string `json:"domain,omitempty"` Domain string `json:"domain"`
Hostname string `json:"hostname,omitempty"` Hostname string `json:"hostname"`
Owner string `json:"owner,omitempty"` Owner string `json:"owner"`
Firmware firmware `json:"firmware"` Firmware firmware `json:"firmware"`
Autoupdater autoupdater `json:"autoupdater"` Autoupdater autoupdater `json:"autoupdater"`
NProc int `json:"nproc,omitempty"` NProc int `json:"nproc"`
Model string `json:"model,omitempty"` Model string `json:"model"`
} }
type firmware struct { type firmware struct {