SNMP

Robert Hajime Lanning lanning at lanning.cc
Fri Nov 11 20:20:23 CET 2005


<quote who="Slighter, Tim TQO">
> Hopefully someone out there can provide some advice on how to
> tackle our SNMP problem.  Currently, we have about 10 devices
> sending 100+ SNMP alerts to our SNMP collector.  The SNMP traps
> are of many variations and mibs.  We wish to configure Nagios
> to passively accept all incoming SNMP traps but it looks like
> an external command would have to be written. After reading
> through the documentation, it looks like an external command
> would have to be written for every possible mib/oid and
> considering there are up to one hundred different mibs this
> would be very time consuming.  The same applies to creating
> checks in the snmp plugins file.  Anyone have ideas on how to
> allow hosts to receive all SNMP traps and update this
> information into Nagios?
>
> Thanks,
> Tim

I created a generic "SNMP Trap":
define service{
        hostgroup_name                  *
        service_description             SNMP Trap
        servicegroups                   snmp-service-group
        max_check_attempts              1
        normal_check_interval           30
        check_command                   check_null
        retry_check_interval            30
        notification_interval           30
        use service
}

Then I have snmptrapd from net-snmp configured like this:
traphandle default /usr/local/sbin/snmptt

"snmptt" is the SNMP Trap Translator.  It takes the trap OIDs and
translates them (via MIBs) to human readable labels.
snmptt has a mapping file which I have configured like this:
# CatchAll
EVENT CatchAll .1.* "SNMP-TRAP" Critical
FORMAT $A - $D
EXEC /usr/local/nagios/libexec/eventhandlers/submit_check_result \
 "$A" "SNMP Trap" 2 "$O: $1 $2 $3 $4 $5"

Then I have a host object for every IP that sends traps.

-- 
And, did Guloka think the Ulus were too ugly to save?
                                         -Centauri



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list