Sending SNMP Traps
SNMP traps report the status of processes to network monitoring solutions.
Sending a Trap with a Chain Definition
This example shows how to send an SMNP trap from a Chain Definition.
- Navigate to Definitions > Chains.
- Click
.
- Select the leftmost Chain icon in the diagram and enter
JC_SendTrap
in the Name field. - Select the name of
Step 1
in the diagram and enterRetrieve System Info
in the Name field. - Select the Step and choose System_Info in the Process Definition field.
- Add a second Step after the first and name it
Send Trap On Error
. - Select the Step and choose System_SNMP_SendTrap in the Process Definition field.
-
With the Step still selected, expand Parameter Mappings on the right and enter the following values into the fields.
Field Value Host The host for your network monitoring tool. For example:
snmp.example.com
Port The port for your network monitoring tool. For example: 162
Community PUBLIC
ID =jobId
Data ='The chain process '+jobId+' failed, upper-most chain ID is:'+topLevelJobId
- Add a status handler after the first Step, then choose Go to > Go to Send Trap on Error for statuses Canceled, Error, and Killed.
- For the same status handler, choose Go to > Go to end of chain > Mark chain Completed for status Completed.
- Click Save & Close.
To test this Chain definition, do this:
- Submit the Chain Definition JC_SendTrap.
- On the Times and Dates screen, click Once, and set the Start field to five minutes in the future.
- Click Submit.
- Right-click the Chain Definition and choose Monitor Related Processes from the context menu.
- Fully expand the Chain Definition.
- Cancel the Generate an overview of the system Chain Process.
- Wait for the Chain to finish executing.
- Use your network monitoring solution to inspect the trap.