Query SNMP Hosts using MIBs

Video Lecture

Query SNMP Hosts using MIBs Query SNMP Hosts using MIBs

Description

Querying SNMP agents with MID description is likely to fail by default.

The example below will fail if no MIB descriptions are installed on the server executing the snmpwalk command,

1
snmpwalk -v 2c -c mycommunity grafana.seanwasere.com IF-MIB::ifInOctets.1
1
2
--> Cannot find module (IF-MIB)
--> IF_MIB::ifInOctets.1: Unknown Object Identifier

We can enable querying by MIB descriptions by running this command on the Zabbix server itself.

1
sudo apt install snmp-mibs-downloader

Now this command will work

1
snmpwalk -v 2c -c mycommunity grafana.seanwasere.com IF-MIB::ifInOctets.1
1
--> IF-MIB::ifInOctets.1 = Counter32: 566637161

I then restart the Zabbix server process.

1
sudo service zabbix-server restart

and update my items for the host in Zabbix, to query using MIB descriptions instead of OIDs.

OID inOctets for interface 1 = IF-MIB::ifInOctets.1 (was 1.3.6.1.2.1.2.2.1.10.1)

OID outOctets for interface 1 = IF-MIB::ifInOctets.1 (1.3.6.1.2.1.2.2.1.16.1)