Generating an SNMP Trap from PingPlotter or MultiPing
|
| ID: |
 |
000031 |
| Rating: |
 |
4.6 / 5.0 (10 votes)
|
| Views: |
 |
7052 |
|
Is there any way to generate a 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 numerous command line utilities available that can generate an SNMP trap message, one free example of this is available at Network Computing Technologies. This utility (listed on the download page as "Trap Generator") 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 TrapGen program from NComTech.com and PingPlotter. MultiPing will work very similarly, however.
- Download the TrapGen 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:
c:\tools\snmp\TrapGen.exe -d localhost -v 1.2.3.4 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.
Now, tie that event to a target of your choice and test it.
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).