mirror of
https://github.com/unpoller/unpoller.git
synced 2026-04-05 08:54:09 -04:00
feat: add controller sysinfo metrics (unpoller#927)
- Add Sysinfo collection from stat/sysinfo endpoint - Export controller_info, uptime, update_available, data retention, ports - Hostname fallback: name, then site_name when API omits hostname - Apply site name override to Sysinfo for remote/cloud - Add Discover/Discoverer for endpoint discovery - Require unpoller/unifi v5.15.0 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -24,8 +24,7 @@ type Input interface {
|
||||
DebugInput() (bool, error)
|
||||
}
|
||||
|
||||
// Discoverer is an optional interface for inputs that can discover API endpoints
|
||||
// on a controller and write a shareable report (e.g. for support/debugging).
|
||||
// Discoverer is an optional interface for inputs that can discover API endpoints.
|
||||
type Discoverer interface {
|
||||
Discover(outputPath string) error
|
||||
}
|
||||
@@ -277,6 +276,7 @@ func AppendMetrics(existing *Metrics, m *Metrics) *Metrics {
|
||||
existing.CountryTraffic = append(existing.CountryTraffic, m.CountryTraffic...)
|
||||
existing.DHCPLeases = append(existing.DHCPLeases, m.DHCPLeases...)
|
||||
existing.WANConfigs = append(existing.WANConfigs, m.WANConfigs...)
|
||||
existing.Sysinfos = append(existing.Sysinfos, m.Sysinfos...)
|
||||
|
||||
return existing
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user