This article describes how to list all VPN tunnels using SNMP and monitor the status of individual tunnels.
This shows all VPN tunnel names and their corresponding OIDs to then be able to monitor:
snmpwalk -v2c -c string_here 198.18.254.1 1.3.6.1.4.1.12356.101.12.2.2.1.3
This will monitor one of the VPNs determined from the first output:
snmpwalk -v2c -c Hotlips1 198.18.254.1 1.3.6.1.4.1.12356.101.12.2.2.1.3.2.1
For Interface Monitoring, you’ll need to retrieve the SNMP index number matching the actual interface you want to monitor. Run these commands to see the index numbers and match with the interface:
“config system interface”
“show”
Then take the index number and use this base OID:
.1.3.6.1.2.1.2.2.1.8
That will show all of them, pick the interface with the index you want to monitor.
For example, to monitor interface with index 6 use:
.1.3.6.1.2.1.2.2.1.8.6