Follow up to the missing case 9 of Ethan's snmpd example

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Thu Nov 6 06:18:38 CET 2003


Dear Sir,

I am writing to thank you for your letter and say,

On Wed, Nov 05, 2003 at 08:19:31PM -0800, nagios-users-request at lists.sourceforge.net wrote:

> Date: Wed, 05 Nov 2003 16:22:32 -0700
> From: Drew Cullis <drew.cullis at gwl.com>
> To: Nagios <nagios-users at lists.sourceforge.net>
> Subject: [Nagios-users] Follow up to the missing case 9 of Ethan's snmpd example
> 
>  Can you tell me where the Oid (in your case snTrapL4RealServerUp) in
> your snmptapd.conf file comes from? Is it a line from the MIB itself?
> I've tried several different variations from what I think is the
> equivalent part of the MIB I am using for my StorageTek D280's and get
> an error when I restart the snmptrapd process (see below). I've also
> included a part of the MIB I got this particular bit from.
>  I've even tried using the numerical OID and that didn't work either. 
> 
> # 
>  traphandle FOUNDRY-SN-TRAP-MIB::snTrapL4RealServerUp
> /usr/local/netsaint/libexec/eventhandlers/handle-foundry-traps 21
> 

that I think you are going to learn more about the Net-SNMP 
tools/applications.

Perhaps you haven't loaded the StorageTek MIB into the locations that 
the Net-SNMP tools expect to find them.

One of those places includes (at least on some systems)

usr/local/share/snmp/mibs/

tsitc> ls /usr/local/share/snmp/mibs/
AGENTX-MIB.txt                          INET-ADDRESS-MIB.txt                    
NOTIFICATION-LOG-MIB.txt                SNMP-VIEW-BASED-ACM-MIB.txt
BRIDGE-MIB.txt                          IP-FORWARD-MIB.txt                      
RFC-1215.txt                            SNMPv2-CONF.txt
DISMAN-SCHEDULE-MIB.txt                 IP-MIB.txt                              
RFC1155-SMI.txt                         SNMPv2-MIB.txt
.... blah blah

You may want to leave this location for the standard MIBs and put your
site-specific stuff in one of the other locations.

You can determine whether the MIBs are 

1 being located

2 being translated correctly - a suprising number of public/vendor MIBs
have typos, \n\r pairs (Windows end of line), or much harder to find
mistakes that cause Net-SNMP anguish.

with snmptranslate.

There is a good tutorial about this on the Net-SNMP web site (how to add 
the Cisco RHINO MIB IIRC)

So to answer your question, 'FOUNDRY-SN-TRAP-MIB::snTrapL4RealServerUp' 
comes from

1 the OID comes from my home directory/.snmp/mibs/MIB07112.mib.txt, a 
MIB file from Foundry networks that is located in a path that Net-SNMP 
also searches for MIBs

2 The OID is defined beneath the FOUNDRY-SN-TRAP-MIB MIB defined in that 
file

FOUNDRY-SN-TRAP-MIB DEFINITIONS ::= BEGIN

-- Router Switch Trap MIB Release 1.0.0
-- Revision 06/02/97

-- Copyright 1996-1997 Foundry Networks, Inc.

3 Trap 21 defined beneath that MIB.

Net-SNMP, provided that it has this MIB and all its IMPORTED mibs
installed allows this to be referred to as
FOUNDRY-SN-TRAP-MIB::snTrapL4RealServerUp, otherwise in an
snmptrapd.conf file it would be referred to as

tsitc> snmptranslate -On FOUNDRY-SN-TRAP-MIB::snTrapL4RealServerUp
.1.3.6.1.4.1.1991.0.21
tsitc> 

(You can get lucky).

BTW, every time I find I need to do something with SNMP and either 
Net::SNMP or Net-SNMP, I always have a hard time.

The S stands for a 'simple implementation' not ease of use or 
comprehension. At best it stands for 'Simpler than CMIP' (or CIM for all 
I know).

Don't give up.

Or if you do get discouraged - maintaining trap handlers is not fun and 
that means any time you need to do something - try Sec.

You still need the MIBs installed, but 

- everything happens in one place (sec.conf)

- sec reads the snmptrapd log so you are only dealing with text.

If you don't like Sec, then SnmpTT is a scalable less alien approach. 

Yours sincerely.

-- 
------------------------------------------------------------------------
Stanley Hopcroft
------------------------------------------------------------------------

'...No man is an island, entire of itself; every man is a piece of the
continent, a part of the main. If a clod be washed away by the sea,
Europe is the less, as well as if a promontory were, as well as if a
manor of thy friend's or of thine own were. Any man's death diminishes
me, because I am involved in mankind; and therefore never send to know
for whom the bell tolls; it tolls for thee...'

from Meditation 17, J Donne.


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
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