Automic Workload Automation

  • 1.  Is there a way to search all job reports for specific error messages?

    Posted May 02, 2019 05:30 PM

    Is there a way to search all job reports for specific error messages? We would like to find all job reports containing specific error messages that do not abort the job but may affect processing. If we can find all job reports containing an error message we will resolve the error and add it to our error-check include so in future runs of the jobs abort in post processing. We reviewed System Overview > Messages, it does not have search options within job reports. We reviewed help and found functions that retrieve information from a single job report only. Is there an Automic function or utility that can do this? If not, a SQL query? Thank you.



  • 2.  Re: Is there a way to search all job reports for specific error messages?

    Posted May 03, 2019 07:16 AM

    Hi

     

    is there a corrsponding RETcode within the OS job?

     

    This would make search much easier as you could filter on ah_retcode in ah table...

    Beware its rather big, so there should be a date-clause ...

     

    cheers, Wolfgang



  • 3.  Re: Is there a way to search all job reports for specific error messages?

    Posted May 03, 2019 04:55 PM

    I use this SQLServer database query.  the report text is in the rh(report history) table.   The date range filters are currently configured to look at reports within the last 60 days, but I'd strongly suggest scanning for much smaller timeframes first, to see what type of database performance you get.  THIS QUERY CAN BE EXPENSIVE.

     

    It is currently configured to look for this error message:

    "SocketException: Connection reset"

     

     

     

    select
    oh_name
    , ah_idnr as runid
    , rt_type
    , dateadd(hour, datediff(hour, getutcdate(), getdate()), ah_timestamp2) as started
    , dateadd(hour, datediff(hour, getutcdate(), getdate()), ah_timestamp4) as ended
    --, rt_content
    --, rt_msginsert
    from uc4.dbo.rh
    , uc4.dbo.rt
    , uc4.dbo.ah
    , uc4.dbo.oh
    where rh_ah_idnr = rt_ah_idnr
    and rh_ah_idnr = ah_idnr
    and ah_oh_idnr = oh_idnr
    --and not oh_name = 'DC.UTIL.FILE.MOVE.RC0001' -- job name filter
    --and rt_type = 'REP'
    and rt_type = rh_type
    and rt_content like '%SocketException: Connection reset%' -- string to search for in the report
    --and rt_content like '%sqlcmd -I%'
    and dateadd(hour, datediff(hour, getutcdate(), getdate()), ah_timestamp2) < dateadd(day, -0, getdate()) -- job ran reciently
    and dateadd(hour, datediff(hour, getutcdate(), getdate()), ah_timestamp2) > dateadd(day, -60, getdate()) -- job ran reciently
    order by 5,1