Generating a SNMP Trap from PingPlotter or MultiPing
Is there any way to generate an SNMP Trap message using the PingPlotter alert system?
Neither PingPlotter or MultiPing have the ability to natively generate an SNMP Trap message, but both programs have the ability to launch an external executable which can do this.
There are other utilities available, but for this example, we will be using the SnmpTrapGen program linked above and PingPlotter. MultiPing will work very similarly, however.
- Download the SnmpTrapGen utility (or ascertain the location and usage model of the utility of your choice).
- Extract the utility to a working directory. We will, for this example, be extracting to c:\tools\snmp. If this isn't your location, please adjust these instructions accordingly.
- Determine the IP Address and Port of your receiving SNMP agent/server.
- Create a new alert in PingPlotter. Set up the conditions you want to apply (see our tutorial for more information about alert setup).
- Set an event for "Launch an executable". Set it to notify "when alert conditions start (enters alert state)."
- Set the command to:
- Set the parameters to:
-d localhost -v 220.127.116.11 STRING "$host - Alert Started"
- Or something like this (example IPs):
-r:192.168.1.108 -v:2 -to:192.168.1.117
- Replace the -d parameter with your server. If your server port is not 162, then add the -p parameter to set your port.
- Change the -v to an event identifier you will use for PingPlotter. NOTE: You can also use a different type (i.e. INTEGER, COUNTER would be other common strings you may use) in place of STRING in the above example with an appropriate value for that TYPE of course.
- Change the message if required.
- Add another event with similar settings to notify "when alert conditions end". Change the string to match the
If you have something other than the normal (for most devices or systems) default Community Name of "public" setup for security reasons, you will have to specify it with "-c communityName" (without the quotes).