3 MIB files

    Introduction

    For example,

    is textual representation of OID

    You can use either, when monitoring SNMP devices with Zabbix, but if you feel more comfortable when using textual representation you have to install MIB files.

    Installing MIB files

    On Debian-based systems:

    1. # download-mibs

    On RedHat-based systems:

    Enabling MIB files

    1. # As the snmp packages come without MIB files due to license reasons, loading
    2. # loading them by commenting out the following line.
    3. #mibs :

    Testing MIB files

    Testing snmp MIBs can be done using snmpwalk utility. If you don’t have it installed, use the following instructions.

    On Debian-based systems:

    1. # apt install snmp

    On RedHat-based systems:

    After that, the following command must not give error when you query a network device:

    1. $ snmpwalk -v 2c -c public <NETWORK DEVICE IP> ifInOctets
    2. IF-MIB::ifInOctets.2 = Counter32: 0
    3. IF-MIB::ifInOctets.3 = Counter32: 240375057
    4. IF-MIB::ifInOctets.4 = Counter32: 220893420
    5. [...]

    Using MIBs in Zabbix

    The most important to keep in mind is that Zabbix processes do not get informed of the changes made to MIB files. So after every change you must restart Zabbix server or proxy, e. g.:

    1. # service zabbix-server restart

    Using custom MIB files

    There are standard MIB files coming with every GNU/Linux distribution. But some device vendors provide their own.

    Let’s say, you would like to use CISCO-SMI MIB file. The following instructions will download and install it:

    Now you should be able to use it. Try to translate the name of the object ciscoProducts from the MIB file to OID:

    1. .1.3.6.1.4.1.9.1

    If you receive errors instead of the OID, ensure all the previous commands did not return any errors.

    The object name translation worked, you are ready to use custom MIB file. Note the MIB name prefix (CISCO-SMI::) used in the query. You will need this when using command-line tools as well as Zabbix.

    Keep in mind that MIB files can have dependencies. That is, one MIB may require another. In order to satisfy these dependencies you have to install all the affected MIB files.