This is the v2 trap where:
- Install the net-snmp package ( Take from http://sourceforge.net/projects/net-snmp/files/net-snmp/22.214.171.124/ ). 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 126.96.36.199.188.8.131.52.5.1.0 sysName.0 s "MyHost" 184.108.40.206.4.1.1138.2.0 i 2
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 scripts (batch and shell script ) which 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 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 val 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.
Resolution : Define the message text for every rule