chore(go.d/snmp): update hostname to not include IP (#20756)
Ilya Mashchenko committed
Aug 4, 2025 at 13:11 UTC
fcfb437a9671c028fb756612c525ee232ae3535c
1 file changed
+3
-4
src/go/plugin/go.d/collector/snmp/collect.go
+3
-4
@@ -115,12 +115,11 @@ func (c *Collector) setupVnode(si *snmpsd.SysInfo, deviceMeta map[string]map[str
115
"snmp-device",
116
}
117
i := slices.IndexFunc(hostnames, func(s string) bool { return s != "" })
118
- c.Vnode.Hostname = fmt.Sprintf("%s(%s)", hostnames[i], c.Hostname)
118
+ c.Vnode.Hostname = hostnames[i]
119
120
labels := map[string]string{
121
- "_vnode_type": "snmp",
122
- "_clean_hostname": hostnames[i],
123
- "address": c.Hostname,
121
+ "_vnode_type": "snmp",
122
+ "address": c.Hostname,
123
}
124
125
maps.Copy(labels, c.Vnode.Labels)