Closed rudybroersma closed 8 months ago
Looks like an error in the implementation of SNMP in the fortinet device. The only question we may ask, do they always do the same error on all devices ? If not, then we would need to find a way to address it. (2 sensors, one in RPM, one in percent, using same OID, and a skip_value condition based on ENTITY-SENSOR-MIB::entPhySensorUnitsDisplay.10 = STRING: Percent (%)
). If the error is the same everywhere, fix is easy, just change the type to percent and done.
I reached out to FortiNet.. They are not going to do anything about it. Apparantly the fan speed being returned as a percentage value instead of an RPM value is a hardware limitation.
It seems to be wrong all FortiSwitches, so I'll write a fix to convert this to a percentage sensor instead of RPM.
The problem
There's an issue with FortiSwitch fan sensors and I'm wondering if this is a bug in FortiSwitch's SNMP implementation or a discovery issue in LibreNMS. I've attached the relevant SNMPwalk output.
The issue is that LibreNMS shows a value of just a few RPMs. Eg, currently I have: Fan 1 3.9 rpm Fan 2 3.6 rpm Fan 3 3.9 rpm etc, etc
At first I thought there's a wrong divisor and it should jsut be multiplied by a thousand, so you get 3900rpm of 3,9kRPM. The current divisor value in MySQL is 10 for these sensors. It's unclear to me where LibreNMS got that number from, but okay. I didn't look really hard.
However, looking at the SNMP walk I see:
ENTITY-SENSOR-MIB::entPhySensorValue.10 = INTEGER: 39 ENTITY-SENSOR-MIB::entPhySensorPrecision.10 = INTEGER: 1 ENTITY-SENSOR-MIB::entPhySensorType.10 = INTEGER: rpm(10) ENTITY-SENSOR-MIB::entPhySensorUnitsDisplay.10 = STRING: Percent (%) ENTITY-SENSOR-MIB::entPhySensorValueUpdateRate.10 = Wrong Type (should be Gauge32 or Unsigned32): INTEGER: 30000
ENTITY-MIB::entPhysicalDescr.10 = STRING: Sensor, Type: Fan ENTITY-MIB::entPhysicalClass.10 = INTEGER: sensor(8) ENTITY-MIB::entPhysicalName.10 = STRING: Fan1
This looks as if the Fan RPM sensors are really percentage sensors and not RPM sensors. The command line seems to agree:
My question is:
I'm not entirely sure because there doesn't seem to be a value for 'percent' in the Entity Sensor MIB. EntitySensorDataType ::= TEXTUAL-CONVENTION only defines ' percentRH' (9) for relative humidity. There's no 'regular' percentage type. So I'm not sure what it should be if it shouldn't be 'rpm'
fsw-entity-mib-walk.txt fsw-sensor-mib-walk.txt
Output of ./validate.php
What was the last working version of LibreNMS?
No response
Device info
FortiSwitch (all models)
Discovery output
Poller output