Automic Workload Automation

Expand all | Collapse all

How can I get a daily report of what jobs ran?

  • 1.  How can I get a daily report of what jobs ran?

    Posted Jun 02, 2016 10:39 AM
    I would like to get a daily report of what jobs ran along with what hosts they were ran from. I was thinking of putting a Splunk forwarder on the Automic logs and doing a filed extraction to extract out the job names, but I'm wondering if there's a simpler way through Automic. 


  • 2.  How can I get a daily report of what jobs ran?

    Posted Jun 02, 2016 11:35 AM
    We use the products reporting utility UCYBDBRT.  There is a GUI interface that helps you build the XML report definition that is then used by UCYBDBRT to generate an extract in either HTML or CSV format.

    However I have a meeting later today to talk with our Splunk guy to see what it can bring to the table.


  • 3.  How can I get a daily report of what jobs ran?

    Posted Jun 02, 2016 02:59 PM
    I went the Splunk route since that seemed a little easier.. For anyone interested in what I did.. 

    1) Installed a Splunk forwarder on the Automation Engine server
    2) C:\Splunk\etc\system\local\inputs.conf and created a stanza to monitor 
    C:\Automic\V11\AutomationEngine\Temp\*.txt
    3) Created a field extraction via Regex 
    (?P<UC4_JobName>(?<=U\d{8}\s).*\'(?=\sactivated\swith\sRunID))
    4) index=automic | stats count by UC4_JobName

    This provides a nice daily report of what jobs ran 


  • 4.  How can I get a daily report of what jobs ran?

    Posted Jun 02, 2016 03:06 PM
    We are going to try letting Splunk read our AH table to extract our run data.


  • 5.  How can I get a daily report of what jobs ran?

    Posted Jun 08, 2016 03:19 AM
    Steve0 
    Is your Regex field extraction correct? I am trying to use the same one and it doesn't appear to work for me.

    This doesn't give me any results 

    index=automic | regex “(?P<UC4_Job>(?<=U\d{8}\s).*\'(?=\sactivated\swith\sRunID))”

    While this one does...

    index=automic | regex  "^(?:[^'\n]*'){3}(?P<RunID>\d+)"





  • 6.  How can I get a daily report of what jobs ran?

    Posted Jun 08, 2016 04:45 AM
    What about the following SQL:

    select
        ah_client AS "Client",
        ah_name AS "Object Name",
      ah_otype as 'Jobtype',
        ah_status AS "Status",
        ah_idnr AS "RunID",
      Ah_HOSTDST as 'Agent',
        AH_TimeStamp2 as "Start Time",
        AH_TimeStamp4 as "End Time" 
                       
        from ah WITH(NOLOCK)

        where AH_TimeStamp2 >= '2016-06-07 00:00:00.0'
            and AH_TimeStamp2 <= '2016-06-07 23:59:59.9'
            and ah_otype in ('JOBS','JOBP')
            and ah_client = '22'
    order by 1,4,2 desc;




  • 7.  How can I get a daily report of what jobs ran?

    Posted Jun 08, 2016 04:53 AM

    FrankMuffke

    Say I create a SQL JOBS/VARA with the query above, what's the easiest way of getting the results of the SQL query sent to a user as an attachment?




  • 8.  How can I get a daily report of what jobs ran?

    Posted Jun 08, 2016 03:17 PM
    my first attemt would be a SQL Job with activate_uc_object(CALL_Object) in Postscript.
    In the call object you can specify the Run# which has to be passed from SQL job to call object.

    Plan B a  VARA.SQL and a bit scripting (prep_process_var) in combination with send_mail.

    Plan A and B not tested myself so far, but at least plan A should be no big thing...




  • 9.  How can I get a daily report of what jobs ran?

    Posted Jun 09, 2016 04:42 AM

    Yes, Plan A works alright, but it attached all Reports (ACT, PLOG,POST,REP)

    Is there any way of only attaching the REP?



  • 10.  How can I get a daily report of what jobs ran?

    Posted Jun 09, 2016 07:38 AM
    No :-(


  • 11.  How can I get a daily report of what jobs ran?

    Posted Jun 09, 2016 11:40 AM
    I thought that a while back someone posted sample code of how to run a UC4 utility that extracts the REP report into a flat file, which you could then attach.   I can't seem to find that post now...


  • 12.  How can I get a daily report of what jobs ran?

    Posted Jun 13, 2016 11:21 AM

    I was able to only get the data I need but it took a bit of scripting to get it.

    I used a SQL Job and then in the post process used the following code to save to file and then attach this file to Notification

     

    :SET &HOST# = GET_VAR(GLOBAL.LOCAL_HOST,HOST,1)
    :SET &FILE_DIR# = "/mis/wla&ENV#_datasets/logs/"

    :SET &HND# = CREATE_PROCESS(NEW)
    :    SET &HND2# = PREP_PROCESS_REPORT(JOBS, , REP, ,"COL=DELIMITER", "DELIMITER=*;*")
    :         PROCESS &HND2#
    :         SET &JOB#=GET_PROCESS_LINE(&HND2#, 1)
    :         SET &STATUS# = GET_PROCESS_LINE(&HND2#, 2)
    :         SET &LINE# = "&JOB#;&STATUS#;"
    :         SET &RET# = PUT_PROCESS_LINE(&HND#, &LINE#, ",")
    :    ENDPROCESS
    :    CLOSE_PROCESS &HND2#

    :SET &RET# = WRITE_PROCESS(&HND#,"&FILE_DIR#do_backup_summary.txt","&HOST#",WLAMON.LOGIN,OVERWRITE)

    :   PSET &OUTPUT_FILE# = "&FILE_DIR#do_backup_summary.txt"

    :  SET &RET# = ACTIVATE_UC_OBJECT(DBA.BACKUP_SUMMARY_NOTIFICATION, , , , , PASS_VALUES)

    :CLOSE_PROCESS &HND#