i've followed this tutorial
https://assets.nagios.com/downloads/nag ... ios_XI.pdf
I've managed to recieve traps and they are logged in
Code: Select all
/var/log/snmptt/snmptt.log
Mon Apr 25 16:30:22 2016 .1.3.6.1.6.3.1.1.5.3 Critical "Status Events" ncdev - Link down on interface eth2. Admin state: $2. Operational state: $3
And service on that host in in state:
Code: Select all
SNMP TrapsPassive Only Check Pending N/A 1/1 N/A No check results for service yet...Code: Select all
/etc/snmp/snmptt.conf
#
#
#
EVENT linkDown .1.3.6.1.6.3.1.1.5.3 "Status Events" Critical
FORMAT Link down on interface $1. Admin state: $2. Operational state: $3
#EXEC qpage -f TRAP notifygroup1 "Link down on interface $1. Admin state: $2. Operational state: $3"
SDESC
A linkDown trap signifies that the SNMP entity, acting in
an agent role, has detected that the ifOperStatus object for
one of its communication links is about to enter the down
state from some other state (but not from the notPresent
state). This other state is indicated by the included value
of ifOperStatus.
EDESC
#
#
#
Code: Select all
snmptrap -v 2c -c public <nagioserverip> '' .1.3.6.1.6.3.1.1.5.3 .1.3.6.1.6.3.1.1.5.3 s "eth2"