On Tue, Mar 19, 2013 at 4:22 PM, <[email protected]> wrote:

> >>>>> "DaZZa" == DaZZa  <[email protected]> writes:
>
> DaZZa> Folks.  I've got a monitoring server (CentOS 5.9) that I want
> DaZZa> to add some vendor-specific MIB's to for SNMP to use.
>
> DaZZa> I've put the MIB's in /usr/share/snmp/mibs (which is where all
> DaZZa> the default ones are located) and modified (created)
> DaZZa> /etc/snmp/snmp.conf) to include the new MIB names, however I
> DaZZa> don't seem to be able to get snmpwalk (or net:snmp) to use
> DaZZa> them.
>
>
> snmpwalk uses the MIBS from the remote host IIRC.  Are you wanting to
> see things on the host you installed the new config on, or somewhere
> else?
>

I'm not sure about using the remote hosts MIBs, I think the snmp protocol
is all numbers, and the client uses the MIBs to map numbers to names,
like DNS. But, it's been 5 years since I played with snmp, so I'm in no
way saying you're wrong and I'm right, I'm just offering what I remember.

       -m MIBLIST
              Specifies a colon separated list of MIB modules (not files)
to load for this application.   This  over‐
              rides  (or  augments) the environment variable MIBS, the
snmp.conf directive mibs, and the list of MIBs
              hardcoded into the Net-SNMP library.

              If MIBLIST has a leading '-' or '+' character, then the MIB
modules listed are loaded  in  addition  to
              the  default  list,  coming  before or after this list
respectively.  Otherwise, the specified MIBs are
              loaded instead of this default list.

              The special keyword ALL is used to load all MIB modules in
the MIB directory search list.   Every  file
              whose name does not begin with "." will be parsed as if it
were a MIB file.

       -M DIRLIST
              Specifies  a  colon separated list of directories to search
for MIBs.  This overrides (or augments) the
              environment variable MIBDIRS, the snmp.conf directive
mibdirs, and the default directory hardcoded into
              the Net-SNMP library (/usr/share/snmp/mibs).

              If  DIRLIST  has  a  leading  '-' or '+' character, then the
given directories are added to the default
              list, being searched before or after the directories on this
list respectively.  Otherwise, the  speci‐
              fied directories are searched instead of this default list.

              Note that the directories appearing later in the list have
have precedence over earlier ones.  To avoid
              searching any MIB directories, set the MIBDIRS environment
variable to the empty string ("").

              Note that MIBs specified using the -m option or the mibs
configuration directive will  be  loaded  from
              one  of  the  directories listed by the -M option (or
equivalents).  The mibfile directive takes a full
              path to the specified MIB file, so this does not need to be
in the MIB directory search list.

Use those options above, and if it works, then you might have a typo in the
snmp config file, or maybe it's in the wrong location.
strace -o /tmp/snmpwalk.out snmpwalk blah to see what config file it's
trying to open.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to