Skip to content

Set up a Network Discovery Rule and Action to Auto Configure SNMP Devices

Video Lecture

Set up a Network Discovery Rule and Action to Auto Configure SNMP Devices Set up a Network Discovery Rule and Action to Auto Configure SNMP Devices

 (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

I set up Network Discovery Rule to find SNMP devices on my local network and then add them as a host using a Discovery Action

On my network, I have a TP-Link SNMP router and Cisco Switch.

They will both be discovered, and I will auto assign the Generic SNMP template.

I will use my Raspberry Pi, which is configured as my Zabbix proxy, to scan the local network for any SNMP devices listening on port 161.

I have preconfigured both my SNMP devices to use the mycommunity community and are sure that they respond to SNMP requests.

From my Raspberry Pi, I have pre-installed the SNMP tools,

sudo apt install snmp

and can use snmpget to test both devices respond with the system description.

snmpget -v2c -cmycommunity <hostname or ip> 1.3.6.1.2.1.1.1.0

To begin configuration in Zabbix,

I create a new Discovery Rule,

  • Name : SNMP Discovery
  • Discovery by proxy : RaspberryPi
  • IP Range : 192.168.1.0/24
  • Checks :
    • Check Type : SNMPv2 agent
    • Port Range : 161
    • SNMP Community : mycommunity
    • OID : 1.3.6.1.2.1.1.1.0
  • Device Uniqueness : IP Address
  • Host name : DNS Address
  • Visible Name : Host name

Then I create a Discovery Action to add each SNMP host

  • Name : Add SNMP Host
  • Conditions:
    • Discovery rule equals SNMP Discovery
  • Operations:
    • Add to host groups: Templates/Network Devices
    • Link to templates: Generic SNMP

TCPDump

If you want, you can watch the scan progress from the Zabbix proxy by using the TCPDump command.

You may need to install TCPDump first.

sudo apt install tcpdump

The TCPDump command to watch the SNMP requests from the Zabbix proxy is

sudo tcpdump -n -s0  port 161 and udp

The scan progress can be quite slow and unpredictable when it will start/finish. Leave it running and come back in 24 hours.

Once I am happy that all the SNMP devices have been discovered and added, I then disable the Discovery rule so that I don't get any duplicate hosts added due to me changing the host names in the Zabbix UI configuration.

Configuring a network discovery rule