Processing SNMP Traps in Nagios with snmptrapd...
Raphaël 'SurcouF' Bordet
surcouf at debianfr.net
Thu Dec 9 18:34:21 CET 2004
Westlake, Simon wrote:
>Hello,
>
>I'm looking to be able to passively monitor some devices in Nagios using SNMP Traps. I read http://nagios.sourceforge.net/docs/1_0/int-snmptrap.html which details a good method of doing it. However, snmptrapd and nagios are running on the same box and I'm not sure how to pass the traps to Nagios without using ncsa.
>
>
Hi,
I've the same configuration but I can't get snmptrapd to work with
nagios.
I've defined a volatile and passive service as described:
/etc/nagios/services.cfg:
#
# Generic snmp-trap definition template
#
define service {
name generic-snmp-trap
register 0
service_description SNMP Trap
is_volatile 1
check_command check-host-alive
active_checks_enabled 1
passive_checks_enabled 1
max_check_attempts 1
normal_check_interval 1
retry_check_interval 1
check_period none
notification_interval 31536000
use generic-service
}
define service {
host_name is1bfw01
service_description Test Trap
use generic-snmp-trap
register 1
}
__END__
I've configure snmptrapd to use this attached script
(handle-san-snmptrap) which send data to submit_check_result script,
like following:
/etc/snmp/snmptrapd.conf:
traphandle .1.3.6.1.2.1.1.6.0
/usr/lib/nagios/plugins/eventhandlers/handle-san-snmptrap 1
__END__
If I'm executing this command test, I've got an alert on nagios:
# echo "is1bfw01
192.168.0.1" | /usr/lib/nagios/plugins/eventhandlers/handle-san-snmptrap 1
But when I'm sending a trap, using snmptrap on remote host, I've
recevied this trap according to snmptrapd's log,
but no alert on nagios... Why ?
Dec 9 17:54:55 is1bin01 snmptrapd[22698]: 2004-12-09 17:54:55
192.168.0.1(via 192.168.0.1) TRAP, SNMP v1, community public
^I.1.3.6.1.4.1.8426.1.1.1 Enterprise Specific Trap (17) Uptime: 12 days,
21:36:33.82 ^I.1.3.6.1.2.1.1.6.0 = STRING: Just here
Regards,
--
Raphaël 'SurcouF' Bordet
http://debianfr.net/ | surcouf at debianfr dot net
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: handle-san-snmptrap
URL: <https://www.monitoring-lists.org/archive/users/attachments/20041209/6788a9cb/attachment.ksh>
More information about the Users
mailing list