Generating a SNMP Trap from PingPlotter or MultiPing
Is there any way to generate a SNMP Trap message using the PingPlotter alert system?
Note regarding PingPlotter: The following instructions currently apply to versions 4.12.0 and older.
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 numerous command line utilities available that can generate an SNMP trap message, one free example of this is available at https://www.snmpsoft.com/cmd-tools/snmp-trap-gen/. This utility will allow you to generate an SNMP trap using the PingPlotter or MultiPing alert system.
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 18.104.22.168 STRING "$host - Alert Started"
- 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 condition ending.
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).