Variable as Status Events in snmptt.conf
Posted: Tue Jan 31, 2017 5:40 am
Hello guys,
This is my trap description.
EVENT pduUnitActivePowerStateChange .1.3.6.1.4.1.38446.1.9.24 "Status Events" $+6
FORMAT PDU unit active power state changes. $*
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "" "PDU unit active power state changes to $+6"
REGEX (.iso:1)(Critical)
REGEX (.iso:2)(Warning)
REGEX (.iso:3)(Warning)
REGEX (.iso:4)(Critical)
REGEX (.iso:5)(Normal)
SDESC
PDU unit active power state changes.
Variables:
1: pduIndex
2: pduNamePlateName
3: pduNamePlateInetAddressType
4: pduNamePlateIPAddress
5: pduUnitStatusLoadState
6: pduUnitStatusActivePower
7: sysContact
8: sysName
9: sysLocation
EDESC
I would like to assign the status events by a variable. I tried to put $+6 with a regex but didn't work.
This is the line in the snmptt.log :
Tue Jan 31 11:18:04 2017 .iso .iso "Status Events" 10.96.148.240 - PDU unit active power state changes. 0
Thanks
Jim
This is my trap description.
EVENT pduUnitActivePowerStateChange .1.3.6.1.4.1.38446.1.9.24 "Status Events" $+6
FORMAT PDU unit active power state changes. $*
EXEC /usr/local/bin/snmptraphandling.py "$r" "SNMP Traps" "$s" "$@" "" "PDU unit active power state changes to $+6"
REGEX (.iso:1)(Critical)
REGEX (.iso:2)(Warning)
REGEX (.iso:3)(Warning)
REGEX (.iso:4)(Critical)
REGEX (.iso:5)(Normal)
SDESC
PDU unit active power state changes.
Variables:
1: pduIndex
2: pduNamePlateName
3: pduNamePlateInetAddressType
4: pduNamePlateIPAddress
5: pduUnitStatusLoadState
6: pduUnitStatusActivePower
7: sysContact
8: sysName
9: sysLocation
EDESC
I would like to assign the status events by a variable. I tried to put $+6 with a regex but didn't work.
This is the line in the snmptt.log :
Tue Jan 31 11:18:04 2017 .iso .iso "Status Events" 10.96.148.240 - PDU unit active power state changes. 0
Thanks
Jim