From b0f04629955e25e6fee0a954960080de331a0d73 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Thu, 5 Oct 2023 09:12:24 +0200 Subject: [PATCH] Use stype and stype-id for the NIC in NetstatCollector --- collectors/netstatMetric.go | 2 +- collectors/netstatMetric.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/collectors/netstatMetric.go b/collectors/netstatMetric.go index 8428df1..2ae1764 100644 --- a/collectors/netstatMetric.go +++ b/collectors/netstatMetric.go @@ -102,7 +102,7 @@ func (m *NetstatCollector) Init(config json.RawMessage) error { // Check if device is a included device if _, ok := stringArrayContains(m.config.IncludeDevices, dev); ok { - tags := map[string]string{"device": dev, "type": "node"} + tags := map[string]string{"stype": "network", "stype-id": dev, "type": "node"} meta_unit_byte := map[string]string{"source": m.name, "group": "Network", "unit": "bytes"} meta_unit_byte_per_sec := map[string]string{"source": m.name, "group": "Network", "unit": "bytes/sec"} meta_unit_pkts := map[string]string{"source": m.name, "group": "Network", "unit": "packets"} diff --git a/collectors/netstatMetric.md b/collectors/netstatMetric.md index 424cf77..7ce0af9 100644 --- a/collectors/netstatMetric.md +++ b/collectors/netstatMetric.md @@ -23,5 +23,5 @@ Metrics: * `net_pkts_in_bw` (`unit=packets/sec` if `send_derived_values == true`) * `net_pkts_out_bw` (`unit=packets/sec` if `send_derived_values == true`) -The device name is added as tag `device`. +The device name is added as tag `stype=network,stype-id=`.