SNMP: Arista profiles (#20498)
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Fotis Voutsas committed
Jun 29, 2025 at 15:18 UTC
2950cb797cfc64c24db9ccb1b5e24d946f9f5d52
8 files changed
+247
-324
src/go/plugin/go.d/collector/snmp/ddsnmp/transform.go
+76
-60
@@ -8,6 +8,7 @@ import (
8
"math"
9
"net"
10
"strconv"
11
+ "strings"
12
"text/template"
13
14
"github.com/Masterminds/sprig/v3"
@@ -175,49 +176,22 @@ func newMetricTransformFuncMap() template.FuncMap {
176
}()
177
178
config := map[string]map[string]interface{}{
178
- "1": {"name": "unspecified", "family": "Generic", "desc": "Unspecified or vendor-specific sensor"},
179
- "2": {"name": "unknown", "family": "Generic", "desc": "Unknown sensor type"},
180
- "3": {"name": "voltage_ac", "unit": "volts", "family": "Power", "desc": "AC voltage"},
181
- "4": {"name": "voltage_dc", "unit": "volts", "family": "Power", "desc": "DC voltage"},
182
- "5": {"name": "current", "unit": "amperes", "family": "Power", "desc": "Current draw"},
183
- "6": {"name": "power", "unit": "watts", "family": "Power", "desc": "Power consumption"},
184
- "7": {"name": "frequency", "unit": "hertz", "family": "Power", "desc": "Frequency"},
185
- "8": {"name": "temperature", "unit": "celsius", "family": "Temperature", "desc": "Temperature reading"},
186
- "9": {"name": "humidity", "unit": "percentage", "family": "Environment", "desc": "Relative humidity"},
187
- "10": {"name": "fan_speed", "unit": "rpm", "family": "Fan", "desc": "Fan rotation speed"},
188
- "11": {"name": "airflow", "unit": "cmm", "family": "Environment", "desc": "Airflow in cubic meters per minute"},
189
- "12": {"name": "sensor_state", "family": "Status", "desc": "Boolean sensor state", "mapping": map[int64]string{
179
+ "1": {"name": "unspecified", "family": "Sensor/Generic/Value", "desc": "Unspecified or vendor-specific sensor"},
180
+ "2": {"name": "unknown", "family": "Sensor/Unknown/Value", "desc": "Unknown sensor type"},
181
+ "3": {"name": "voltage_ac", "unit": "volts", "family": "Sensor/Voltage/AC", "desc": "AC voltage"},
182
+ "4": {"name": "voltage_dc", "unit": "volts", "family": "Sensor/Voltage/DC", "desc": "DC voltage"},
183
+ "5": {"name": "current", "unit": "amperes", "family": "Sensor/Current/Value", "desc": "Current draw"},
184
+ "6": {"name": "power", "unit": "watts", "family": "Sensor/Power/Value", "desc": "Power consumption"},
185
+ "7": {"name": "frequency", "unit": "hertz", "family": "Sensor/Frequency/Value", "desc": "Frequency"},
186
+ "8": {"name": "temperature", "unit": "celsius", "family": "Sensor/Temperature/Value", "desc": "Temperature reading"},
187
+ "9": {"name": "humidity", "unit": "percentage", "family": "Sensor/Humidity/Value", "desc": "Relative humidity"},
188
+ "10": {"name": "fan_speed", "unit": "rpm", "family": "Sensor/FanSpeed/Value", "desc": "Fan rotation speed"},
189
+ "11": {"name": "airflow", "unit": "cmm", "family": "Sensor/Airflow/Value", "desc": "Airflow in cubic meters per minute"},
190
+ "12": {"name": "sensor_state", "family": "Sensor/State/Value", "desc": "Boolean sensor state", "mapping": map[int64]string{
191
0: "false", 1: "true", 2: "true",
192
}},
192
- "13": {"name": "special_enum", "family": "Status", "desc": "Vendor-specific enumerated sensor"},
193
- "14": {"name": "power_dbm", "unit": "dBm", "family": "Power", "desc": "Power in decibel-milliwatts"},
194
- }
195
-
196
- scaleMap := map[string]float64{
197
- "1": 1e-24, // yocto (10^-24)
198
- "2": 1e-21, // zepto (10^-21)
199
- "3": 1e-18, // atto (10^-18)
200
- "4": 1e-15, // femto (10^-15)
201
- "5": 1e-12, // pico (10^-12)
202
- "6": 1e-9, // nano (10^-9)
203
- "7": 1e-6, // micro (10^-6)
204
- "8": 1e-3, // milli (10^-3)
205
- "9": 1, // units (10^0)
206
- "10": 1e3, // kilo (10^3)
207
- "11": 1e6, // mega (10^6)
208
- "12": 1e9, // giga (10^9)
209
- "13": 1e12, // tera (10^12)
210
- }
211
-
212
- scale := scaleMap[sensorScale]
213
- if scale == 0 || scale == 1e-24 {
214
- // Workaround for Cisco ASA (MIMIC) temperature bug: treat scale=1 (yocto) as units
215
- scale = 1.0
216
- }
217
-
218
- precision := 0
219
- if p, err := strconv.Atoi(sensorPrecision); err == nil {
220
- precision = p
193
+ "13": {"name": "special_enum", "family": "Sensor/Enum/Value", "desc": "Vendor-specific enumerated sensor"},
194
+ "14": {"name": "power_dbm", "unit": "dBm", "family": "Sensor/Power/Value", "desc": "Power in decibel-milliwatts"},
195
}
196
197
conf, ok := config[sensorType]
@@ -225,26 +199,68 @@ func newMetricTransformFuncMap() template.FuncMap {
199
return ""
200
}
201
228
- if name, ok := conf["name"].(string); ok {
229
- m.Name = m.Name + "_" + name
230
- }
231
- if family, ok := conf["family"].(string); ok {
232
- m.Family = "Sensors/" + family
233
- }
234
- if desc, ok := conf["desc"].(string); ok {
235
- m.Description = desc
236
- }
237
- if unit, ok := conf["unit"].(string); ok {
238
- m.Unit = unit
239
- }
240
- if mapping, ok := conf["mapping"].(map[int64]string); ok {
241
- m.Mappings = mapping
242
- } else {
243
- val := float64(m.Value) * scale
244
- if precision > 0 {
245
- val = val / math.Pow(10, float64(precision))
202
+ switch m.Name {
203
+ case "entPhySensorOperStatus":
204
+ if name, ok := conf["name"].(string); ok {
205
+ m.Name = m.Name + "_" + name
206
+ }
207
+ if family, ok := conf["family"].(string); ok {
208
+ m.Family = strings.TrimSuffix(family, "/Value") + "/Status"
209
+ }
210
+ m.Mappings = map[int64]string{
211
+ 1: "ok",
212
+ 2: "unavailable",
213
+ 3: "nonoperational",
214
+ }
215
+ case "entPhySensorValue", "entSensorValue":
216
+ scaleMap := map[string]float64{
217
+ "1": 1e-24, // yocto (10^-24)
218
+ "2": 1e-21, // zepto (10^-21)
219
+ "3": 1e-18, // atto (10^-18)
220
+ "4": 1e-15, // femto (10^-15)
221
+ "5": 1e-12, // pico (10^-12)
222
+ "6": 1e-9, // nano (10^-9)
223
+ "7": 1e-6, // micro (10^-6)
224
+ "8": 1e-3, // milli (10^-3)
225
+ "9": 1, // units (10^0)
226
+ "10": 1e3, // kilo (10^3)
227
+ "11": 1e6, // mega (10^6)
228
+ "12": 1e9, // giga (10^9)
229
+ "13": 1e12, // tera (10^12)
230
+ }
231
+
232
+ scale := scaleMap[sensorScale]
233
+ if scale == 0 || scale == 1e-24 {
234
+ // Workaround for Cisco ASA (MIMIC) temperature bug: treat scale=1 (yocto) as units
235
+ scale = 1.0
236
+ }
237
+
238
+ precision := 0
239
+ if p, err := strconv.Atoi(sensorPrecision); err == nil {
240
+ precision = p
241
+ }
242
+
243
+ if name, ok := conf["name"].(string); ok {
244
+ m.Name = m.Name + "_" + name
245
+ }
246
+ if family, ok := conf["family"].(string); ok {
247
+ m.Family = family
248
+ }
249
+ if desc, ok := conf["desc"].(string); ok {
250
+ m.Description = desc
251
+ }
252
+ if unit, ok := conf["unit"].(string); ok {
253
+ m.Unit = unit
254
+ }
255
+ if mapping, ok := conf["mapping"].(map[int64]string); ok {
256
+ m.Mappings = mapping
257
+ } else {
258
+ val := float64(m.Value) * scale
259
+ if precision > 0 {
260
+ val = val / math.Pow(10, float64(precision))
261
+ }
262
+ m.Value = int64(val)
263
}
247
- m.Value = int64(val)
264
}
265
266
return ""
src/go/plugin/go.d/config/go.d/snmp.profiles/default/_arista-queue.yaml
+4
-2
@@ -1,7 +1,7 @@
1
metrics:
2
### Interface
3
4
- # This table contains statistical information of the ingress queue in an interface.
4
+ # This table contains statistical information of the ingress queue in an interface.
5
- MIB: ARISTA-QUEUE-MIB
6
table:
7
OID: 1.3.6.1.4.1.30065.3.6.1.1
@@ -10,7 +10,8 @@ metrics:
10
symbols:
11
- OID: 1.3.6.1.4.1.30065.3.6.1.1.1.3
12
name: aristaIngressQueuePktsDropped
13
- description: The number of dropped packets due to congestion at the ingress port in an interface.
13
+ description: The number of dropped packets due to congestion at the ingress port in an interface
14
+ family: Interfaces/Queue/Ingress/Packet/Dropped
15
unit: "{packet}"
16
metric_tags:
17
- tag: interface_index
@@ -32,6 +33,7 @@ metrics:
33
- OID: 1.3.6.1.4.1.30065.3.6.1.2.1.6
34
name: aristaEgressQueuePktsDropped
35
description: The number of packets discarded from this egress queue.
36
+ family: Interfaces/Queue/Egress/Packet/Dropped
37
unit: "{packet}"
38
metric_tags:
39
- tag: interface_index
src/go/plugin/go.d/config/go.d/snmp.profiles/default/_arista.yaml
+1
-1
@@ -2,4 +2,4 @@ metadata:
2
device:
3
fields:
4
vendor:
5
- value: "arista"
5
+ value: "Arista"
src/go/plugin/go.d/config/go.d/snmp.profiles/default/_cisco-asa.yaml
+1
-37
@@ -1,6 +1,7 @@
1
# Profile for Cisco ASA devices
2
extends:
3
- _cisco-generic.yaml
4
+ - _generic-entity-sensor.yaml
5
6
metrics:
7
- MIB: CISCO-FIREWALL-MIB
@@ -121,40 +122,3 @@ metrics:
122
description: High capacity count of total octets sent by all current and previous IPsec Phase-2 Tunnels
123
family: IPSec/Phase2/Tunnel/Traffic/Out
124
unit: "By/s"
124
- - MIB: ENTITY-SENSOR-MIB
125
- table:
126
- OID: 1.3.6.1.2.1.99.1.1
127
- name: entPhySensorTable
128
- symbols:
129
- - OID: 1.3.6.1.2.1.99.1.1.1.4
130
- name: entPhySensorValue
131
- description: Most recent measurement obtained by the agent for this sensor
132
- unit: "1"
133
- family: Sensor/Value
134
- transform: |
135
- {{- transformEntitySensorValue .Metric -}}
136
- metric_tags:
137
- - tag: sensor_index
138
- index: 1
139
- - tag: _ent_phys_descr
140
- MIB: ENTITY-MIB
141
- table: entPhysicalTable
142
- symbol:
143
- OID: 1.3.6.1.2.1.47.1.1.1.1.2
144
- name: entPhysicalDescr
145
- - tag: _sensor_desc
146
- symbol:
147
- OID: 1.3.6.1.2.1.99.1.1.1.6
148
- name: entPhySensorUnitsDisplay
149
- - tag: sensor_type # needed for transform
150
- symbol:
151
- OID: 1.3.6.1.2.1.99.1.1.1.1
152
- name: entPhySensorType
153
- - tag: sensor_scale # needed for transform
154
- symbol:
155
- OID: 1.3.6.1.2.1.99.1.1.1.2
156
- name: entPhySensorScale
157
- - tag: sensor_precision # needed for transform
158
- symbol:
159
- OID: 1.3.6.1.2.1.99.1.1.1.3
160
- name: entPhySensorPrecision
src/go/plugin/go.d/config/go.d/snmp.profiles/default/_cisco-catalyst.yaml
+1
-1
@@ -26,7 +26,7 @@ metrics:
26
name: entSensorValueTable
27
symbols:
28
- OID: 1.3.6.1.4.1.9.9.91.1.1.1.1.4
29
- name: entSensorValue
29
+ name: entSensorValue # Do not change this name — required by transformEntitySensorValue for matching and renaming logic
30
description: Most recent measurement obtained by the agent for this sensor
31
unit: "1"
32
family: Sensor/Value
src/go/plugin/go.d/config/go.d/snmp.profiles/default/_generic-entity-sensor.yaml
+62
-99
@@ -5,109 +5,72 @@ metrics:
5
name: entPhySensorTable
6
symbols:
7
- OID: 1.3.6.1.2.1.99.1.1.1.4
8
- name: entPhySensorValue
9
- description: The most recent measurement obtained by the agent for this sensor
10
- unit: "TBD"
11
- # TODO: Check out metric_tags with symbols having mappings and/or expressing states/statuses. Need to convert to metrics.
8
+ name: entPhySensorValue # Do not change this name — required by transformEntitySensorValue for matching and renaming logic
9
+ description: Most recent measurement obtained by the agent for this sensor
10
+ family: Sensor/Value
11
+ unit: "1"
12
+ transform: |
13
+ {{- transformEntitySensorValue .Metric -}}
14
+ - OID: 1.3.6.1.2.1.99.1.1.1.5
15
+ name: entPhySensorOperStatus # Do not change this name — required by transformEntitySensorValue for matching and renaming logic
16
+ description: Operational status of the sensor
17
+ family: Sensor/Status
18
+ unit: "{status}"
19
+ mapping:
20
+ 1: ok
21
+ 2: unavailable
22
+ 3: nonoperational
23
+ transform: |
24
+ {{- transformEntitySensorValue .Metric -}}
25
metric_tags:
13
- - symbol:
26
+ - tag: sensor_index
27
+ index: 1
28
+ - tag: _ent_phys_descr
29
+ MIB: ENTITY-MIB
30
+ table: entPhysicalTable
31
+ symbol:
32
+ OID: 1.3.6.1.2.1.47.1.1.1.1.2
33
+ name: entPhysicalDescr
34
+ - tag: _sensor_desc
35
+ symbol:
36
+ OID: 1.3.6.1.2.1.99.1.1.1.6
37
+ name: entPhySensorUnitsDisplay
38
+ - tag: sensor_type # needed for transform
39
+ symbol:
40
OID: 1.3.6.1.2.1.99.1.1.1.1
41
name: entPhySensorType
16
- tag: ent_phy_sensor_type
17
- mapping:
18
- 1: other
19
- 2: unknown
20
- 3: volts_ac
21
- 4: volts_dc
22
- 5: amperes
23
- 6: watts
24
- 7: hertz
25
- 8: celsius
26
- 9: percent_rh
27
- 10: rpm
28
- 11: cmm
29
- 12: truthvalue
30
- description: The type of data returned by the associated entPhySensorValue object
31
- unit: "TBD"
32
- - symbol:
42
+ - tag: sensor_scale # needed for transform
43
+ symbol:
44
OID: 1.3.6.1.2.1.99.1.1.1.2
45
name: entPhySensorScale
35
- tag: ent_phy_sensor_scale
36
- mapping:
37
- 1: yocto
38
- 2: zepto
39
- 3: atto
40
- 4: femto
41
- 5: pico
42
- 6: nano
43
- 7: micro
44
- 8: milli
45
- 9: units
46
- 10: kilo
47
- 11: mega
48
- 12: giga
49
- 13: tera
50
- 14: exa
51
- 15: peta
52
- 16: zetta
53
- 17: yotta
54
- description: The exponent to apply to values returned by the associated entPhySensorValue object
55
- unit: "TBD"
56
- - symbol:
46
+ - tag: sensor_precision # needed for transform
47
+ symbol:
48
OID: 1.3.6.1.2.1.99.1.1.1.3
49
name: entPhySensorPrecision
59
- tag: ent_phy_sensor_precision
60
- description: The number of decimal places of precision in fixed-point sensor values returned by the associated entPhySensorValue object
61
- unit: "TBD"
62
- - symbol:
63
- OID: 1.3.6.1.2.1.99.1.1.1.6
64
- name: entPhySensorUnitsDisplay
65
- tag: ent_phy_sensor_units_display
66
- description: A textual description of the data units that should be used in the display of entPhySensorValue
67
- unit: "TBD"
68
- - symbol:
69
- OID: 1.3.6.1.2.1.47.1.1.1.1.2
70
- name: entPhysicalDescr
71
- tag: ent_physical_descr
72
- - symbol:
73
- OID: 1.3.6.1.2.1.47.1.1.1.1.5
74
- name: entPhysicalClass
75
- tag: ent_physical_class
76
- mapping:
77
- 1: other
78
- 2: unknown
79
- 3: chassis
80
- 4: backplane
81
- 5: container
82
- 6: power_supply
83
- 7: fan
84
- 8: sensor
85
- 9: module
86
- 10: port
87
- 11: stack
88
- 12: cpu
89
- 13: energy_object
90
- 14: battery
91
- 15: storage_drive
92
- - symbol:
93
- OID: 1.3.6.1.2.1.47.1.1.1.1.7
94
- name: entPhysicalName
95
- tag: ent_physical_name
96
- - symbol:
97
- OID: 1.3.6.1.2.1.47.1.1.1.1.11
98
- name: entPhysicalSerialNum
99
- tag: ent_physical_serial_num
100
- - symbol:
101
- OID: 1.3.6.1.2.1.47.1.1.1.1.13
102
- name: entPhysicalModelName
103
- tag: ent_physical_model_name
104
- - symbol:
105
- OID: 1.3.6.1.2.1.99.1.1.1.5
106
- name: entPhySensorOperStatus
107
- tag: ent_phy_sensor_oper_status
108
- mapping:
109
- 1: ok
110
- 2: unavailable
111
- 3: nonoperational
112
- description: The operational status of the sensor
113
- unit: "TBD"
50
+
51
+# MIB: ENTITY-MIB
52
+# table: entPhysicalTable
53
+# symbol:
54
+# name: entPhysicalClass
55
+# OID: 1.3.6.1.2.1.47.1.1.1.1.5
56
+# mapping:
57
+# # RFC 6933 Standard Values (1-14)
58
+# 1: other
59
+# 2: unknown
60
+# 3: chassis
61
+# 4: backplane
62
+# 5: container
63
+# 6: powerSupply
64
+# 7: fan
65
+# 8: sensor
66
+# 9: module
67
+# 10: port
68
+# 11: stack
69
+# 12: cpu
70
+# 13: energyObject
71
+# 14: battery
72
+# # Common Cisco Extensions (15-18) - Non-RFC
73
+# 15: storageDisk # e.g., Cisco UCS hard drives
74
+# 16: memory # e.g., RAM DIMMs in Nexus switches
75
+# 17: software # Virtual/logical components (rare)
76
+# 18: reserved # Unassigned (vendor-specific)
src/go/plugin/go.d/config/go.d/snmp.profiles/default/arista-switch.yaml
+101
-96
@@ -11,7 +11,7 @@ metadata:
11
device:
12
fields:
13
type:
14
- value: "switch"
14
+ value: "Switch"
15
16
sysobjectid:
17
- 1.3.6.1.4.1.30065.1.3011.7010.427.48
@@ -164,70 +164,83 @@ sysobjectid:
164
- 1.3.6.1.4.1.30065.1.3011.7280.877.48.972
165
166
metrics:
167
- - MIB: HOST-RESOURCES-MIB
168
- symbol:
169
- name: memory.total
170
- OID: 1.3.6.1.2.1.25.2.3.1.5.1
171
- description: "The size of the storage represented by this entry, in units of hrStorageAllocationUnits."
172
- unit: "By"
173
- - MIB: HOST-RESOURCES-MIB
174
- symbol:
175
- name: memory.used
176
- OID: 1.3.6.1.2.1.25.2.3.1.6.100
177
- description: "The amount of the storage represented by this entry that is allocated, in units of hrStorageAllocationUnits."
178
- unit: "By"
167
+ # - MIB: HOST-RESOURCES-MIB
168
+ # symbol:
169
+ # name: memory.total
170
+ # OID: 1.3.6.1.2.1.25.2.3.1.5.1
171
+ # description: "The size of the storage represented by this entry, in units of hrStorageAllocationUnits."
172
+ # unit: "By"
173
+ # - MIB: HOST-RESOURCES-MIB
174
+ # symbol:
175
+ # name: memory.used
176
+ # OID: 1.3.6.1.2.1.25.2.3.1.6.100
177
+ # description: "The amount of the storage represented by this entry that is allocated, in units of hrStorageAllocationUnits."
178
+ # unit: "By"
179
+ # TODO, metrics that have dynamic units are not supported
180
+
181
- MIB: HOST-RESOURCES-MIB
182
symbol:
183
name: cpu.usage
184
OID: 1.3.6.1.2.1.25.3.3.1.2.1
183
- description: "The average, over the last minute, of the percentage of time that this processor was not idle."
184
- unit: "%"
185
+ description: The average, over the last minute, of the percentage of time that this processor was not idle
186
+ family: CPU/Usage
187
+ unit: "%"
188
- MIB: ARISTA-BGP4V2-MIB
189
table:
190
name: aristaBgp4V2PeerTable
191
OID: 1.3.6.1.4.1.30065.4.1.1.2
192
symbols:
190
- - name: aristaBgp4V2PeerLocalPort
191
- OID: 1.3.6.1.4.1.30065.4.1.1.2.1.6
192
- description: "The local port for the TCP connection between the BGP peers."
193
- unit: "{port}"
194
- - name: aristaBgp4V2PeerLocalAs
195
- OID: 1.3.6.1.4.1.30065.4.1.1.2.1.7
196
- description: "The AS that this peering session is representing itself as to the remote peer."
197
- unit: "1"
198
- - name: aristaBgp4V2PeerRemotePort
199
- OID: 1.3.6.1.4.1.30065.4.1.1.2.1.9
200
- description: "The remote port for the TCP connection between the BGP peers."
201
- unit: "{port}"
202
- - name: aristaBgp4V2PeerRemoteAs
203
- OID: 1.3.6.1.4.1.30065.4.1.1.2.1.10
204
- description: "The remote autonomous system number received in the BGP OPEN message."
205
- unit: "1"
206
- # TODO: Check out metric_tags with symbols having mappings and/or expressing states/statuses. Need to convert to metrics.
193
+ - OID: 1.3.6.1.4.1.30065.4.1.1.2.1.12
194
+ name: aristaBgp4V2PeerAdminStatus
195
+ description: BGP FSM Status
196
+ family: BPG/Peer/Admin/Status
197
+ unit: "{status}"
198
+ mapping:
199
+ 1: halted
200
+ 2: running
201
+ - OID: 1.3.6.1.4.1.30065.4.1.1.2.1.13
202
+ name: aristaBgp4V2PeerState
203
+ description: BGP peer connection state
204
+ family: BGP/Peer/Connection/Status
205
+ unit: "{status}"
206
+ mapping:
207
+ 1: idle
208
+ 2: connect
209
+ 3: active
210
+ 4: opensent
211
+ 5: openconfirm
212
+ 6: established
213
metric_tags:
208
- - symbol:
209
- name: aristaBgp4V2PeerLocalAddr
210
- OID: 1.3.6.1.4.1.30065.4.1.1.2.1.3
211
- format: ip_address
212
- tag: arista_bgp4_v2_peer_local_addr
213
- - symbol:
214
+ # - symbol:
215
+ # name: aristaBgp4V2PeerLocalPort
216
+ # OID: 1.3.6.1.4.1.30065.4.1.1.2.1.6
217
+ # tag: arista_bgp4_v2_peer_local_port
218
+ - tag: arista_bgp4_v2_peer_local_as
219
+ symbol:
220
+ name: aristaBgp4V2PeerLocalAs
221
+ OID: 1.3.6.1.4.1.30065.4.1.1.2.1.7
222
+ # - symbol:
223
+ # name: aristaBgp4V2PeerRemotePort
224
+ # OID: 1.3.6.1.4.1.30065.4.1.1.2.1.9
225
+ # tag: arista_bgp4_v2_peer_remote_port
226
+ - tag: arista_bgp4_v2_peer_remote_as
227
+ symbol:
228
+ name: aristaBgp4V2PeerRemoteAs
229
+ OID: 1.3.6.1.4.1.30065.4.1.1.2.1.10
230
+ - tag: arista_bgp4_v2_peer_local_identifier
231
+ symbol:
232
name: aristaBgp4V2PeerLocalIdentifier
233
OID: 1.3.6.1.4.1.30065.4.1.1.2.1.8
234
format: ip_address
217
- tag: arista_bgp4_v2_peer_local_identifier
218
- - symbol:
235
+ - tag: arista_bgp4_v2_peer_remote_identifier
236
+ symbol:
237
name: aristaBgp4V2PeerRemoteIdentifier
238
OID: 1.3.6.1.4.1.30065.4.1.1.2.1.11
239
format: ip_address
222
- tag: arista_bgp4_v2_peer_remote_identifier
223
- - symbol:
224
- name: aristaBgp4V2PeerDescription
225
- OID: 1.3.6.1.4.1.30065.4.1.1.2.1.14
226
- tag: arista_bgp4_v2_peer_description
227
- - symbol:
240
+ - tag: arista_bgp4_v2_peer_local_addr_type
241
+ symbol:
242
OID: 1.3.6.1.4.1.30065.4.1.1.2.1.2
243
name: aristaBgp4V2PeerLocalAddrType
230
- tag: arista_bgp4_v2_peer_local_addr_type
244
mapping:
245
0: unknown
246
1: ipv4
@@ -235,53 +248,45 @@ metrics:
248
3: ipv4z
249
4: ipv6z
250
16: dns
238
- - symbol:
239
- OID: 1.3.6.1.4.1.30065.4.1.1.2.1.12
240
- name: aristaBgp4V2PeerAdminStatus
241
- tag: arista_bgp4_v2_peer_admin_status
242
- mapping:
243
- 1: halted
244
- 2: running
245
- - symbol:
246
- OID: 1.3.6.1.4.1.30065.4.1.1.2.1.13
247
- name: aristaBgp4V2PeerState
248
- tag: arista_bgp4_v2_peer_state
249
- mapping:
250
- 1: idle
251
- 2: connect
252
- 3: active
253
- 4: opensent
254
- 5: openconfirm
255
- 6: established
256
- - MIB: ARISTA-IF-MIB
257
- table:
258
- name: aristaIfTable
259
- OID: 1.3.6.1.4.1.30065.3.15.1.1
260
- symbols:
261
- - name: aristaIfInPktRate
262
- OID: 1.3.6.1.4.1.30065.3.15.1.1.1.3
263
- description: "The rate, in packets per second, of packets inbound on this interface, averaged over aristaIfRateInterval."
264
- unit: "{packet}"
265
- - name: aristaIfOutPktRate
266
- OID: 1.3.6.1.4.1.30065.3.15.1.1.1.4
267
- description: "The rate, in packets per second, of packets outbound on this interface, averaged over aristaIfRateInterval."
268
- unit: "{packet}"
269
- - name: aristaIfInOctetRate
270
- OID: 1.3.6.1.4.1.30065.3.15.1.1.1.5
271
- description: "The rate, in octets per second, of data inbound on this interface, averaged over aristaIfRateInterval."
272
- unit: "By/s"
273
- - name: aristaIfOutOctetRate
274
- OID: 1.3.6.1.4.1.30065.3.15.1.1.1.6
275
- description: "The rate, in octets per second, of data inbound on this interface, averaged over aristaIfRateInterval."
276
- unit: "By/s"
277
- metric_tags:
278
- - symbol:
279
- name: aristaIfRateInterval
280
- OID: 1.3.6.1.4.1.30065.3.15.1.1.1.2
281
- tag: arista_if_rate_interval
282
- - MIB: IF-MIB
251
+ - tag: _arista_bgp4_v2_peer_description
252
symbol:
284
- OID: 1.3.6.1.2.1.31.1.1.1.1
285
- name: ifName
286
- table: ifXTable
287
- tag: if_name
253
+ name: aristaBgp4V2PeerDescription
254
+ OID: 1.3.6.1.4.1.30065.4.1.1.2.1.14
255
+ - tag: _arista_bgp4_v2_peer_local_addr
256
+ symbol:
257
+ name: aristaBgp4V2PeerLocalAddr
258
+ OID: 1.3.6.1.4.1.30065.4.1.1.2.1.3
259
+ format: ip_address
260
+ # - MIB: ARISTA-IF-MIB
261
+ # table:
262
+ # name: aristaIfTable
263
+ # OID: 1.3.6.1.4.1.30065.3.15.1.1
264
+ # symbols:
265
+ # - name: aristaIfInPktRate
266
+ # OID: 1.3.6.1.4.1.30065.3.15.1.1.1.3
267
+ # description: "The rate, in packets per second, of packets inbound on this interface, averaged over aristaIfRateInterval."
268
+ # unit: "{packet}"
269
+ # - name: aristaIfOutPktRate
270
+ # OID: 1.3.6.1.4.1.30065.3.15.1.1.1.4
271
+ # description: "The rate, in packets per second, of packets outbound on this interface, averaged over aristaIfRateInterval."
272
+ # unit: "{packet}"
273
+ # - name: aristaIfInOctetRate
274
+ # OID: 1.3.6.1.4.1.30065.3.15.1.1.1.5
275
+ # description: "The rate, in octets per second, of data inbound on this interface, averaged over aristaIfRateInterval."
276
+ # unit: "By/s"
277
+ # - name: aristaIfOutOctetRate
278
+ # OID: 1.3.6.1.4.1.30065.3.15.1.1.1.6
279
+ # description: "The rate, in octets per second, of data inbound on this interface, averaged over aristaIfRateInterval."
280
+ # unit: "By/s"
281
+ # metric_tags:
282
+ # - symbol:
283
+ # name: aristaIfRateInterval
284
+ # OID: 1.3.6.1.4.1.30065.3.15.1.1.1.2
285
+ # tag: arista_if_rate_interval
286
+ # - MIB: IF-MIB
287
+ # symbol:
288
+ # OID: 1.3.6.1.2.1.31.1.1.1.1
289
+ # name: ifName
290
+ # table: ifXTable
291
+ # tag: if_name
292
+ # TODO, metrics are averaged by another metric, we can't support this atm
src/go/plugin/go.d/config/go.d/snmp.profiles/default/arista.yaml
+1
-28
@@ -21,35 +21,8 @@ extends:
21
- _generic-bgp4.yaml
22
- _generic-tcp.yaml
23
- _generic-udp.yaml
24
+ - _generic-entity-sensor.yaml
25
26
# The OID `1.3.6.1.4.1.30065.1`/`aristaProducts` is the root object identifier from
27
# which sysObjectID values are assigned. Values are defined in ARISTA-PRODUCTS-MIB.
28
sysobjectid: 1.3.6.1.4.1.30065.1.*
28
-
29
-device:
30
- vendor: "arista"
31
-
32
-metrics:
33
- ### Sensor
34
-
35
- # This table contains one row per physical sensor.
36
- - MIB: ENTITY-SENSOR-MIB
37
- table:
38
- OID: 1.3.6.1.2.1.99.1.1.1
39
- name: entPhySensorTable
40
- symbols:
41
- - OID: 1.3.6.1.2.1.99.1.1.1.4
42
- name: entPhySensorValue
43
- description: The most recent measurement obtained by the agent for this sensor
44
- unit: "TBD"
45
- - OID: 1.3.6.1.2.1.99.1.1.1.5
46
- name: entPhySensorOperStatus
47
- description: The operational status of the sensor
48
- unit: "{sensor}"
49
- metric_tags:
50
- - tag: sensor_type
51
- symbol:
52
- OID: 1.3.6.1.2.1.99.1.1.1.1
53
- name: entPhySensorType
54
- - index: 1
55
- tag: sensor_id