mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-26 15:29:04 +01:00
Prefix metrics from NetstatCollector with 'net'
This commit is contained in:
parent
02cd21abe2
commit
66b9a25a88
@ -7,6 +7,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
lp "github.com/ClusterCockpit/cc-metric-collector/internal/ccMetric"
|
lp "github.com/ClusterCockpit/cc-metric-collector/internal/ccMetric"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -27,10 +28,10 @@ func (m *NetstatCollector) Init(config json.RawMessage) error {
|
|||||||
m.setup()
|
m.setup()
|
||||||
m.meta = map[string]string{"source": m.name, "group": "Memory"}
|
m.meta = map[string]string{"source": m.name, "group": "Memory"}
|
||||||
m.matches = map[int]string{
|
m.matches = map[int]string{
|
||||||
1: "bytes_in",
|
1: "net_bytes_in",
|
||||||
9: "bytes_out",
|
9: "net_bytes_out",
|
||||||
2: "pkts_in",
|
2: "net_pkts_in",
|
||||||
10: "pkts_out",
|
10: "net_pkts_out",
|
||||||
}
|
}
|
||||||
if len(config) > 0 {
|
if len(config) > 0 {
|
||||||
err := json.Unmarshal(config, &m.config)
|
err := json.Unmarshal(config, &m.config)
|
||||||
|
Loading…
Reference in New Issue
Block a user