- Install the net-snmp package ( Take from http://sourceforge.net/projects/net-snmp/files/net-snmp/188.8.131.52/ ). The installation requires Windows VS2017
By default, it will be installed on C:\usr\bin
- Go to C:\usr\bin
- Send the trap as below :
snmptrap -v2c -c public 10.112.77.188 42 184.108.40.206.220.127.116.11.5.1.0 sysName.0 s "MyHost" 18.104.22.168.4.1.1138.2.0 i 2
This is the v2 trap where:
a. public is the community of the trap.
b. 10.112.77.188 is the target IP where you are sending the trap ( It could be your local IP too if you have probe and net-snmp package installed on the same machine ).
This trap will have 4 variables.
To capture the trap, you must have the snmptd probe installed on the target IP with the SNMP service enabled.
Once you send the trap, you will receive it in your probe trap Monitor, create the profile and then you can test the probe just by playing around with the probe configuration & original trap variables.
Also attached to this article are scripts (batch and shell script ) that contain the trap commands you can use.
Another common Issue (not a probe bug):
Alarm with message text as "Alarm Message text is empty" is generated while dealing with trap variables.
One of the causes (there could be many):
When an incoming trap variable value matches one of the threshold rules defined in the probe but this rule does not have the message text.
a. You have 4 variables in the trap. And the 3rd variable has a value of MyHost?'
b. You have already configured the profile for this trap with one of the rules as (just a snapshot from the config file ):
var = 3
op = =
val = "MyHost"
sev = 2
order = 2
c. You can see that the msg field is empty
d. Now, when the trap comes, probe matches the 3rd variable value with the threshold value but it finds that the msg field is empty.
So, the probe sends the Alarm message with text as "Alarm message text is empty "with severity as defined in the Default tab.
***Define the message text for every rule***