4

Is there a way to add arbitrary path (e.g. /usr/share/mibs/cisco) to MIB search path?

This is in Ubuntu 12.04.4 LTS.

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
joystick
  • 111
  • 1
  • 1
  • 6

2 Answers2

4

Came out very simple, thanks to rstory-work at #net-snmp irc channel:

Just add the line

mibdirs +/usr/share/mibs/cisco

to /etc/snmp/snmp.conf.

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
joystick
  • 111
  • 1
  • 1
  • 6
  • using the +/- notation in `/etc/snmp/snmp.conf` will just confuse the MIB search path. See my answer below on where this can be used. – Gus E Feb 12 '15 at 18:33
1

Per the snmp_config man page you should add the line mibdirs -/usr/share/mibs/cisco to one of the paths below:

~/.snmp/snmp.conf
/usr/share/snmp/snmp.conf

Use the home directory path if you only want a single user to have access.

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
Gus E
  • 1,716
  • 11
  • 21