Short tip: Install missing SNMP MIBs under Debian Linux

Leveraging SNMP is often a pain when appropriate MIB files (Management Information Base) are missing - e.g. because the manufacturer did not document them or only offer them at fee. When utilizing a Perl program recently, I stumbled upon the following issue:

Cannot find module (SNMPv2-SMI):

After ensuring that missing Perl SNMP packages are not the reason for this error, I discovered the "snmp-mibs-downloader" package. This utility downloads missing SNMP MIBs and places them in the appropriate folders. The package is part of the non-free repository that might be needed to enabled first:

 1# vi /etc/apt/sources.list
 2...
 3deb http://deb.debian.org/debian stretch main contrib non-free
 4deb-src http://deb.debian.org/debian stretch main contrib non-free
 5
 6deb http://security.debian.org/debian-security/ stretch/updates main contrib non-free
 7deb-src http://security.debian.org/debian-security/ stretch/updates main contrib non-free
 8
 9deb http://deb.debian.org/debian stretch-updates main contrib non-free
10deb-src http://deb.debian.org/debian stretch-updates main contrib non-free
11
12ESC ZZ
13
14# apt-get update

Downloading the MIBs is taking place right after the package installation - but it is also possible to start this process manually by starting the download-mibs command:

 1# apt-get install snmp-mibs-downloader
 2...
 3Downloading documents and extracting MIB files.
 4This will take some minutes.
 5
 6In case this process fails, it can always be repeated later by executing
 7/usr/bin/download-mibs again.
 8
 9RFC1155-SMI: 119 lines.
10RFC1213-MIB: 2613 lines.
11...

Afterwards, the Perl program was working fine. 🙂

Translations: