Monitoring multiple SNMP agents behind a single IP address (without Minion)



We have multiple SNMP agents bound to different ports on a single IP address
and we want to monitor these as separate nodes in OpenNMS.


The SNMP configuration is currently bound to the IP address and location, so we cannot reliably use different ports on the same IP address.


Configure the nodes in OpenNMS using different IP addresses and route the traffic from these
IP address to the actualy SNMP agents.

On the OpenNMS system, create a new tap interface, and add the IP addresses that we will associate with the nodes:

ip tuntap add dev tap0 mode tap
ip addr add dev tap0

Now, use socat to bind to port 161 on that address, and forward the SNMP traffic to the real agent:

socat udp-listen:161,fork,bind=


snmpwalk -On -c public -v 2c .

Configure the SNMP settings in OpenNMS for and provision a node with this IP as it’s primary SNMP address.