Nagios-users digest, Vol 1 #1552 - 13 msgs

Stanley Hopcroft Stanley.Hopcroft at IPAustralia.Gov.AU
Mon Jul 7 04:41:10 CEST 2003


Dear Sir,

I am writing to thank you for your letter and say

> From: "Goran Almvik" <goran.almvik at intentia.se>
> Date: Fri, 4 Jul 2003 17:48:49 +0200
> Subject: [Nagios-users] Loading MIBs
> 
> This is a multipart message in MIME format.
> --=_alternative 0056E474C1256D59_=
> Content-Type: text/plain; charset="us-ascii"
> 
> Anybody got an inside tip on how to import/load a set of MIBs? When having 
> declared the MIBs I want in the SNMP.CONF and try to start snmptrapd I get 
> a lot of errors. The same thing when trying to do a simple walk ... 
> Anybody feeling up for it?
> 
> [root at sto30161 net-snmp-5.0.8]# snmpwalk -v 1 -c public 10.20.29.60 
> enterprises
> Unlinked OID in COMTEK-OS400-CMN-MIB: comtekos400 ::= { comtek 5 }
> Undefined identifier: comtek near line 7 of 
> /usr/share/snmp/mibs/CMTK-cmtkcmn-MIB.txt
> Did not find 'comtekos400Mib' in module COMTEKA4-MIB 
> (/usr/share/snmp/mibs/CMTK-comtektp-MIB.txt)
> Unlinked OID in COMTEK-AS400-TRAP-MIB: comtekos400Mib# ::= { 
> comtekos400Mib 0 }
> 
> /GA
>

that, as Mr McClure wrote, this problem is not caused by Nagios 

However, it is of sufficient importance to Nagios users to warrant some 
amplification.

It really is trmendously important for Nagios to be able to harvest 
passive service check results from extant/legacy SNMP trap 
infrastructure and while Nagios is _not_ an SNMP manager, it can be 
adapted to do so as described in the docs ('Integration with other 
software').

The assumption for those dealing with SNMP is that one is able to deal 
with the matters you have raised.

Quite frankly however, doing so this is not obvious and frustrating. So
settle back. If you still have an interest in this matter you will have
to do some work finding out about Net-SNMP and MIBs.

What follows is simply what I have found helpful in doing this stuff. It 
is not specifically helpful to your problem but may help.
it.

1 You should have a look at the FAQs on the Net-SNMP. IIRC correctly
they answer the question of 'unlinked OID'.

2 snmptranslate is your friend in dealing with freshly downloaded MIBs. 
If snmptranslate cannot convert an OID from the MIB to numeric format, 
snmptrapd will fail.

Common causes of snmptranslate failures are

2.1 You don't have the MIBS that are required by the problem MIB. These 
are listed in the IMPORT list. 

Unfortunately, there is no MIB infrastructure that I know of that 
downloads a MIB and its pre-reqs. However, this is an ignorant Unix 
context remark.

2.2 The MIBs are not in the place Net-SNMP expects them.

You really want a private MIB directory so you don't risk clobbering the 
standard MIBs in (maybe) /usr/local/share/snmp/mibs/.

Net-SNMP offers ~home/.snmp for this purpose

2.3 The MIBS are not compiled

You need to use -MAll (?) as an option for the CLI tools or update your 
SNMP configuration to read _all_ your MIB directories and compile all 
the MIBs.

2.4 The MIB has "\r\n" (it's in DOS format).

You can get these out with something like

perl -i.bak -pe 's/\r//g' <mib_name>

2.5 The MIB is poorly formed and requires manual editing.

This is unlikely but not impossible,

2.6 Prepare to accept a failure and try another MIB. Some of the Cisco 
MIBs for example are not accepted by all the IOSs (eg CPU utiilistion)

3 Invest some time in learning about how to test your trap handlers with 
either snmptrap or Net::SNMP::snmptrap (?). 

You really need to be able to generate ad-hoc traps and these tools are 
helpful.

HTH

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 sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
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