Add mib files to /usr/share/snmp/mibs

Jeyri bautista jbautista at intercable.net.ve
Thu Mar 11 22:10:31 CET 2004


Thanks, I solved the problem, but now I have other problem.

My nagios receive the traps from my routers cisco, and is running the
snmptrapd daemon to receive this traps.

I create a snmptrapd.cong file that compare the traps received with the mibs
files, it is working very well with the mib files that was installed with
the net-snmp package, but when I add a mib file to /usr/share/snmp/mibs and
restart the snmptrapd appear the following error:

/etc/snmp/snmptrapd.conf: line 27: Error: Bad trap OID in traphandle
directive: CISCO-ACCESS-ENVMON-MIB::caemTemperatureNotification

and when I execute:
>> snmptranslate -Ib -On caemSupplyStatusTable -m
/usr/share/snmp/mibs/CISCO-ACCESS-ENVMON-MIB.txt

appear the following error:

Unlinked OID in CISCO-ACCESS-ENVMON-MIB: ciscoAccessEnvMonMIB ::= {
ciscoMgmt 61 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: caemSupplyStatusTable ::= {
caemObjects 1 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: caemSupplyFailedComponent ::=
{ caemSupplyStatusEntry 1 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: caemGroups ::= {
caemConformance 2 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: caemCompliances ::= {
caemConformance 1 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: caemCompliance ::= {
caemCompliances 1 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: caemGroup ::= { caemGroups 1 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: ciscoAccessEnvMonMIB ::= {
ciscoMgmt 61 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: caemVoltageNotification ::= {
caemMIBNotifications 2 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: caemTemperatureNotification ::=
{ caemMIBNotifications 1 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: caemConformance ::= {
ciscoAccessEnvMonMIB 3 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: caemMIBNotificationPrefix ::=
{ ciscoAccessEnvMonMIB 2 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: caemObjects ::= {
ciscoAccessEnvMonMIB 1 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: caemMIBNotifications ::= {
caemMIBNotificationPrefix 0 }
Cannot adopt OID in CISCO-ACCESS-ENVMON-MIB: caemSupplyStatusEntry ::= {
caemSupplyStatusTable 1 }
Unable to find a matching object identifier for "caemSupplyStatusTable"

How can I do to solve that?

Thanks,

Jeyri Bautista

----- Original Message ----- 
From: "Subhendu Ghosh" <sghosh at sghosh.org>
To: "Jeyri bautista" <jbautista at intercable.net.ve>
Cc: <nagios-users at lists.sourceforge.net>
Sent: Thursday, March 11, 2004 3:05 PM
Subject: Re: [Nagios-users] Add mib files to /usr/share/snmp/mibs


On Thu, 11 Mar 2004, Jeyri bautista wrote:

> Hi,
>
> I´m receiving snmp traps with my nagios, but I need add other mib files
> to can receive other traps types, but when I copy the new mib file to
> the path /usr/share/snmp/mibs all my check_snmp goes to warning state.
>
> I read the faq, but I don´t understood how to solve that.
>
> I don´t know if I have to do other thing that copy the mib in the path.
>
> Anybody can help me,
>
> Thanks,
>
> Jeyri

It means that the mibs files you added do not have the corrent syntax.
The net-snmp package is relatively strict about syntax.

If you don't feel comfortable correcting the syntax, then change the
invocation of check_snmp


Normally check_snmp will accept either numeric OIDs (e.g. 1.3.6.1.2.1.1.0)
or textual (e.g. system.0).  When getting textual OIDs, it needs to
convert them to numeric OIDS.  This is where the mib files come into the
picture.  Bad syntax generates output on stderr and causes a warning.

To bypass this, make sure you are passing only numeric OIDs to check_snmp
and also add the "-m :" option to check_snmp.

The -m option specifies the mib modules to load.  Just providing a : makes
it an empty list and none of the mibs are loaded.

This also make the check_snmp plugin run faster.

To convert you textual oids to numeric, try:

snmptranslate -Ib -On textual oid

-- 

-sg



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=ick
_______________________________________________
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



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
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