How to load MIBs for a cisco?

Subhendu Ghosh sghosh at sghosh.org
Thu Aug 4 15:24:18 CEST 2005


Hi Marco

Welcome to the snmp world. - Unfortunately Nagios does not "load" any snmp 
mibs, the same way HP OpenView or others might. Instead check_snmp and 
other plugins use snmp to retrieve appropriate data for Nagios.

SNMP is client-server protocol and you are always at the client end when 
you are issuing commands like snmpget, snmpwalk. These commands do not 
need a snmp server to run locally, just on the device you are trying to 
query. so when you are adding MIBs to the local store, there is no need 
to restart the local daemon - it doesn't care.
By default, the snmp cmds will read an explicit set of MIBs that are 
specified at compile time.

It looks like you add some of the Cisco MIBS to the local store.  If you 
add them individually, you may have missed some dependencies.  The easiest 
way to fix this: "rm CISCO-*" mibs; retrive the SMIv2 version of the cisco 
mibs in the tarball "ftp.cisco.com/pub/mibs/v2/v2.tar.gz".

Then you have to tell the snmpcmds to use all the mibs by using the option 
"-m ALL"

Finally - to retrieve snmp data - they can only be retrieved from "leaf" 
objects, so .1.3.6.1.4.1 is always going to error as it is not a leaf 
object.

Finally - you may want to read up on some SNMP tutorials on the web, as 
badly configured SNMP access, can leave you network open to abuse. 
specially if SNMP is accessible on your firewall.

-sg

On Thu, 4 Aug 2005, Marco Borsani wrote:

> Hi all!
>
> I am reading many documents about MIB, snmp and so on, but anywhere I found
> a way to load other mibs on my nagios server.
>
> Actually I have installed net-snmp-5.1.1 which have created dir
> /usr/local/share/snmp/mibs that contain some MIB files.
>
> I try to "add" other files to that dir, restart snmpdm daemon , but nothing
> happened!
>
> When I perform the command:
> #> ./check_snmp -H 10.212.0.240 -o .1.3.6.1.4.1
> I receive this error message:
> SNMP problem - No data recieved from host
> CMD: /usr/local/bin/snmpget -t 1 -r 9 -m ALL -v 1 -c public 10.212.0.240:161
> .1.3.6.1.4.1
>
> When I perform dircetly the command:
> #> /usr/local/bin/snmpget -t 1 -r 9 -m ALL -v 1 -c public 10.212.0.240:161
> .1.3.6.1.4.1
> I receive this error message:
> SNMPv2-SMI-v1: Module not found
> Cannot find module (SNMPv2-SMI-v1): At line 10 in
> /usr/local/share/snmp/mibs/CISCO-SMI-V1SMI.txt
> Did not find 'enterprises' in module #-1
> (/usr/local/share/snmp/mibs/CISCO-SMI-V1SMI.txt)
> Unlinked OID in CISCO-SMI: cisco ::= { enterprises 9 }
> Undefined identifier: enterprises near line 12 of
> /usr/local/share/snmp/mibs/CISCO-SMI-V1SMI.txt
> Error in packet
> Reason: (noSuchName) There is no such variable name in this MIB.
> Failed object: SNMPv2-SMI::enterprises
>
> But, If I run following snmpwalk command I receive some (few) information:
> #> snmpwalk -v 1 -c public 10.212.0.240
> SNMPv2-MIB::sysDescr.0 = STRING: Cisco PIX Firewall Version 6.3(4)
>
> SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.9.1.390
> SNMPv2-MIB::sysUpTime.0 = Timeticks: (140713600) 16 days, 6:52:16.00
> SNMPv2-MIB::sysContact.0 = STRING:
> SNMPv2-MIB::sysName.0 = STRING: firewall-vpn.my.org
> SNMPv2-MIB::sysLocation.0 = STRING:
> SNMPv2-MIB::sysServices.0 = INTEGER: 4
> IF-MIB::ifNumber.0 = INTEGER: 2
> IF-MIB::ifIndex.1 = INTEGER: 1
> IF-MIB::ifIndex.2 = INTEGER: 2
> .................
>
> May anyone explain me where is my fault?
>
> Regards
>
> M.Borsani
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> 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
>

-- 



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
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