Add port flap and port down error tracking with faster ping

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-01-31 13:01:07 -08:00
parent d1b4de01e8
commit 5a7596b456
5 changed files with 88 additions and 15 deletions

View File

@@ -360,6 +360,7 @@ type Interface struct {
Name string `json:"name,omitempty"`
MAC MAC `json:"mac"`
IPs IPSet `json:"ips,omitempty"`
Up bool `json:"up,omitempty"`
Stats *InterfaceStats `json:"stats,omitempty"`
}
@@ -368,6 +369,7 @@ func (i *Interface) MarshalJSON() ([]byte, error) {
Name string `json:"name,omitempty"`
MAC MAC `json:"mac"`
IPs []string `json:"ips,omitempty"`
Up bool `json:"up,omitempty"`
Stats *InterfaceStats `json:"stats,omitempty"`
}
var ips []string
@@ -378,6 +380,7 @@ func (i *Interface) MarshalJSON() ([]byte, error) {
Name: i.Name,
MAC: i.MAC,
IPs: ips,
Up: i.Up,
Stats: i.Stats,
})
}