SNMP

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


Yes, the hosts.cfg stuff:
define host {
 host_name rtr-amk-bldg
 alias Singapore AMK building router
 address 10.4.96.1
 hostgroups routers
 notification_interval 30
 use host
}

As long as the host belongs to a group (any group) the Service
entry has "hostgroup_name   *", so every host in every hostgroup
inherits the service.

As long as the IP address in the host object matches the IP address
that the SNMP trap comes from, the proper host object receives the
trap info.

<quote who="Slighter, Tim TQO">
> Thanks, so the last part, "a host object for every IP that
> sends traps", assuming this is the hosts.cfg file, what entry
> would you place there?
>
> Thank you,
>
> Tim
>
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net
> [mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Robert
> Hajime Lanning
> Sent: Friday, November 11, 2005 11:20 AM
> To: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] SNMP
>
>
> <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
>
>
>


-- 
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