[j-nsp] SNMP OIDs for Yellow/Red Alarm on MX204

Martin Tonusoo martin at tonusoo.ee
Tue Mar 26 08:32:25 EDT 2024


Hi.

As a workaround,
https://gist.github.com/tonusoo/2f95c1d377bf658dcf5c8b7c9dba5f57 could
be used. Few examples:

$ snmpwalk -v 2c -c public mx204 .1.3.6.1.4.1.2636.3.4
JUNIPER-ALARM-MIB::jnxYellowAlarmState.0 = INTEGER: off(2)
JUNIPER-ALARM-MIB::jnxYellowAlarmCount.0 = Gauge32: 0
JUNIPER-ALARM-MIB::jnxRedAlarmState.0 = INTEGER: off(2)
JUNIPER-ALARM-MIB::jnxRedAlarmCount.0 = Gauge32: 0
$
$ snmpwalk -v 2c -c public mx204 jnxYellowAlarmCount.0
JUNIPER-ALARM-MIB::jnxYellowAlarmCount.0 = Gauge32: 0
$
$ snmpwalk -v 2c -c public mx204 jnxYellowAlarmCount
JUNIPER-ALARM-MIB::jnxYellowAlarmCount.0 = Gauge32: 0
$
$ snmpget -v 2c -c public mx204 jnxRedAlarmState.0
JUNIPER-ALARM-MIB::jnxRedAlarmState.0 = INTEGER: off(2)
$


Installation:

root at mx204> file list /var/db/scripts/snmp/

/var/db/scripts/snmp/:
mx204_yellow_and_red_alarm.slax

root at mx204> show configuration system scripts snmp | display
inheritance no-comments
/* jnxYellowAlarmState, jnxYellowAlarmCount, jnxRedAlarmState and
jnxRedAlarmCount support */
file mx204_yellow_and_red_alarm.slax {
    oid .1.3.6.1.4.1.2636.3.4.2.2.1;
    oid .1.3.6.1.4.1.2636.3.4.2.2.2;
    oid .1.3.6.1.4.1.2636.3.4.2.3.1;
    oid .1.3.6.1.4.1.2636.3.4.2.3.2;
    checksum sha-256
bbe81079f38d18c85cf6d8799a7fa459ce3418c5582f746cf743b00a73e0ab91;
}

root at mx204>


The script looks for "Major" or "Minor" alarms in the output of RPCs
for both the "show system alarms" and "show chassis alarms". This
means that alarms listed in both outputs are counted twice for
jnxRedAlarmCount and jnxYellowAlarmCount.

Based on my experience the chassis alarms are a subset of system
alarms, but I'm not sure. It seems to work in a way that certain alarm
types(seen in the XML output) like "ETHER" or "Chassis" are seen in
the output of "show chassis alarms" while all the alarm types are
listed in the output on "show system alarms". On the other hand, the
https://www.juniper.net/documentation/us/en/software/junos/cli-reference/topics/ref/command/show-chassis-alarms.html
states that:

"In Junos, the chassis alarms are different from the system alarms
(viewed by using the show system alarms command)."

Perhaps someone from Juniper could clarify this.


Martin


More information about the juniper-nsp mailing list