mirror of
https://github.com/slackhq/nebula.git
synced 2025-12-06 02:30:57 -08:00
add metrics for the udp sockets using SO_MEMINFO (#390)
Retrieve the current socket stats using SO_MEMINFO and report them as metrics gauges. If SO_MEMINFO isn't supported, we don't report these metrics.
This commit is contained in:
parent
ecfb40f29c
commit
d232ccbfab
3 changed files with 69 additions and 0 deletions
|
|
@ -268,8 +268,13 @@ func (f *Interface) reloadFirewall(c *Config) {
|
|||
|
||||
func (f *Interface) emitStats(i time.Duration) {
|
||||
ticker := time.NewTicker(i)
|
||||
|
||||
udpStats := NewUDPStatsEmitter(f.writers)
|
||||
|
||||
for range ticker.C {
|
||||
f.firewall.EmitStats()
|
||||
f.handshakeManager.EmitStats()
|
||||
|
||||
udpStats()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue