fix(go.d/snmp): handle invalid SFP temperature readings for empty slots (#20884)
Ilya Mashchenko committed
Aug 24, 2025 at 19:43 UTC
2fa0197190668b7e13ba0300d7c8a9edf49f2c02
1 file changed
+5
src/go/plugin/go.d/config/go.d/snmp.profiles/default/mikrotik-router.yaml
+5
@@ -89,6 +89,10 @@ metrics:
89
description: Temperature at sensor chip
90
family: 'Hardware/OpticalModule/Temperature/Value'
91
unit: "Cel"
92
+ transform: | # Set temperature to 0 when no SFP module present (MikroTik returns ~4294967168 for empty slots)
93
+ {{- if gt .Metric.Value 4294967000 -}}
94
+ {{- setValue .Metric 0 -}}
95
+ {{- end -}}
96
- OID: 1.3.6.1.4.1.14988.1.1.19.1.1.10
97
name: mtxrOpticalRxPower
98
chart_meta:
@@ -146,6 +150,7 @@ metrics:
150
symbol:
151
OID: 1.3.6.1.4.1.14988.1.1.19.1.1.2
152
name: mtxrOpticalName
153
+
154
- MIB: MIKROTIK-MIB
155
table:
156
OID: 1.3.6.1.4.1.14988.1.1.15.1