Jeremy_Clere_7804

SNMP Trap

Discussion created by Jeremy_Clere_7804 on Jul 28, 2016
Hello,
Can I build a job that listen to an SNMP Trap from a third party system, and reacts according to it?


You will find general guide for this type of agent:
http://docs.automic.com/documentation/AE/9.13/english/AE_WEBHELP/uc4.htm#ucaakq.htm%3FTocPath%3DKnowledge%2520Base%7CSNMP%2520Support%7C_____2

But UC4 does not support a direct connection of Jobs to SNMP, but the script statement :SEND_SNMP_TRAP can be used to monitor Jobs.

Example:

:SET &NAME# = SYS_ACT_ME_NAME()
:SET &ID# = SYS_ACT_ME_NR()
:SET &JPNAME# = SYS_ACT_PARENT_NAME()
:SET &CLIENT# = SYS_ACT_CLIENT()
:SET &STATUS# = GET_UC_OBJECT_STATUS()

:IF &STATUS# < "1900"
: PRINT &STATUS#
: PRINT "Client: &CLIENT#, JOBNAME: &NAME#"
: PRINT &NAME#
: SEND_SNMP_TRAP 801450, "&CLIENT#", "&NAME#",, "Problems in processing!"
:ENIDF

The script function GET_UC_OBJECT_STATUS can be used to find out the Job's end status and react to it accordingly. This solution can be implemented in the direct form of a script or in a reusable form as an Include object.


Outcomes