I am in the process of installing a number of Juniper EX2200, EX3200 and EX4200 switches for a client and as part of the setup need to be able to monitor the switches for any alarms (eg Switch Management interface down or Switch booted from Backup Partition) and have them dealt with accordingly.
Having a look at the SNMP OID tree for the EX switches I came across the following useful table
http://www.oidview.com/mibs/2636/JUNIPER-ALARM-MIB.html
Object Name | Object Identifier |
jnxAlarms | 1.3.6.1.4.1.2636.3.4 |
jnxCraftAlarms | 1.3.6.1.4.1.2636.3.4.2 |
jnxAlarmRelayMode | 1.3.6.1.4.1.2636.3.4.2.1 |
jnxYellowAlarms | 1.3.6.1.4.1.2636.3.4.2.2 |
jnxYellowAlarmState | 1.3.6.1.4.1.2636.3.4.2.2.1 |
jnxYellowAlarmCount | 1.3.6.1.4.1.2636.3.4.2.2.2 |
jnxYellowAlarmLastChange | 1.3.6.1.4.1.2636.3.4.2.2.3 |
jnxRedAlarms | 1.3.6.1.4.1.2636.3.4.2.3 |
jnxRedAlarmState | 1.3.6.1.4.1.2636.3.4.2.3.1 |
jnxRedAlarmCount | 1.3.6.1.4.1.2636.3.4.2.3.2 |
jnxRedAlarmLastChange | 1.3.6.1.4.1.2636.3.4.2.3.3 |
I have used the jnxRedAlarmCount and jnxYellowAlarmCount oid values as basic Opsview SNMP Service Checks to give me an initial overview but in the long term will be looking to combine this into a full service check script that can be used to check a number of different things.
The setup of the Service Check in Opsview is fairly simple and below are screenshots of the config that I have for each service check.
All you need to configure on your hosts is the SNMP community string and you can apply these checks individually or via a Host Template.
Once I performed a reload I could see the following in Opsview for one of my switches:
A bit of inspection showed that the Red Alarm was for the Management Interface being down (but wasnt being used on this switch) and the Yellow alarm was due to not setting a rescue configuration. I cleared the alarms by isuing the following commands
edit set chassis alarms management-interface link-down ignore commit and-quit request system configuration rescue save
Now when I refresh the checks in Opsview I get an OK state for both checks