Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SystemMonitorNotification / Notification

Notification supports the following attributes:

AttributeUsageDescription
nameoptionalNotification description

 

Code Block
languagexml
titleExample
collapsetrue
...
<Notification name="Mail: on failed job">
...

 

The following elements may be nested inside a Notification element:

...

ElementElement descriptionDescription
NotificationInterfaceOptional, once inside of NotificationMonitor elementPlugNSCA plug-in Interface to be executed for System Monitor notification
NotificationCommandOptional, once inside of NotificationMonitor elementCommand line to be executed for System Monitor notification
NotificationMailOptional, once inside of NotificationMonitor elementMail interface to be executed for System Monitor notification
NotificationJMSOptional, once inside of NotificationMonitor elementJMS interface to be executed for System Monitor notification

 

SystemMonitorNotification / Notification / NotificationMonitor / NotificationInterface

NSCA plug-in Interface to be executed for System Monitor notification.

NotificationInterface support the following attributes:

...

SystemMonitorNotification / Notification / NotificationMonitor / NotificationCommand

Command line to be executed for System Monitor notification.

NotificationCommand support the following attributes:

...

Code Block
languagexml
titleExample
collapsetrue
...
<NotificationCommand><![CDATA[
echo scheduler id=${MON_N_SCHEDULER_ID}, history id=${MON_N_ORDER_HISTORY_ID}, job_chain=${MON_N_JOB_CHAIN_NAME}(${MON_N_ORDER_ID}), step =${MON_N_ORDER_STEP_STATE}, error=${MON_N_ERROR_TEXT} > D://errors.txt
]]></NotificationCommand>
...
_N_ORDER_ID}), step =${MON_N_ORDER_STEP_STATE}, error=${MON_N_ERROR_TEXT} > D://errors.txt
]]></NotificationCommand>
...
SystemMonitorNotification / Notification / NotificationMonitor / NotificationMail

Jira
serverSOS JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId6dc67751-9d67-34cd-985b-194a8cdc9602
keyJS-1388

Mail interface to be executed for System Monitor notification.

Mail interface reads some values of the following configuration files:

  • config/factory.ini
    • Section spooler
      • log_mail_from
      • log_mail_to
      • log_mail_cc
      • log_mail_bcc
      • smtp
      • mail_queue_dir
      • mail_queue_only
    • Section smtp
      • mail.smtp.user
      • mail.smtp.password
      • mail.smtp.port
      • mail.smtp.connectiontimeout
      • mail.smtp.timeout
  • config/private/private.conf
    • joc.url

NotificationMail support the following attributes:

AttributeUsageDescription
content_typeOptional

Content type of the e-mail.

Possible values:

  • text/plain
  • text/html.

 

Default: text/html

charsetOptional

Charset of the e-mail.

 

Default: ISO-8859-1

encodingOptional

Encoding of the e-mail.

Possible values:

  • 7bit
  • Quoted-Printable
  • Base64.

 

Default: 7bit

priorityOptional

Priority of the e-mail.

Possible values:

  • Highest
  • High
  • Normal.

 

Default: Normal

pluginOptional

Java class of the plugin implementation (extends com.sos.jitl.notification.plugins.notifier.SystemNotifierCustomPlugin)

 

Default: com.sos.jitl.notification.plugins.notifier.SystemNotifierSendMailPlugin

The following elements can be nested inside a NotificationMail element:

ElementElement descriptionDescription
FromOptional or once inside of NotificationMail element  E-mail address of the account that sends e-mail.
ToOptional or once inside of NotificationMail elementE-mail address of the recipient(s) of a notification e-mail.
CCOptional or once inside of NotificationMail elementE-mail address of the recipient(s) of a carbon copy notification e-mail.
BCCOptional or once inside of NotificationMail elementE-mail address of recipient(s) of a blind carbon copy notification e-mail.
SubjectRequired, once inside of NotificationMail elementSubject of an e-mail notification.
BodyRequired, once inside of NotificationMail elementBody of an e-mail notification.
SystemMonitorNotification / Notification / NotificationMonitor / NotificationMail / From

E-mail address of the account that sends e-mail.

The mail notification interface uses the value of the log_mail_from entry (configuration file config/factory.ini) when this element is not set.

 

SystemMonitorNotification / Notification / NotificationMonitor / NotificationMail / To

E-mail address of the recipient(s) of a notification e-mail.

When this element

  • is not set
    • log_mail_to will be used
  • is set
    •   log_mail_to, log_mail_cc, log_mail_bcc are not used

 

SystemMonitorNotification / Notification / NotificationMonitor / NotificationMail / CC

E-mail address of the recipient(s) of a carbon copy notification e-mail.

When this element

  • is not set
    • log_mail_cc will be used (if the NotificationMail/To element is not defined - see above)
  • is set
    •   log_mail_cc, log_mail_bcc are not used
SystemMonitorNotification / Notification / NotificationMonitor / NotificationMail / BCC

E-mail address of recipient(s) of a blind carbon copy notification e-mail.

When this element

  • is not set
    • log_mail_bcc will be used (if the NotificationMail/To or NotificationMail/CC elements are not defined - see above)
  • is set
    •   log_mail_bcc are not used

 

SystemMonitorNotification / Notification / NotificationMonitor / NotificationMail / Subject

Subject of an e-mail notification.

The Subject can contain the JobScheduler Monitoring Interface variables.

Code Block
languagexml
titleExample
collapsetrue
...
<Subject><![CDATA[JobScheduler notification: ${SERVICE_MESSAGE_PREFIX}, job executed with errors: ${MON_N_JOB_NAME}]]></Subject>
...

 

SystemMonitorNotification / Notification / NotificationMonitor / NotificationMail / Body

Body of an e-mail notification.

The Body can contain the JobScheduler Monitoring Interface variables.

Code Block
languagexml
titleExample
collapsetrue
...
<Body><![CDATA[<style type="text/css">
.tg  {border-collapse:collapse;border-spacing:0;border-color:#bbb;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#bbb;color:#594F4F;background-color:#E0FFEB;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#bbb;color:#493F3F;background-color:#9DE0AD;}
</style>
<table class="tg">
    <tr>
        <th colspan="4">Error</th>
    </tr>
    <tr>
        <td>Code:</td><td>${MON_N_ERROR_CODE}</td>
        <td>Messsage</td><td>${MON_N_ERROR_TEXT}</td>
    </tr>
    <tr>
        <th colspan="4">JobScheduler</th>
    </tr>
    <tr>
        <td>JobScheduler ID</td><td>${MON_N_SCHEDULER_ID}</td>
        <td>Agent URL</td><td>${MON_N_AGENT_URL}</td>
    </tr>
    <tr>
        <th colspan="4">Order</th>
    </tr>
    <tr>
        <td>Order ID</td><td><a href="${JOC_HREF_ORDER}">${MON_N_ORDER_ID}</a></td>
        <td>Order Title</td><td>${MON_N_ORDER_TITLE}</td>
    </tr>
    <tr>
        <td>Job Chain Name</td><td><a href="${JOC_HREF_JOB_CHAIN}">${MON_N_JOB_CHAIN_NAME}</a></td>
        <td>Job Chain Title</td><td>${MON_N_JOB_CHAIN_TITLE}</td>
    </tr>
    <tr>
        <td>Job Name</td><td><a href="${JOC_HREF_JOB}">${MON_N_JOB_NAME}${MON_N_JOB_NAME}</a></td>
        <td>Job Title</td><td>${MON_N_JOB_TITLE}</td>
    </tr>
    <tr>
        <th colspan="4">Task History</th>
    </tr>
    <tr>
        <td>Task ID</td><td>${MON_N_TASK_ID}</td>
        <td>Time elapsed</td><td>${MON_N_TASK_TIME_ELAPSED}</td>
    </tr>
    <tr>
        <td>Start Time</td><td>${MON_N_TASK_START_TIME}</td>
        <td>End Time</td><td>${MON_N_TASK_END_TIME}</td>
    </tr>
</table>]]></Body>
...


 

SystemMonitorNotification / Notification / NotificationMonitor / NotificationJMS

 

Jira
serverSOS JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId6dc67751-9d67-34cd-985b-194a8cdc9602
keyJITL-280

JMS Interface to be executed for System Monitor notification.

 

NotificationJMS support the following attributes:

 

AttributeUsageDescription
client_idOptional

The client identifier for this connection.

See: Connection.setClientID

destinationOptional

A Destination object encapsulates a provider-specific address.

Possible values:

  • Queue
  • Topic.

See: Destination

 

Default: Queue

acknowledge_modeOptional

Session acknowledgment mode.

Possible values: 

  • Session.AUTO_ACKNOWLEDGE
  • Session.CLIENT_ACKNOWLEDGE
  • Session.AUTO_ACKNOWLEDGE

See: Session

 

Default: Session.CLIENT_ACKNOWLEDGE

delivery_modeOptional

Delivery mode.

Possible values: 

  • DeliveryMode.NON_PERSISTENT
  • DeliveryMode.PERSISTENT

See:

 

Default: DeliveryMode.PERSISTENT

priorityOptional

The producer's default priority.

See: MessageProducer.setPriority

 

Default: 4

time_to_liveOptional

Sets the default length of time in milliseconds from its dispatch time that a produced message should be retained by the message system.

See: MessageProducer.setTimeToLive

Possible values:

  • <n> - duration in milliseconds
    • e.g.: 60000
  • <n>s - duration in seconds
    • e.g.: 30s
  • <n>m - duration in minutes
    • e.g.: 30m
  • <n>h - duration in hours
    • e.g.: 24h
  • <n>d - duration in days
    • e.g.: 30d
  • <n>w - duration in weeks
    • e.g.: 4w
  • Combined values (with blank as separator):
    • e.g.: 1w 1d 1h

Default: 0

pluginOptional

Java class of the plugin implementation (extends com.sos.jitl.notification.plugins.notifier.SystemNotifierCustomPlugin)

 

Default: com.sos.jitl.notification.plugins.notifier.SystemNotifierSendJMSPlugin

 

SystemMonitorNotification / Notification / NotificationObjects

...

SystemMonitorNotification / Notification / NotificationObjects / JobChain

 

JobChain supports the following attributes:

...

ElementElement descriptionDescription
TimerJob Optional, once or once more inside of Timer element 

Restricts notifications for order-controlled or standalone jobs.

Jira
serverSOS JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId6dc67751-9d67-34cd-985b-194a8cdc9602
keyJITL-401
 

TimerJobChainOptional, once or once more inside of Timer elementRestricts notifications for job chains
MinimumOptional or once inside of Timer elementMinimum required execution time for job chains or selected job nodes. Allows script code to be executed that returns the minimum execution time in seconds.
MaximumOptional or once inside of Timer elementMaximum allowed execution time for job chains or selected job nodes. Allows script code to be executed that returns the maximum execution time in seconds.

...

Code Block
languagexml
titleExample
collapsetrue
 service name = ${SERVICE_NAME}

 

OS environment variables variables 

 All existing OS environment variables can be defined by message using the syntax %<variable name>% (Windows) or $<variable name> (Unix).

Code Block
languagexml
titleExample Windows
collapsetrue
 %TEMP%/test.exe


JOC Cockpit variables

...


Jira
serverSOS JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId6dc67751-9d67-34cd-985b-194a8cdc9602
keyJS-1388

Note:

  • the JOC Cockpit variables will be substituted only when the NotificationMail interface is used.

Requirement:

  •  config/private/private.conf configuration file is active and contains the configured joc.url entry.


Expand
titleVariables
NameDescription
${JOC_HREF_JOB_CHAIN}Link href to the job chain object in the JOC Cockpit
${JOC_HREF_ORDER}Link href to the order object in the JOC Cockpit
${JOC_HREF_JOB}Link href to the job object in the JOC Cockpit

...