Looking for information on ended lost

Discussion created by Malik_Abdul_8942 on Aug 29, 2017


When a server reboots while running an Automic job, UC4 client 0 will run an object described in UC_HOSTCHAR_DEFAULT -> EXECUTE_ON_LOST. While the event is nice the information passed using the UC_CAUSE_CODE does not contain enough information to give intelligent information. 
I have found in system overview message U0011022 at the same time as the LOST event has all the information I need to automate and route notification. Is there a way to script for this information or do I need to do a SQL query to the UC4 database? or are there other solutions? 

Sample of the information desired; (Object name and RUNID) 
U0011022 Client '0100': The status of 'JOBS.I.PICKBKLOG.UNX.WMS' ('0008462135') is undefined because host 'GSA1220X' aborted prematurely or was canceled.


Create a script object 

!Get's count of Jobs that ended in FAULT_OTHER in the past 5 mins


!If count is greater than 1

:If &fault# > 0


:   process &name#

:      set &runid#=GET_PROCESS_LINE(&name#,1)

:      print "&runid#"

:   endprocess

:p "--------------------------------------------"

:p "Number of FAULT_OTHER jobs: &fault#"

:p "--------------------------------------------"

!Activates a Notification and attached Report to Mail with the list of jobs

:  set &call#=activate_uc_object(CALL.FAULT)


Create a SQL object


select AH_Idnr, OH_Name, AH_Client from AH join OH on (AH.AH_OH_Idnr=OH.OH_Idnr) where AH_Status=1815 and AH_TimeStamp3 > (select DATEADD([minute],-5, (select getutcdate())))

For Oracle

select AH_Idnr, OH_Name, AH_TimeStamp4, AH_Client from AH, OH where AH.AH_OH_Idnr=OH.OH_Idnr and AH_Status=1815 and cast(AH_TimeStamp4 as timestamp) > sys_extract_utc(cast(sysdate-(5/1440) as timestamp))

Finally use the standard notification object to send out email