Ad Widget

Collapse

SNMP traps, again

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • artesvida
    Junior Member
    • May 2007
    • 18

    #1

    SNMP traps, again

    Following all of the useful SNMP information in the forums I am successfully receiving SNMP traps in Zabbix. However, I have a sort of complex scenario that I hope I can handle in Zabbix.

    I have a climate monitor that has a few dry contact inputs. It sends traps that Zabbix catches whenever those alarms are activated. It also sends traps when any of those alarms are cleared. Here's the deal: when an alarm is set, the OID is always the same: enterprises.850.100.2.0.3, and the value sent is the ID number of the alarm. Additional values in the variable bindings of the trap provide a description of the alarm (i.e. which of the dry contracts has been activated). When an alarm is cleared, the OID is always enterprises.850.100.2.0.4, and the value sent is the ID number of the particular alarm that was cleared. The ID number does not identify the sensor -- it is a unique identifier for the particular alarm (it is incremented by one each time the device sends an alarm). As you can see, there can be many different alarms that are set at any given time, and any of those alarms (not just the most recent one set) can be cleared.

    So... any thoughts on how to support this is Zabbix? Ideally, I would like the device to be "in alert" when there are any active alarms, then "normal" when they're all gone. Right now I have an "Alarm Set" zabbix trapper item on the host (OID enterprises.850.100.2.0.3) and an "Alarm Clear" item (enterprises.850.100.2.0.4) but that doesn't really do what I want. Is there a way for Zabbix to keep track of the ID #'s of the alarms that were set, and then clear those ID #'s as the clear traps come in? I suspect not, but perhaps there's a clever way of "unpacking" the trap in the snmptrap.sh script...

    Thank you!!!
  • artesvida
    Junior Member
    • May 2007
    • 18

    #2
    In case anyone's interested, this is how I worked it out:

    Ignore the ID# of the alarm. Too difficult to store and retrieve. One OID is "alarm set" and the other is "alarm clear". Further "unpacking" of the trap reveals which alarm is referred to. In my case, dry contact #4 is OID enterprises.850.101.2.1.1.3.4. So, I created an "SNMP Trapper" item on the particular host, and the snmptrap.sh script figures out what the alarm is about, and if it's a "set" sends a 1 as the data, and sends a 0 if it's a "clear."

    This is for an SNMPWEB card that is in a TrippLite UPS. I've figured out how to watch for any other traps that might go through as well.

    Yeah for Zabbix!

    Comment

    Working...