Skip to content

Query SNMP Hosts using MIBs

Video Lecture

Query SNMP Hosts using MIBs Query SNMP Hosts using MIBs

 (Pay Per View)

You can use PayPal to purchase a one time viewing of this video for $1.49 USD.

Pay Per View Terms

  • One viewing session of this video will cost the equivalent of $1.49 USD in your currency.
  • After successful purchase, the video will automatically start playing.
  • You can pause, replay and go fullscreen as many times as needed in one single session for up to an hour.
  • Do not refresh the browser since it will invalidate the session.
  • If you want longer-term access to all videos, consider purchasing full access through Udemy or YouTube Memberships instead.
  • This Pay Per View option does not permit downloading this video for later viewing or sharing.
  • All videos are Copyright © 2019-2025 Sean Bradley, all rights reserved.

Description

Querying SNMP agents with MIB descriptions is likely to fail by default when queried via a Zabbix server SNMP agent item.

It will also fail when trying from the command line using the snmpget command,

snmpget -v2c -cmycommunity grafana.seanwasere.com IF-MIB::ifInOctets.1
--> 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.

sudo apt install snmp-mibs-downloader

Now this command will work

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

I then restart the Zabbix server process.

sudo service zabbix-server restart

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

interface in octets ⇾ OID = IF-MIB::ifInOctets.1 (oid = 1.3.6.1.2.1.2.2.1.10.1)

interface out octets ⇾ OID = IF-MIB::ifOutOctets.1 (oid = 1.3.6.1.2.1.2.2.1.16.1)

MIBs