Uploaded image for project: 'JS - JobScheduler'
  1. JS - JobScheduler
  2. JS-1837

Send e-mail notifications via JobScheduler Monitoring Interface

    XMLWordPrintable

Details

    Description

      Current Situation

      • JobScheduler Master can be configured to send mail in case of
        • job execution errors, warnings, success,
        • job executions that require more or less time than expected from an absolute value or from the past average duration,
        • problems detected by a JobScheduler Master, e.g. database connection lost.
      • Such mails are sent by the JobScheduler Master.
        • without layout consideration: mail format is text only.
        • without use of individual templates: mails include technical information only.

      Desired Behavior

      • The JobScheduler Monitoring Interface is used in order to replace JobScheduler Master mails:
        • Notifications can sent by a number of protocols: Mail, Java Message Queue, System Monitors and any command line utilities.
        • Notifications are created for job executions and for job chains executions.
      • Notifications are created for the following events:
        • job execution errors and success.
        • job executions that require more or less time than expected from an absolute value or from the past average duration, see JITL-522
        • problems detected by a JobScheduler Master, e.g. database connection lost.
      • Mail format is text only or HTML.
        • Mail templates are available for e-mail contents. Templates include placeholders for a vast number of variables, e.g. job name, job chain path, error code etc.
        • For improved layout of e-mail notifications any HTML editor can be used.

      Activating the JobScheduler Monitoring Interface

      Configuration item

      • param sos.use_notification in scheduler.xml
      • mail_queue_only in factory.ini section spooler
      • mail_queue_dir in factory.ini section spooler
      • mail_on_error in factory.ini section spooler
      • mail_on_warning in factory.ini section spooler
      • NotificationObjects in SystemMonitorNotification_MonitorSystem.xml
        • <MasterMessage/>
        • <TaskWarning/>
        • <TaskIfLongerThan/>
        • <TaskIfShorterThan/>
      • Configuration job chain /sos/sendMail/sendMail with file order source to the directory in {mail_queue_dir}

      E-Mail types

      • Task ended with error
      • Task ended with warning
      • JobScheduler status and warning messages
      • E-Mail when a task runs longer than x
      • E-Mail when a task runs shorter than x

      Defining the E-Mail sending

      • sos.use_notification: no
        • E-Mails will be send by JobScheduler Master or by job chain sendMail. Depends on mail_queue_only
      • sos.use_notification: yes
        • When E-Mails will be handled by job chain send mail (depends on mail_queue_only=yes) emails will be handled by notificaiton.
      • {{mail_queue_only}: no
        • E-Mails will be send by JobScheduler Master
      • mail_queue_only: yes
        • E-Mails will be handled by job chain sendMail

      When E-Mail is handled by job chain sendMail

      • param sos.use_notification: no
        • E-Mails will be send by job chain sendMail
      • param {{sos.use_notification}: yes
        • E-Mails will be handled by notification

      When E-Mail is handled by notification

      • NotificationObjects in SystemMonitorNotification_MonitorSystem.xml
        • <TaskWarning/> is defined: When a task ends with a warning and mail_on_warning=true
          • E-Mails will be send by notification
        • <TaskWarning/> is not defined: When a task ends with a warning and mail_on_warning=true
          • E-Mails will be send by job chain sendMail
        • <TaskIfLongerThan/> is defined: When a task runs longer than expected
          • E-Mails will be send by notification
        • <TaskIfLongerThan/> is not defined: When a task runs longer than expected
          • E-Mails will be send by job chain sendMail
        • <TaskIfShorterThan/> is defined: When a task runs shorter than expected
          • E-Mails will be send by notification
        • <TaskIfShorterThan/> is not defined: When a task runs shorter than expected
          • E-Mails will be send by job chain sendMail
        • <MasterMessage/> is defined: When JobScheduler sends any message other than defined above
          • E-Mails will be send by notification
        • <MasterMessage/> is not defined: When JobScheduler sends any message other than defined above
          • E-Mails will be send by job chain sendMail

      When emails are handled by the job chain sendMail and by notificaiton and notification can not send the email it will be sent by job chain sendMail

      • The ./live/sos/notification/SystemNotifier,MonitorSystem.order.xml is assigned a cyclic run-time such as:
        • <run_time><period absolute_repeat="00:05" begin="00:00" end="24:00"/></run_time>

      Summary

      To activate the email handling by JobScheduler Monitoring Interface

      • mail_queue_only=yes
      • sos.use_notification=yes
      • mail_on_warning=yes (optional)
      • optional
        • <MasterMessage/>
        • <TaskWarning/>
        • <TaskIfLongerThan/>
        • <TaskIfShorterThan/>

      Attachments

        Issue Links

          Activity

            People

              re Robert Ehrlich
              ap Andreas PĆ¼schel
              Mahendra Patidar Mahendra Patidar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: