@cryptotaxi247 / netdata / commits / 7c4a87a7e

SNMP: audiocodes profile (#20501)

Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>

Fotis Voutsas committed Jun 29, 2025 at 18:03 UTC 7c4a87a7e326638b2e9d6788701c7339235d15ef
2 files changed +51 -42
src/go/plugin/go.d/config/go.d/snmp.profiles/default/audiocodes-mediant-sbc.yaml
+24 -16
@@ -2,31 +2,39 @@ extends:
2 - _base.yaml
3 - _generic-if.yaml
4
5 +metadata:
6 + device:
7 + fields:
8 + type:
9 + value: SBC
10 + vendor:
11 + value: AudioCodes
12 +
13 sysobjectid:
14 - 1.3.6.1.4.1.5003.8.1.1.71
15
16 metrics:
17 + - MIB: HOST-RESOURCES-MIB
18 + symbol:
19 + name: cpu.usage
20 + OID: 1.3.6.1.2.1.25.3.3.1.2.1
21 + description: The average, over the last minute, of the percentage of time that the processor was not idle
22 + family: CPU/Usage
23 + unit: "%"
24 + # TODO: The allocation unit size is defined in hrStorageAllocationUnits (1.3.6.1.2.1.25.2.3.1.4).
25 - MIB: HOST-RESOURCES-MIB
26 symbol:
27 name: memory.total
28 OID: 1.3.6.1.2.1.25.2.3.1.5.1
13 - description: The size of the storage represented by this entry, in units of hrStorageAllocationUnits.
14 - unit: "{logical_storage_area}"
29 + description: The size of the storage represented by this entry, in units of hrStorageAllocationUnits.
30 + family: Memory/Total
31 + unit: "By"
32 + scale_factor: 1024
33 - MIB: HOST-RESOURCES-MIB
34 symbol:
35 name: memory.used
36 OID: 1.3.6.1.2.1.25.2.3.1.6.1
19 - description: The amount of the storage represented by this entry that is allocated, in units of hrStorageAllocationUnits.
20 - unit: "{logical_storage_area}"
21 - - MIB: HOST-RESOURCES-MIB
22 - symbol:
23 - name: cpu.usage
24 - OID: 1.3.6.1.2.1.25.3.3.1.2.1
25 - description: The average, over the last minute, of the percentage of time that this processor was not idle.
26 - unit: "%"
27 -
28 -metadata:
29 - device:
30 - fields:
31 - vendor:
32 - value: "audiocodes"
37 + description: The amount of the storage represented by this entry that is allocated, in units of hrStorageAllocationUnits.
38 + family: Memory/Used
39 + unit: "By"
40 + scale_factor: 1024
src/go/plugin/go.d/config/go.d/snmp.profiles/default/mikrotik-router.yaml
+27 -26
@@ -19,36 +19,37 @@ metrics:
19 - OID: 1.3.6.1.4.1.14988.1.1.19.1.1.6
20 name: mtxrOpticalTemperature
21 description: Temperature at sensor chip
22 - family: MikroTik/Optical Module/Temperature
22 + family: Hardware/OpticalModule/Temperature/Value
23 unit: "Cel"
24 - OID: 1.3.6.1.4.1.14988.1.1.19.1.1.10
25 name: mtxrOpticalRxPower
26 description: Received optical power
27 - family: MikroTik/Optical Module/Power
27 + family: Hardware/OpticalModule/Power/In
28 unit: "mW"
29 - OID: 1.3.6.1.4.1.14988.1.1.19.1.1.7
30 name: mtxrOpticalSupplyVoltage
31 description: Supply voltage
32 + family: Hardware/OpticalModule/Voltage/Supply
33 unit: "V"
34 - OID: 1.3.6.1.4.1.14988.1.1.19.1.1.8
35 name: mtxrOpticalTxBiasCurrent
36 description: Transmit bias current
36 - family: MikroTik/Optical Module/Current
37 + family: Hardware/OpticalModule/Current/TxBias
38 unit: "mA"
39 - OID: 1.3.6.1.4.1.14988.1.1.19.1.1.5
40 name: mtxrOpticalWavelength
41 description: Optical wavelength
41 - family: MikroTik/Optical Module/Wavelength
42 + family: Hardware/OpticalModule/Wavelength
43 unit: "nm"
44 - OID: 1.3.6.1.4.1.14988.1.1.19.1.1.9
45 name: mtxrOpticalTxPower
46 description: Transmit optical power
46 - family: MikroTik/Optical Module/Power
47 + family: Hardware/OpticalModule/Power/Out
48 unit: "mW"
49 - OID: 1.3.6.1.4.1.14988.1.1.19.1.1.4
50 name: mtxrOpticalTxFault
51 description: Indicates whether the optical transceiver is experiencing a transmit fault
51 - family: MikroTik/Optical Module/Status
52 + family: Hardware/OpticalModule/Transmit/Fault/Status
53 unit: "{status}"
54 mapping:
55 0: 'ok'
@@ -56,7 +57,7 @@ metrics:
57 - OID: 1.3.6.1.4.1.14988.1.1.19.1.1.3
58 name: mtxrOpticalRxLoss
59 description: Indicates whether there is a loss of received optical signal (Rx Loss)
59 - family: MikroTik/Optical Module/Status
60 + family: Hardware/OpticalModule/Receive/Loss/Status
61 unit: "{status}"
62 mapping:
63 0: 'ok'
@@ -75,21 +76,21 @@ metrics:
76 OID: 1.3.6.1.4.1.14988.1.1.3.6
77 name: mtxrHlCpuTemperature
78 description: Temperature near cpu
78 - family: MikroTik/CPU
79 + family: CPU/Temperature/Value
80 unit: "Cel"
81 - MIB: MIKROTIK-MIB
82 symbol:
83 OID: 1.3.6.1.4.1.14988.1.1.3.10
84 name: mtxrHlTemperature
85 description: Temperature at sensor chip
85 - family: MikroTik/Sensor/Temperature
86 + family: Environment/Temperature/Value
87 unit: "Cel"
88 - MIB: MIKROTIK-MIB
89 symbol:
90 OID: 1.3.6.1.4.1.14988.1.1.3.8
91 name: mtxrHlVoltage
92 description: Core voltage
92 - family: MikroTik/Sensor/Voltage
93 + family: Power/Voltage/Core
94 unit: "V"
95 - MIB: MIKROTIK-MIB
96 table:
@@ -99,17 +100,17 @@ metrics:
100 - OID: 1.3.6.1.4.1.14988.1.1.15.1.1.6
101 name: mtxrPOEPower
102 description: Power over ethernet
102 - family: MikroTik/PoE
103 + family: Network/PoE/Power
104 unit: "W"
105 - OID: 1.3.6.1.4.1.14988.1.1.15.1.1.4
106 name: mtxrPOEVoltage
107 description: Power over ethernet voltage
107 - family: MikroTik/PoE
108 + family: Network/PoE/Voltage
109 unit: "V"
110 - OID: 1.3.6.1.4.1.14988.1.1.15.1.1.5
111 name: mtxrPOECurrent
112 description: Power over ethernet current
112 - family: MikroTik/PoE
113 + family: Network/PoE/Current
114 unit: "mA"
115 metric_tags:
116 - symbol:
@@ -134,7 +135,7 @@ metrics:
135 OID: 1.3.6.1.2.1.25.3.3.1.2.1
136 name: cpu.usage
137 description: Average percentage of time that this processor was not idle
137 - family: MikroTik/CPU
138 + family: CPU/Usage
139 unit: "%"
140 - MIB: HOST-RESOURCES-MIB
141 table:
@@ -148,13 +149,13 @@ metrics:
149 - OID: 1.3.6.1.2.1.25.2.3.1.5
150 name: memory.total
151 description: Total size of the storage in bytes
151 - family: MikroTik/Memory
152 + family: Memory/Total
153 scale_factor: 1024
154 unit: "By"
155 - OID: 1.3.6.1.2.1.25.2.3.1.6
156 name: memory.used
157 description: Amount of storage currently allocated in bytes
157 - family: MikroTik/Memory
158 + family: Memory/Used
159 scale_factor: 1024
160 unit: "By"
161 metric_tags:
@@ -173,33 +174,33 @@ metrics:
174 - OID: 1.3.6.1.4.1.14988.1.1.3.100.1.3
175 name: mtxrHlSensorValue
176 description: Sensor value
176 - family: Health/Sensors
177 + family: Hardware/Sensor
178 transform: |
179 {{- $sensorType := index .Metric.Tags "sensor_type" | default "" -}}
180 {{- $config := get (dict
180 - "1" (dict "name" "temperature" "unit" "celsius" "family" "Temperature"
181 + "1" (dict "name" "temperature" "unit" "celsius" "family" "Sensor/Temperature/Value"
182 "desc" "Temperature reading")
182 - "2" (dict "name" "fan_speed" "unit" "rpm" "family" "Fan"
183 + "2" (dict "name" "fan_speed" "unit" "rpm" "family" "Sensor/FanSpeed/Value"
184 "desc" "Fan rotation speed")
184 - "3" (dict "name" "voltage" "unit" "volts" "family" "Power" "divisor" 10.0
185 + "3" (dict "name" "voltage" "unit" "volts" "family" "Sensor/Voltage/Value" "divisor" 10.0
186 "desc" "Voltage measurement")
186 - "4" (dict "name" "current" "unit" "amperes" "family" "Power" "divisor" 10.0
187 + "4" (dict "name" "current" "unit" "amperes" "family" "Sensor/Current/Value" "divisor" 10.0
188 "desc" "Current draw")
188 - "5" (dict "name" "power" "unit" "watts" "family" "Power" "divisor" 10.0
189 + "5" (dict "name" "power" "unit" "watts" "family" "Sensor/Power/Value" "divisor" 10.0
190 "desc" "Power consumption")
190 - "6" (dict "name" "sensor_status" "family" "Status"
191 + "6" (dict "name" "sensor_status" "family" "Sensor/Presence/Status"
192 "mapping" (i64map 0 "absent_or_faulty" 1 "present_and_ok")
193 "desc" "Component presence and operational status")
193 - "7" (dict "name" "sensor_state" "family" "Status"
194 + "7" (dict "name" "sensor_state" "family" "Sensor/State/Value"
195 "mapping" (i64map 0 "false" 1 "true")
196 "desc" "Boolean sensor state")
196 - "8" (dict "name" "usage_percentage" "unit" "percentage" "family" "Usage"
197 + "8" (dict "name" "usage_percentage" "unit" "percentage" "family" "Sensor/Usage/Value"
198 "desc" "Resource utilization percentage")
199 ) $sensorType -}}
200
201 {{- if $config -}}
202 {{- setName .Metric (printf "%s_%s" .Metric.Name (get $config "name")) -}}
202 - {{- setFamily .Metric (printf "Sensors/%s" (get $config "family")) -}}
203 + {{- setFamily .Metric (get $config "family") -}}
204 {{- with get $config "desc" -}}{{- setDesc $.Metric . -}}{{- end -}}
205 {{- with get $config "unit" -}}{{- setUnit $.Metric . -}}{{- end -}}
206 {{- with get $config "divisor" -}}{{- setValue $.Metric (int64 (div (float64 $.Value) .)) -}}{{- end -}}