Simple Network Management Protocol (SNMP) is an Internet-standard protocol for managing devices on IP networks. net-snmp is the main SNMP implementation for Linux and BSD platforms. On Ubuntu or Debian net-snmp tools are installed as follows:
$ sudo apt-get install snmp
You can also install snmpd package. This package contains the SNMP agent.
Installing MIBs
For licensing reasons, net-snmp package installs only a small number of MIBs in /usr/share/mibs directory. A large number of standard MIBs can be installed using snmp-mibs-downloader package:
$ sudo apt-get install snmp-mibs-downloader $ sudo download-mibs
To have the new MIBs recognized by net-snmp, edit /etc/snmp/snmp.conf file as follows:
$ cat /etc/snmp/snmp.conf mibs +ALL $
You can use snmptranslate to check the MIBs have been properly installed by printing the MIB tree:
$ snmptranslate -Tp +--iso(1) | +--org(3) | +--dod(6) | +--internet(1) | +--directory(1) | +--mgmt(2) | | | +--mib-2(1) | | | +--system(1) | | | | | +-- -R-- String sysDescr(1) | | | Textual Convention: DisplayString | | | Size: 0..255 ...
Adding additional MIBs
To install additional MIBs you would need to create first a local ~/.snmp/mibs directory:
$ cd ~ $ mkdir -p .snmp/mibs
Drop any additional MIB files you might have in this directory. To install CISCO MIBs, download v2.tar.gz file from ftp://ftp.cisco.com (the file is located in pub/mibs/v2/), and move all the *.my files in the archive in ~/.snmp/mibs directory.
Installing a MIB browser
qtmib is a MIB browser program, that allows you to connect to any SNMP-enabled device and browse the MIBs. The graphical user interface is build using QT4 library. The program comes with a large number of MIBs pre-installed, anything from Cisco’s and Juniper’s to HP’s and Dell’s. You can also install your own MIBs by copying them into ~/.config/qtmib/mibs directory.
For Ubuntu users, the development team makes available a deb package. Download and install it as:
$ sudo dpkg -i qmib_X.Y.Z_1_amd64.ubuntu.deb
Start the program from the command line as qtmib or from your desktop environment menus. Once started, go into File/Preferences and configure the IP address and community string. Retrieve the data from your device, and click Translate to translate the OIDs in the result window.
Related Posts
Pingback: Installing net-snmp MIBs on Ubuntu and Debian | Hallow Demon
Pingback: Links 3/12/2013: Applications and Instructionals | Techrights
Hi,
I’ve just like to add those two links that complement your post. The first one is about using download-mibs to fetch Cisco Mibs automatically. The second one is about fixing some errors with mibs that have issues on Ubuntu/Debian. With your post and the other two I was able to fix my environment.
http://x123.net/howto-cisco-mibs-ubuntu.html
http://www.torrycrass.com/2012/06/13/debian-missing-mibs-for-snmp/
Thank you for your post. It was the starting point of the solution.
Thanks for the links!
Pingback: Interface Web Ftp Ubuntu | Technology Documents
Reblogged this on yakmmc and commented:
useful
Reblogged this on yakmmc and commented:
useful
Great this really helped me to get Zabbix network discovery via SNMP working.
I find the “snmp-mibs-downloader” for Ubuntu Trusty (14.04) from launchpad [^1], it can work after install the smistrip package.
$ sudo aptitude install smistrip
$ sudo dpkg -i snmp-mibs-downloader_1.1_all.deb
—-
[^1]: snmp-mibs-downloader : amd64 : Trusty (14.04) : Ubuntu – https://launchpad.net/ubuntu/trusty/amd64/snmp-mibs-downloader/1.1
Pingback: How To Install Nagios Core 4.1.1 in Debian Jessie Part 3 – La Plata Linux Blog
Pingback: Debian How To Install Snmp | Teethzo3
Your tutorial helped me a lot.
After finishing reading your tutorial I created one by myself teaching how to install and configure Asterisk snmp feature:
https://techexpert.tips/asterisk/asterisk-snmp-configuration/
Thanks again,
Pingback: Create Zabbix Host Items from MIB – LUKKY.US
Pingback: | オールトの雲
Great article!