Automic Workload Automation

 View Only
  • 1.  send job log as email notification attachment

    Posted Nov 22, 2016 04:38 PM
    I would like to send an external log file as an attachment when the job fails. Here is the path i have set on the output tab "/var/log/hdp/one.log". Also authorization P is set for the user and notification tab on email notification is set to "external files", still don't get the the external one.log file as an attachment. Email notification works  for types "ACT" and "REP".



  • 2.  send job log as email notification attachment

    Posted Nov 23, 2016 04:29 AM
    if this is a log which is generated by the job JCL this is not counted as report for this task, if you want to send an external file within the notification you trigger, you have to put the path to the "Attach file from AutomationEngine" - field, but please be aware that the file needs to be located either on the Automation Engine - Machine or the users which are running the WP processes have to have access to the file.

    A possible way would be the following: Put the Job you are executing to a workflow, add also a JOBF to the Workflow which transfers the one.log file to the Automation Engine machine and then trigger the notification Object with a path leading to the AE machine.

    EDIT: further information about Notification Object and how it works under V9 (thats the version you mentioned in tag) please find here:

    https://docs.automic.com/documentation/webhelp/english/ALL/components/AE/9.13/All%20Guides/help.htm#ucacox.htm%3FTocPath%3DBenutzerhandbuch%7CObjekte%7CAlphabetische%2520Auflistung%7CBenachrichtigung%7C_____6

    In Version 10 and 11 there are more comfortable ways to use SEND_MAIL with a specific agent, this would make the thing easier to archive.


  • 3.  send job log as email notification attachment

    Posted Nov 23, 2016 08:18 AM
    Actually, the issue was with one of our SMTP servers blocking attachments with external files. I see it working now, but the only issue i have with external files is html content is not rendered on the emails, 



  • 4.  send job log as email notification attachment

    Posted Nov 23, 2016 08:24 AM
    Do you have an example?


  • 5.  send job log as email notification attachment

    Posted Nov 23, 2016 08:45 AM
    Sure, the first screenshot shows database files sent as email attachments.The second screenshot is an example of emails with external files as attachments, html is not rendered here . You many not see the attachment since i don't have access to our log mount point yet. The HTML is defined on the notification tab of the email notification object.oljk6i8hsqk2.pnghttps://us.v-cdn.net/5019921/uploads/editor/6z/oljk6i8hsqk2.png" width="1347">5gcdd3b0t886.png


  • 6.  send job log as email notification attachment

    Posted Nov 28, 2016 03:48 PM
    Can someone look into this?


  • 7.  send job log as email notification attachment
    Best Answer

    Posted Nov 28, 2016 05:29 PM
    I think we may have had this same symptom with V9.SP5 of the UC4 product.  It was a known product defect that occurred when our NOTIFY objects asked a Windows agent to send an email with the appropriate registered report attachments.  The solution was to upgrade.


  • 8.  send job log as email notification attachment

    Posted Nov 29, 2016 02:58 AM

    There is an easy way too do that. I’ve created an example to make it easier to explain. I’ve tested it in a v12 environment and it worked well. So far as I know this feature is not available in v9, hopefully you have the option to go to the latest version soon. 
    Please have a look:

    1) Add the external file at the “Output” tab of the job:

    aw8krkxr8flo.pnghttps://us.v-cdn.net/5019921/uploads/editor/s4/aw8krkxr8flo.png" width="542"> 

     

    2) Set the variable “&UC_CAUSE_NR#” to the current RunID in the process tab and let the job fail, for test reason I uses “exit 1”:

     4ce7567babku.pnghttps://us.v-cdn.net/5019921/uploads/editor/k0/4ce7567babku.png" width="595">

     

    3) Define the notification object – which sends the external file – in the “Runtime” tab of the job. It will be executed whenever the jobs ends with a return code greater than zero:

     zn7ptzj13shc.pnghttps://us.v-cdn.net/5019921/uploads/editor/e2/zn7ptzj13shc.png" width="561">

     

    4) Make sure that the “&UC_CAUSE_NR#” variable is specified in the notification object and “Externals files” is selected:

     baf1v0vh78e0.pnghttps://us.v-cdn.net/5019921/uploads/editor/qq/baf1v0vh78e0.png" width="621">

     

     

    Please find the example object attached to this post as well.

    Hope that helps.

     

    KR, Josef

     

     

    Attachment(s)

    xml
    uc4_export_CALL.xml   2 KB 1 version
    xml
    uc4_export_JOBS.xml   3 KB 1 version


  • 9.  send job log as email notification attachment

    Posted Nov 29, 2016 11:53 AM
    Josef_Scharl_103
    We were using the exact technique you prescribed, but the email that had the external files attached to it was not delivered as an HTML email, but as a plain text email with raw HTML code for the body.   This was a UC4 bug in early versions of V9.  When we upgraded, the problem went away.  


  • 10.  send job log as email notification attachment

    Posted Nov 29, 2016 03:14 PM
    Which version of Uc4 should i upgrade to , inorder to make sure this works end to end ?


  • 11.  send job log as email notification attachment

    Posted Nov 30, 2016 11:52 AM
    For questions like that, I usually call their support staff who can more thoroughly research it for you.  I've tried to find my old support calls on this problem, but I think it pre-dated the current call system and I can't find it.  In my case the problem was in 2013, or three years ago.