How to manually generate traps via Windows and to test the snmptd probes Variables section functionality

Document ID : KB000057331
Last Modified Date : 14/11/2018
Show Technical Document Details
Introduction:

Procedure on how to manually generate snmp traps via Windows and to test the CA UIM snmptd probe Variables section functionality:




 

 

Environment:
UIM 8.5x
snmptd 3.x
Instructions:
  1. Install the net-snmp package ( Take from http://sourceforge.net/projects/net-snmp/files/net-snmp/5.6.2.1/  ). By default, it will be installed on C:\usr\bin
  2. Go to C:\usr\bin
  3. Send the trap as below :
    snmptrap -v2c -c public 10.112.77.188 42 1.3.6.1.6.3.1.1.5.1.0 sysName.0 s "MyHost" 1.3.6.1.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 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.
For example:

     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
   oid =
   op = =
   val = "MyHost"
   sev = 2
   msg =
    i18n_token =
   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
File Attachments:
TEC000004433.zip