...
Generally the other properties that we wish to set can be done with one rule. Consider the following trap received by opEvents.
Code Block |
---|
2017-07-12T12:23:37 10.113.176.4 UDP: [10.113.176.4]:36570->[10.255.26.7] SNMPv2-MIB::sysUpTime.0=6:1:04:53.72 SNMPv2-MIB::snmpTrapOID.0=STARENT-MIB::starCardTempOK STARENT-MIB::starSlotNum=1 STARENT-MIB::starCardTemperature=40 degrees Celcius SNMPv2-MIB::snmpTrapEnterprise.0=STARENT-MIB::starentTraps |
Evaluating this trap it's determined that a single rule can set the properties below.
Code Block |
---|
103 => {
IF => qr/STARENT-MIB::starCardTempOK/,
THEN => ["set.event(Card Temperature OK)", "set.stateful(temperature)", "set.state(up)", "set.priority(2)"],
}, |
Based on a match of "STARENT-MIB::starCardTempOK", the rule will take action.
- event - "Card Temperature OK"
- stateful - "temperature"
- state - "up"
- priority - "2"