Pre-fix This is not specifically PRTG related, but I am curious as if to anyone has worked with bit-masked SNMP values inside of PRTG.

I apologize for my lack of understand of bit-masks, but I am trying to create a Custom SNMP sensor to pull a summary of alarms from a device. These alarms send an integer value instead of text strings. (ex: 201327542) I have a brief understanding of how lookup files work, but am unsure of how to make use of the values sent from the device. Inside of the device's MIB file, the description states the alarm status bits are 'or'ed.

Can someone please explain this to me?

Here's the description of Summary alarm OID:

  • Bit-mask which shows alarms of the device
  • The device and its band alarm status is interrogated, the alarm status bits are 'or'ed'. The bit flags are defined in the device field *another OID field*.

And in the description of the device that has this bit flags:

  • Bit-mask which shows alarms pending on device
    • 0: PowerSourceVoltage
    • 1:Fan 2 Failure
    • 2: Fan 1 Failure
    • ..etc

Any information would be very helpful in understanding how I could use this in PRTG.


Article Comments

Hello there,
thank you for your KB-Post.

PRTG's Lookups do indeed implement the necessary groundwork for Bitmasks. Please have a look here for an example:

If your device returns only a bit single int, this is the "ideal" scenario for us. If the value was hex-encoded or a big string, this wouldn't work. But a large integer will work just fine. May I ask what device/model and MIB you're working with?

Essentially, if it's base 2 you can simply modify the lookup shared in the KB-Post shared above and adjust it to your requirements and messages/states ("Power Source Voltage Issue", "Fan 2 Failure", "Fan 1 Failure", ...

Best Regards,
Luciano Lingnau [Paessler Support]


Mar, 2018 - Permalink