@cryptotaxi247 / netdata / commits / 8c43c26cc

improvement(go.d/snmp): create table charts (#20471)

Ilya Mashchenko committed Jun 13, 2025 at 08:43 UTC 8c43c26ccc3e52a2ed110a1948ddd938629fc05b
8 files changed +210 -115
src/go/plugin/go.d/collector/snmp/charts.go
+57 -2
@@ -315,7 +315,7 @@ func newUserInputChart(cfg ChartConfig) (*module.Chart, error) {
315 return chart, nil
316 }
317
318 -func (c *Collector) addProfileScalarMetricChart(pm *ddsnmpcollector.ProfileMetrics, m ddsnmpcollector.Metric) {
318 +func (c *Collector) addProfileScalarMetricChart(m ddsnmpcollector.Metric) {
319 if m.Name == "" {
320 return
321 }
@@ -343,7 +343,8 @@ func (c *Collector) addProfileScalarMetricChart(pm *ddsnmpcollector.ProfileMetri
343 "vendor": c.sysInfo.Organization,
344 "sysName": c.sysInfo.Name,
345 }
346 - maps.Copy(tags, pm.Tags)
346 +
347 + maps.Copy(tags, m.Profile.Tags)
348 for k, v := range tags {
349 chart.Labels = append(chart.Labels, module.Label{Key: k, Value: v})
350 }
@@ -365,6 +366,60 @@ func (c *Collector) addProfileScalarMetricChart(pm *ddsnmpcollector.ProfileMetri
366 }
367 }
368
369 +func (c *Collector) addProfileTableMetricChart(m ddsnmpcollector.Metric) {
370 + if m.Name == "" {
371 + return
372 + }
373 +
374 + key := tableMetricKey(m)
375 +
376 + r := strings.NewReplacer(".", "_", " ", "_")
377 + chart := &module.Chart{
378 + ID: fmt.Sprintf("snmp_device_prof_%s", r.Replace(key)),
379 + Title: m.Description,
380 + Units: m.Unit,
381 + Fam: m.Family,
382 + Ctx: fmt.Sprintf("snmp.device_prof_%s", r.Replace(m.Name)),
383 + Priority: prioProfileChart,
384 + }
385 + if chart.Title == "" {
386 + chart.Title = fmt.Sprintf("SNMP metric %s", m.Name)
387 + }
388 + if chart.Units == "" {
389 + chart.Units = "1"
390 + }
391 + if chart.Fam == "" {
392 + chart.Fam = m.Name
393 + }
394 +
395 + tags := map[string]string{
396 + "vendor": c.sysInfo.Organization,
397 + "sysName": c.sysInfo.Name,
398 + }
399 + maps.Copy(tags, m.Profile.Tags)
400 + maps.Copy(tags, m.Tags)
401 +
402 + for k, v := range tags {
403 + chart.Labels = append(chart.Labels, module.Label{Key: k, Value: v})
404 + }
405 +
406 + if len(m.Mappings) > 0 {
407 + for _, v := range m.Mappings {
408 + id := fmt.Sprintf("snmp_device_prof_%s_%s", key, v)
409 + chart.Dims = append(chart.Dims, &module.Dim{ID: id, Name: v, Algo: module.Absolute})
410 + }
411 + } else {
412 + id := fmt.Sprintf("snmp_device_prof_%s", key)
413 + chart.Dims = module.Dims{
414 + {ID: id, Name: m.Name, Algo: dimAlgoFromDdSnmpType(m)},
415 + }
416 + }
417 +
418 + if err := c.Charts().Add(chart); err != nil {
419 + c.Warning(err)
420 + }
421 +}
422 +
423 func dimAlgoFromDdSnmpType(m ddsnmpcollector.Metric) module.DimAlgo {
424 if m.MetricType == ddprofiledefinition.ProfileMetricTypeGauge {
425 return module.Absolute
src/go/plugin/go.d/collector/snmp/collect_profiles.go
+79 -18
@@ -4,6 +4,8 @@ package snmp
4
5 import (
6 "fmt"
7 + "sort"
8 + "strings"
9
10 "github.com/netdata/netdata/go/plugins/plugin/go.d/collector/snmp/ddsnmp/ddsnmpcollector"
11 "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/metrix"
@@ -17,33 +19,92 @@ func (c *Collector) collectProfiles(mx map[string]int64) error {
19 c.ddSnmpColl = ddsnmpcollector.New(c.snmpClient, c.snmpProfiles, c.Logger)
20 }
21
20 - profMetrics, err := c.ddSnmpColl.Collect()
22 + pms, err := c.ddSnmpColl.Collect()
23 if err != nil {
24 return err
25 }
26
25 - for _, pm := range profMetrics {
26 - for _, m := range pm.Metrics {
27 - if m.IsTable {
28 - continue
29 - }
27 + for _, pm := range pms {
28 + c.collectProfileScalarMetrics(mx, pm)
29 + c.collectProfileTableMetrics(mx, pm)
30 + }
31 +
32 + return nil
33 +}
34 +
35 +func (c *Collector) collectProfileScalarMetrics(mx map[string]int64, pm *ddsnmpcollector.ProfileMetrics) {
36 + for _, m := range pm.Metrics {
37 + if m.IsTable || m.Name == "" {
38 + continue
39 + }
40
31 - if !c.seenScalarMetrics[m.Name] {
32 - c.seenScalarMetrics[m.Name] = true
33 - c.addProfileScalarMetricChart(pm, m)
41 + if !c.seenScalarMetrics[m.Name] {
42 + c.seenScalarMetrics[m.Name] = true
43 + c.addProfileScalarMetricChart(m)
44 + }
45 +
46 + if len(m.Mappings) == 0 {
47 + id := fmt.Sprintf("snmp_device_prof_%s", m.Name)
48 + mx[id] = m.Value
49 + } else {
50 + for k, v := range m.Mappings {
51 + id := fmt.Sprintf("snmp_device_prof_%s_%s", m.Name, v)
52 + mx[id] = metrix.Bool(m.Value == k)
53 }
54 + }
55 + }
56 +}
57 +
58 +func (c *Collector) collectProfileTableMetrics(mx map[string]int64, pm *ddsnmpcollector.ProfileMetrics) {
59 + seen := make(map[string]bool)
60 +
61 + for _, m := range pm.Metrics {
62 + if !m.IsTable || m.Name == "" || len(m.Tags) == 0 {
63 + continue
64 + }
65
36 - if len(m.Mappings) > 0 {
37 - for k, v := range m.Mappings {
38 - id := fmt.Sprintf("snmp_device_prof_%s_%s", m.Name, v)
39 - mx[id] = metrix.Bool(m.Value == k)
40 - }
41 - } else {
42 - id := fmt.Sprintf("snmp_device_prof_%s", m.Name)
43 - mx[id] = m.Value
66 + key := tableMetricKey(m)
67 + seen[key] = true
68 +
69 + if !c.seenTableMetrics[key] {
70 + c.seenTableMetrics[key] = true
71 + c.addProfileTableMetricChart(m)
72 + }
73 +
74 + if len(m.Mappings) == 0 {
75 + id := fmt.Sprintf("snmp_device_prof_%s", key)
76 + mx[id] = m.Value
77 + } else {
78 + for k, v := range m.Mappings {
79 + id := fmt.Sprintf("snmp_device_prof_%s_%s", key, v)
80 + mx[id] = metrix.Bool(m.Value == k)
81 }
82 }
83 }
84
48 - return nil
85 + for key := range c.seenTableMetrics {
86 + if !seen[key] {
87 + delete(c.seenTableMetrics, key)
88 + }
89 + }
90 +}
91 +
92 +func tableMetricKey(m ddsnmpcollector.Metric) string {
93 + keys := make([]string, 0, len(m.Tags))
94 + for k := range m.Tags {
95 + keys = append(keys, k)
96 + }
97 + sort.Strings(keys)
98 +
99 + var sb strings.Builder
100 +
101 + sb.WriteString(m.Name)
102 + for _, k := range keys {
103 + if v := m.Tags[k]; v != "" {
104 + sb.WriteString("_")
105 + sb.WriteString(m.Tags[k])
106 + }
107 + }
108 +
109 + return sb.String()
110 }
src/go/plugin/go.d/collector/snmp/collector.go
+2
@@ -63,6 +63,7 @@ func New() *Collector {
63 netInterfaces: make(map[string]*netInterface),
64
65 seenScalarMetrics: make(map[string]bool),
66 + seenTableMetrics: make(map[string]bool),
67 }
68 }
69
@@ -94,6 +95,7 @@ type Collector struct {
95 snmpProfiles []*ddsnmp.Profile
96
97 seenScalarMetrics map[string]bool
98 + seenTableMetrics map[string]bool
99 }
100
101 func (c *Collector) Configuration() any {
src/go/plugin/go.d/collector/snmp/ddsnmp/ddsnmpcollector/collect_table.go
+13 -18
@@ -25,21 +25,7 @@ func (c *Collector) collectTableMetrics(prof *ddsnmp.Profile) ([]Metric, error)
25 if cfg.IsScalar() || cfg.Table.OID == "" || doneOids[cfg.Table.OID] {
26 continue
27 }
28 - if func() bool {
29 - for _, tagCfg := range cfg.MetricTags {
30 - if tagCfg.Table != "" && tagCfg.Table != cfg.Table.Name {
31 - c.log.Debugf("Skipping table %s: has cross-table tag from %s", cfg.Table.Name, tagCfg.Table)
32 - return true
33 - }
34 - if len(tagCfg.IndexTransform) > 0 {
35 - c.log.Debugf("Skipping table %s: has index transformation", cfg.Table.Name)
36 - return true
37 - }
38 - }
39 - return false
40 - }() {
41 - continue
42 - }
28 +
29 if c.missingOIDs[trimOID(cfg.Table.OID)] {
30 missingOIDs = append(missingOIDs, cfg.Table.OID)
31 continue
@@ -66,6 +52,17 @@ func (c *Collector) collectTableMetrics(prof *ddsnmp.Profile) ([]Metric, error)
52 }
53
54 func (c *Collector) collectSingleTable(cfg ddprofiledefinition.MetricsConfig) ([]Metric, error) {
55 + for _, tagCfg := range cfg.MetricTags {
56 + if tagCfg.Table != "" && tagCfg.Table != cfg.Table.Name {
57 + c.log.Debugf("Skipping table %s: has cross-table tag from %s", cfg.Table.Name, tagCfg.Table)
58 + return nil, nil
59 + }
60 + if len(tagCfg.IndexTransform) > 0 {
61 + c.log.Debugf("Skipping table %s: has index transformation", cfg.Table.Name)
62 + return nil, nil
63 + }
64 + }
65 +
66 columnOIDs := make(map[string]ddprofiledefinition.SymbolConfig)
67 for _, sym := range cfg.Symbols {
68 columnOIDs[trimOID(sym.OID)] = sym
@@ -198,14 +195,12 @@ func (c *Collector) collectTableWithCache(
195 columnOIDs map[string]ddprofiledefinition.SymbolConfig,
196 ) ([]Metric, error) {
197 var oidsToGet []string
201 - oidToLocation := make(map[string]struct{ index, column string }) // full OID -> location
198
203 - for index, columns := range cachedOIDs {
199 + for _, columns := range cachedOIDs {
200 for columnOID, fullOID := range columns {
201 // Only GET metric columns, tags are cached
202 if _, isMetric := columnOIDs[columnOID]; isMetric {
203 oidsToGet = append(oidsToGet, fullOID)
208 - oidToLocation[trimOID(fullOID)] = struct{ index, column string }{index, columnOID}
204 }
205 }
206 }
src/go/plugin/go.d/collector/snmp/ddsnmp/ddsnmpcollector/collector.go
+10 -3
@@ -26,6 +26,7 @@ type (
26 Metrics []Metric
27 }
28 Metric struct {
29 + Profile *ProfileMetrics
30 Name string
31 Description string
32 Family string
@@ -45,7 +46,8 @@ func New(snmpClient gosnmp.Handler, profiles []*ddsnmp.Profile, log *logger.Logg
46 snmpClient: snmpClient,
47 profiles: make(map[string]*profileState),
48 missingOIDs: make(map[string]bool),
48 - tableCache: newTableCache(5*time.Minute, 0.2), // 5 min TTL with 20% jitter
49 + tableCache: newTableCache(5*time.Minute, 1), // 5 min TTL with 100% jitter
50 + //doTableMetrics: true,
51 }
52
53 for _, prof := range profiles {
@@ -136,12 +138,17 @@ func (c *Collector) collectProfile(ps *profileState) (*ProfileMetrics, error) {
138 metrics = append(metrics, tableMetrics...)
139 }
140
139 - return &ProfileMetrics{
141 + pm := &ProfileMetrics{
142 Source: ps.profile.SourceFile,
143 DeviceMetadata: maps.Clone(ps.deviceMetadata),
144 Tags: maps.Clone(ps.globalTags),
145 Metrics: metrics,
144 - }, nil
146 + }
147 + for i := range pm.Metrics {
148 + pm.Metrics[i].Profile = pm
149 + }
150 +
151 + return pm, nil
152 }
153
154 func (c *Collector) updateMetricFamily(pms []*ProfileMetrics) {
src/go/plugin/go.d/collector/snmp/ddsnmp/ddsnmpcollector/collector_test.go
+26
@@ -71,6 +71,7 @@ func TestCollector_Collect(t *testing.T) {
71 },
72 expectedResult: []*ProfileMetrics{
73 {
74 + Source: "test-profile.yaml",
75 DeviceMetadata: nil,
76 Metrics: []Metric{
77 {
@@ -138,6 +139,7 @@ func TestCollector_Collect(t *testing.T) {
139 },
140 expectedResult: []*ProfileMetrics{
141 {
142 + Source: "test-profile.yaml",
143 DeviceMetadata: nil,
144 Tags: map[string]string{"device_vendor": "Cisco IOS"},
145 Metrics: []Metric{
@@ -211,6 +213,7 @@ func TestCollector_Collect(t *testing.T) {
213 },
214 expectedResult: []*ProfileMetrics{
215 {
216 + Source: "test-profile.yaml",
217 DeviceMetadata: map[string]string{
218 "vendor": "dell",
219 "serial_number": "ABC123",
@@ -259,6 +262,7 @@ func TestCollector_Collect(t *testing.T) {
262 },
263 expectedResult: []*ProfileMetrics{
264 {
265 + Source: "test-profile.yaml",
266 DeviceMetadata: nil,
267 Metrics: []Metric{
268 {
@@ -387,6 +391,7 @@ func TestCollector_Collect(t *testing.T) {
391 },
392 expectedResult: []*ProfileMetrics{
393 {
394 + Source: "profile1.yaml",
395 DeviceMetadata: nil,
396 Metrics: []Metric{
397 {
@@ -432,6 +437,7 @@ func TestCollector_Collect(t *testing.T) {
437 },
438 expectedResult: []*ProfileMetrics{
439 {
440 + Source: "test-profile.yaml",
441 DeviceMetadata: nil,
442 Metrics: []Metric{
443 {
@@ -502,6 +508,7 @@ func TestCollector_Collect(t *testing.T) {
508 },
509 expectedResult: []*ProfileMetrics{
510 {
511 + Source: "test-profile.yaml",
512 DeviceMetadata: nil,
513 Tags: map[string]string{"device_type": "router"},
514 Metrics: []Metric{
@@ -572,6 +579,7 @@ func TestCollector_Collect(t *testing.T) {
579 },
580 expectedResult: []*ProfileMetrics{
581 {
582 + Source: "test-profile.yaml",
583 DeviceMetadata: nil,
584 Metrics: []Metric{
585 {
@@ -628,6 +636,7 @@ func TestCollector_Collect(t *testing.T) {
636 },
637 expectedResult: []*ProfileMetrics{
638 {
639 + Source: "test-profile.yaml",
640 DeviceMetadata: nil,
641 Metrics: []Metric{
642 {
@@ -685,6 +694,7 @@ func TestCollector_Collect(t *testing.T) {
694 },
695 expectedResult: []*ProfileMetrics{
696 {
697 + Source: "test-profile.yaml",
698 DeviceMetadata: nil,
699 Metrics: []Metric{
700 {
@@ -739,6 +749,7 @@ func TestCollector_Collect(t *testing.T) {
749 },
750 expectedResult: []*ProfileMetrics{
751 {
752 + Source: "test-profile.yaml",
753 DeviceMetadata: nil,
754 Metrics: []Metric{
755 {
@@ -864,6 +875,7 @@ func TestCollector_Collect(t *testing.T) {
875 },
876 expectedResult: []*ProfileMetrics{
877 {
878 + Source: "test-profile.yaml",
879 DeviceMetadata: nil,
880 Metrics: []Metric{
881 {
@@ -955,6 +967,7 @@ func TestCollector_Collect(t *testing.T) {
967 },
968 expectedResult: []*ProfileMetrics{
969 {
970 + Source: "test-profile.yaml",
971 DeviceMetadata: nil,
972 Metrics: []Metric{
973 {
@@ -1059,6 +1072,7 @@ func TestCollector_Collect(t *testing.T) {
1072 },
1073 expectedResult: []*ProfileMetrics{
1074 {
1075 + Source: "test-profile.yaml",
1076 DeviceMetadata: nil,
1077 Metrics: []Metric{
1078 {
@@ -1133,6 +1147,7 @@ func TestCollector_Collect(t *testing.T) {
1147 },
1148 expectedResult: []*ProfileMetrics{
1149 {
1150 + Source: "test-profile.yaml",
1151 DeviceMetadata: nil,
1152 Metrics: []Metric{
1153 {
@@ -1200,6 +1215,7 @@ func TestCollector_Collect(t *testing.T) {
1215 },
1216 expectedResult: []*ProfileMetrics{
1217 {
1218 + Source: "test-profile.yaml",
1219 DeviceMetadata: nil,
1220 Metrics: []Metric{
1221 {
@@ -1279,6 +1295,7 @@ func TestCollector_Collect(t *testing.T) {
1295 },
1296 expectedResult: []*ProfileMetrics{
1297 {
1298 + Source: "test-profile.yaml",
1299 DeviceMetadata: nil,
1300 Metrics: []Metric{
1301 {
@@ -1316,6 +1333,15 @@ func TestCollector_Collect(t *testing.T) {
1333
1334 result, err := collector.Collect()
1335
1336 + // The Metric struct has a Profile field that contains a pointer to ProfileMetrics,
1337 + // which itself contains the Metrics slice.
1338 + // This creates a circular reference that makes ElementsMatch fail.
1339 + for _, profile := range result {
1340 + for i := range profile.Metrics {
1341 + profile.Metrics[i].Profile = nil
1342 + }
1343 + }
1344 +
1345 if tc.expectedError {
1346 assert.Error(t, err)
1347 if tc.errorContains != "" {
src/go/plugin/go.d/collector/snmp/ddsnmp/ddsnmpcollector/table_cache.go
+6 -6
@@ -49,10 +49,10 @@ func (tc *tableCache) calculateTableTTL() time.Duration {
49 base := float64(tc.baseTTL)
50 jitter := tc.jitterPct
51
52 - // Random jitter between -jitterPct and +jitterPct
52 + // Random jitter between 0 and +jitterPct
53 // Note: This is called from within lock, so don't acquire lock here
54 randFloat := tc.rng.Float64()
55 - multiplier := 1.0 + (randFloat*2-1)*jitter
55 + multiplier := 1.0 + randFloat*jitter
56
57 return time.Duration(base * multiplier)
58 }
@@ -65,13 +65,13 @@ func (tc *tableCache) getCachedData(tableOID string) (oids map[string]map[string
65 return nil, nil, false
66 }
67
68 - timestamp, exists := tc.timestamps[tableOID]
69 - if !exists {
68 + timestamp, ok := tc.timestamps[tableOID]
69 + if !ok {
70 return nil, nil, false
71 }
72
73 - ttl, exists := tc.tableTTLs[tableOID]
74 - if !exists || time.Since(timestamp) > ttl {
73 + ttl, ok := tc.tableTTLs[tableOID]
74 + if !ok || time.Since(timestamp) > ttl {
75 return nil, nil, false
76 }
77
src/go/plugin/go.d/config/go.d/snmp.profiles/default/_generic-if.yaml
+17 -68
@@ -1,39 +1,13 @@
1 # Generic network interfaces abstract profile.
2 # MIB: IF-MIB
3
4 -metadata:
5 - interface:
6 - fields:
7 - name:
8 - symbol:
9 - OID: 1.3.6.1.2.1.31.1.1.1.1
10 - name: ifName
11 - description:
12 - symbol:
13 - OID: 1.3.6.1.2.1.2.2.1.2
14 - name: ifDescr
15 - mac_address:
16 - symbol:
17 - OID: 1.3.6.1.2.1.2.2.1.6
18 - name: ifPhysAddress
19 - format: mac_address
20 - alias:
21 - symbol:
22 - OID: 1.3.6.1.2.1.31.1.1.1.18
23 - name: ifAlias
24 - id_tags:
25 - - symbol:
26 - OID: 1.3.6.1.2.1.31.1.1.1.1
27 - name: ifName
28 - tag: interface
29 -
4 metrics:
5 - MIB: IF-MIB
6 symbol:
7 OID: 1.3.6.1.2.1.2.1.0
8 name: ifNumber
9 description: Number of network interfaces regardless of their current state present on this system
36 - family: Network/Interfaces/Count
10 + family: Interfaces/Count
11 unit: "{interface}"
12 - MIB: IF-MIB
13 table:
@@ -44,22 +18,22 @@ metrics:
18 - OID: 1.3.6.1.2.1.2.2.1.14
19 name: ifInErrors
20 description: Number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol
47 - family: Network/Interfaces/Errors
21 + family: Interfaces/Errors
22 unit: "{error}"
23 - OID: 1.3.6.1.2.1.2.2.1.20
24 name: ifOutErrors
25 description: Number of outbound packets that could not be transmitted because of errors
52 - family: Network/Interfaces/Errors
26 + family: Interfaces/Errors
27 unit: "{error}"
28 - OID: 1.3.6.1.2.1.2.2.1.13
29 name: ifInDiscards
30 description: Number of inbound packets chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol
57 - family: Network/Interfaces/Discards
31 + family: Interfaces/Discards
32 unit: "{discard}"
33 - OID: 1.3.6.1.2.1.2.2.1.19
34 name: ifOutDiscards
35 description: Number of outbound packets chosen to be discarded even though no errors had been detected to prevent their being transmitted
62 - family: Network/Interfaces/Discards
36 + family: Interfaces/Discards
37 unit: "{discard}"
38 metric_tags:
39 - symbol:
@@ -67,11 +41,6 @@ metrics:
41 name: ifName
42 table: ifXTable
43 tag: interface
70 - - symbol:
71 - OID: 1.3.6.1.2.1.31.1.1.1.18
72 - name: ifAlias
73 - table: ifXTable
74 - tag: interface_alias
44 - MIB: IF-MIB
45 table:
46 OID: 1.3.6.1.2.1.2.2
@@ -80,7 +49,7 @@ metrics:
49 - OID: 1.3.6.1.2.1.2.2.1.7
50 name: ifAdminStatus
51 description: Current administrative state of the interface
83 - family: Network/Interfaces/Status
52 + family: Interfaces/Status
53 unit: "{status}"
54 mapping:
55 1: up
@@ -89,7 +58,7 @@ metrics:
58 - OID: 1.3.6.1.2.1.2.2.1.8
59 name: ifOperStatus
60 description: Current operational state of the interface
92 - family: Network/Interfaces/Status
61 + family: Interfaces/Status
62 unit: "{status}"
63 mapping:
64 1: up
@@ -102,7 +71,7 @@ metrics:
71 - OID: 1.3.6.1.2.1.2.2.1.5
72 name: ifSpeed
73 description: Estimate of the interface's current bandwidth in bits per second
105 - family: Network/Interfaces/Speed
74 + family: Interfaces/Speed
75 unit: "bit/s"
76 metric_tags:
77 - symbol:
@@ -110,11 +79,6 @@ metrics:
79 name: ifName
80 table: ifXTable
81 tag: interface
113 - - symbol:
114 - OID: 1.3.6.1.2.1.31.1.1.1.18
115 - name: ifAlias
116 - table: ifXTable
117 - tag: interface_alias
82 - MIB: IF-MIB
83 table:
84 OID: 1.3.6.1.2.1.31.1.1
@@ -124,43 +88,38 @@ metrics:
88 - OID: 1.3.6.1.2.1.31.1.1.1.7
89 name: ifHCInUcastPkts
90 description: Number of packets delivered by this sub-layer to a higher layer which were not addressed to a multicast or broadcast address
127 - family: Network/Interfaces/Packets
91 + family: Interfaces/Packets/Unicast
92 unit: "{packet}"
93 - OID: 1.3.6.1.2.1.31.1.1.1.8
94 name: ifHCInMulticastPkts
95 description: Number of packets delivered by this sub-layer to a higher layer which were addressed to a multicast address
132 - family: Network/Interfaces/Packets
96 + family: Interfaces/Packets/Multicast
97 unit: "{packet}"
98 - OID: 1.3.6.1.2.1.31.1.1.1.9
99 name: ifHCInBroadcastPkts
100 description: Number of packets delivered by this sub-layer to a higher layer which were addressed to a broadcast address
137 - family: Network/Interfaces/Packets
101 + family: Interfaces/Packets/Broadcast
102 unit: "{packet}"
103 - OID: 1.3.6.1.2.1.31.1.1.1.11
104 name: ifHCOutUcastPkts
105 description: Total number of packets that higher-level protocols requested be transmitted and which were not addressed to a multicast or broadcast address
142 - family: Network/Interfaces/Packets
106 + family: Interfaces/Packets/Unicast
107 unit: "{packet}"
108 - OID: 1.3.6.1.2.1.31.1.1.1.12
109 name: ifHCOutMulticastPkts
110 description: Total number of packets that higher-level protocols requested be transmitted and which were addressed to a multicast address
147 - family: Network/Interfaces/Packets
111 + family: Interfaces/Packets/Multicast
112 unit: "{packet}"
113 - OID: 1.3.6.1.2.1.31.1.1.1.13
114 name: ifHCOutBroadcastPkts
115 description: Total number of packets that higher-level protocols requested be transmitted and which were addressed to a broadcast address
152 - family: Network/Interfaces/Packets
116 + family: Interfaces/Packets/Broadcast
117 unit: "{packet}"
118 metric_tags:
119 - symbol:
120 OID: 1.3.6.1.2.1.31.1.1.1.1
121 name: ifName
122 tag: interface
159 - - symbol:
160 - OID: 1.3.6.1.2.1.31.1.1.1.18
161 - name: ifAlias
162 - table: ifXTable
163 - tag: interface_alias
123 - MIB: IF-MIB
124 table:
125 OID: 1.3.6.1.2.1.31.1.1
@@ -170,23 +129,18 @@ metrics:
129 - OID: 1.3.6.1.2.1.31.1.1.1.6
130 name: ifHCInOctets
131 description: Total number of octets received on the interface including framing characters
173 - family: Network/Interfaces/Traffic
132 + family: Interfaces/Traffic
133 unit: "By"
134 - OID: 1.3.6.1.2.1.31.1.1.1.10
135 name: ifHCOutOctets
136 description: Total number of octets transmitted out of the interface including framing characters
178 - family: Network/Interfaces/Traffic
137 + family: Interfaces/Traffic
138 unit: "By"
139 metric_tags:
140 - symbol:
141 OID: 1.3.6.1.2.1.31.1.1.1.1
142 name: ifName
143 tag: interface
185 - - symbol:
186 - OID: 1.3.6.1.2.1.31.1.1.1.18
187 - name: ifAlias
188 - table: ifXTable
189 - tag: interface_alias
144 - MIB: IF-MIB
145 table:
146 OID: 1.3.6.1.2.1.31.1.1
@@ -195,15 +149,10 @@ metrics:
149 - OID: 1.3.6.1.2.1.31.1.1.1.15
150 name: ifHighSpeed
151 description: Estimate of the interface's current bandwidth in units of 1,000,000 bits per second
198 - family: Network/Interfaces/Speed
152 + family: Interfaces/Speed
153 unit: "Mbit/s"
154 metric_tags:
155 - symbol:
156 OID: 1.3.6.1.2.1.31.1.1.1.1
157 name: ifName
158 tag: interface
205 - - symbol:
206 - OID: 1.3.6.1.2.1.31.1.1.1.18
207 - name: ifAlias
208 - table: ifXTable
209 - tag: interface_alias