Mikrotik CCR2116: Trying to figure out how to monitor fan 3, 4 RPMs in LibreNMS

I have a MikroTik CCR2116 running RouterOS 7.12b3 (as of writing) and LibreNMS (git main/master) running.

The device has four fans installed.

Currently, only fan 1, 2 are discovered. Fans 3, 4 are not discovered automatically.

I am trying to figure out how LibreNMS autodiscovers the number of fans installed. So I can monitor the fanspeed with LibreNMS.

What am I “missing from the picture” to be able to monitor Fans 3 and 4?

system/health/print where type=RPM    
#  NAME        VALUE  TYPE
2  fan1-speed   4020  RPM 
3  fan2-speed   4095  RPM 
4  fan3-speed   3960  RPM 
5  fan4-speed   4005  RPM 


system/health/print oid where type=RPM
 2 name=. value=. type=. 
 3 name=. value=. type=. 
 4 name=. value=. type=. 
 5 name=. value=. type=.

In the RouterOS 7.11 MIBS file. I can see Fans 1, 2 are mentioned. Not Fans 3, 4.

$ grep --ignore-case fan /tmp/mikrotik.mib
mtxrHlActiveFan OBJECT-TYPE
mtxrHlFanSpeed1 OBJECT-TYPE
mtxrHlFanSpeed2 OBJECT-TYPE
        mtxrHlBoardTemperature, mtxrHlVoltage, mtxrHlActiveFan,
        mtxrHlFanSpeed1, mtxrHlFanSpeed2,

Here the mtxrHlFanSpeed1 and mtxrHlFanSpeed2 (RPMs) are listed with OID value

  • .
  • .


  • .
  • .

Screenshot from LibreNMS > Device > Health

I’ve tried to manually add the below to the MIKROTIK-MIB file locally without success

# OID .
mtxrHlFanSpeed3 OBJECT-TYPE
    SYNTAX Gauge32
    MAX-ACCESS read-only
    STATUS current
    ::= { mtxrGaugeValue 7003 }

# OID .
mtxrHlFanSpeed4 OBJECT-TYPE
    SYNTAX Gauge32
    MAX-ACCESS read-only
    STATUS current
    ::= { mtxrGaugeValue 7004 }

& Now run against a wall trying to figure out how to proceed

It looks like Mikrotik never implemented an oid for fan3 and fan4, at least not directly. There are pretty old discussions on that in their forum.

Instead of seems they provided a “gauge table” oid (. to address a number of limitations in SNMP monitoring. It was added in this release: v6.47beta [testing] is released! - MikroTik

So they put a bunch of device health values here together rather than in their branches of the oid tree. And some of the values duplicate what is available elsewhere (fan 1&2 speed, voltage, and a temperature value or two). I don’t know why they would do it this way, but the mib from Mikrotik includes these oids already (as “mtxrGaugeTable”).

It seems like the most straightforward way to achieve your goal of monitoring the fan speeds might be to add custom oids in the device settings and graph/monitor/alert on that. It won’t be as nice as the result you are chasing in your approach, but it should work pretty easily without fighting the limitations of their implementation.

Ugh. Just discovered I “just” need to add the additional fans in the RouterOS.yaml file

A table is 10x better than just straight up OIDs. Nice.

Can someone test this?

1 Like

Sure. Will deploy this at my own instance during this week. And I have now deployed this at my own instance. Instead of my own ugly hack (PR15281). Will provide feedback after running with the patch for a few days.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.