...
Element | Element description | Description |
---|---|---|
Job | Optional or multiple use allowed inside the NotificationObjects element | Restricts notifications for order or standalone jobs |
JobChain | Optional or multiple use allowed inside the NotificationObjects element | Restricts notifications for job chains |
TimerRef | Optional or multiple use allowed inside the NotificationObjects element | Restricts notifications for performance checks (Timer) |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<SystemMonitorNotification system_id="op5">
<Notification>
<NotificationMonitor service_name_on_error="JobScheduler Monitoring Errors">
...
</NotificationMonitor>
<NotificationObjects>
<!-- Send the job error, occurrent in the "test/my_job" order job, to the "JobScheduler Monitoring Errors" service. -->
<Job name="test/my_job" />
<!-- Send the job chain error, occurrent in the "test/my_jobchain" job chain, to the "JobScheduler Monitoring Errors" service. -->
<JobChain name="test/my_jobchain" />
</NotificationObjects>
</Notification>
</SystemMonitorNotification> |
SystemMonitorNotification / Notification / NotificationObjects / Job
Note:
This element specifies the order-controlled
or
jobs for which notifications are being sent to a system monitor.standalone
...
MasterMessage | Optional or only once inside the NotificationObjects element |
Includes problems detected by a JobScheduler Master, e.g. database connection lost. | ||||||||||
TaskWarning | Optional or only once inside the NotificationObjects element |
Includes job execution warning messages. | ||||||||||
TaskIfLongerThan | Optional or only once inside the NotificationObjects element |
Includes the feature to send notification in case that the execution of job requires a longer duration than expected. | ||||||||||
TaskIfShorterThan | Optional or only once inside the NotificationObjects element |
|
...
Includes the feature to send notification in case that the execution of job requires a shorter duration than expected. |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<SystemMonitorNotification system_id="op5">
<Notification>
<NotificationMonitor service_name_on_error="JobScheduler Monitoring Errors">
...
</NotificationMonitor>
<NotificationObjects>
<!-- Send the job error, occurrent in the |
...
Job
supports the following attributes:
Attribute | Usage | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
notifications | Optional Integer | Specifies the number of transfers the same notification to a System Monitor. Default: | ||||||||||
scheduler_id | Optional | Notifications are restricted to the JobScheduler instance with the given identification. By default notifications will be sent for all JobScheduler instances that log into the same database. Regular expression can be used. | ||||||||||
name | Optional | Job name including possible folder names. Regular expression can be used.
| ||||||||||
return_code_from | Optional | Restricts notifications for jobs for a particular return code range. | ||||||||||
return_code_from | Optional | Restricts notifications for jobs for a particular return code range. |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
... <Job notifications="2" name="test/my_job"/> ... <Job scheduler_id="scheduler_4444" /> ... <Job scheduler_id="scheduler_4444" name="test/my_.*" /> ... order job, to the "JobScheduler Monitoring Errors" service. --> <Job name="test/my_job" return_code_from="5"/> ... <Job name= <!-- Send the job chain error, occurrent in the "test/my_job" return_code_to="10"/> ... <Jobjobchain" job chain, to the "JobScheduler Monitoring Errors" service. --> <JobChain name="test/my_jobjobchain" return_code_from="5" return_code_to="5"/> ... /> </NotificationObjects> </Notification> </SystemMonitorNotification> |
SystemMonitorNotification / Notification / NotificationObjects /
...
Job
Note:
This element specifies the order-controlled
or
jobs for which notifications are being sent to a system monitor.standalone
Support for standalone
jobs starting with
Jira | ||||||||
---|---|---|---|---|---|---|---|---|
|
Job
...
JobChain
supports the following attributes:
Attribute | Usage | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
notifications | Optional Integer | Specifies the number of transfers the same notification to a System Monitor. Default: | ||||||||||
scheduler_id | Optional | Notifications are restricted to the JobScheduler instance with the given identification. By default notifications will be sent for all JobScheduler instances that log into the same database. Regular expression can be used. | ||||||||||
name | Optional | Job chain name including possible folder names. Regular expression can be used.
| ||||||||||
return_code_from | Optional | Restricts notifications for job chains for jobs for a particular return code range. | ||||||||||
return_code_from | Optional | Restricts notifications for job chains for jobs for a particular return code range. | ||||||||||
step_from | Optional | Restricts notifications for job chains to a sequence of job nodes that are specified with the step_from and step_to attributes. | ||||||||||
step_to | Optional | Restricts notifications for job chains to a sequence of job nodes that are specified with the step_from and step_to attributes. | ||||||||||
excluded_steps | Optional | Specifies the steps which will be excluded from the analyzing (separated by semicolon) | ||||||||||
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<Job notifications="2" | ||||||
Code Block | ||||||
| ||||||
... <JobChain notifications="2" name="test/my_jobchainjob"/> ... <JobChain<Job scheduler_id="scheduler_4444" /> ... <JobChain<Job scheduler_id="scheduler_4444" name="test/my_.*" /> ... <JobChain<Job name="test/my_jobchainjob" return_code_from="5"/> ... <JobChain<Job name="test/my_jobchainjob" return_code_to="10"/> ... <JobChain<Job name="test/my_jobchainjob" return_code_from="5" return_code_to="5"/> ... <JobChain name="test/my_jobchain" step_from="200"/> ... <JobChain name="test/my_jobchain" step_to="500"/> ... <JobChain name="test/my_jobchain" step_from="300" step_to="300"/> ... <JobChain name="test/my_jobchain" excluded_steps="200;300"/> ... |
SystemMonitorNotification / Notification / NotificationObjects / TimerRef
TimerRef supports the following attributes:
Attribute | Usage | Description |
---|---|---|
notifications | Optional Integer | Specifies the number of transfers the same notification to a System Monitor. Default: |
ref | Optional | Corresponds with Timer name setting defined in the SystemMonitorNotification / Timer element |
notify_on_error |
Optional Boolean | Send timer check notification when the configured job chain contains the error notifications. Default: |
SystemMonitorNotification / Notification / NotificationObjects / JobChain
JobChain
supports the following attributes:
Attribute | Usage | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
notifications | Optional Integer | Specifies the number of transfers the same notification to a System Monitor. Default: | ||||||||||
scheduler_id | Optional | Notifications are restricted to the JobScheduler instance with the given identification. By default notifications will be sent for all JobScheduler instances that log into the same database. Regular expression can be used. | ||||||||||
name | Optional | Job chain name including possible folder names. Regular expression can be used.
| ||||||||||
return_code_from | Optional | Restricts notifications for job chains for a particular return code range. | ||||||||||
return_code_from | Optional | Restricts notifications for job chains for a particular return code range. | ||||||||||
step_from | Optional | Restricts notifications for job chains to a sequence of job nodes that are specified with the step_from and step_to attributes. | ||||||||||
step_to | Optional | Restricts notifications for job chains to a sequence of job nodes that are specified with the step_from and step_to attributes. | ||||||||||
excluded_steps | Optional | Specifies the steps which will be excluded from the analyzing (separated by semicolon) |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<JobChain notifications="2" name="test/my_jobchain"/>
...
<JobChain scheduler_id="scheduler_4444" />
...
<JobChain scheduler_id="scheduler_4444" name="test/my_.*" />
...
<JobChain name="test/my_jobchain" return_code_from="5"/>
...
<JobChain name="test/my_jobchain" return_code_to="10"/>
...
| ||||||
Code Block | ||||||
| ||||||
<SystemMonitorNotification system_id="op5"> <Notification> <NotificationMonitor service_name_on_error="JobScheduler Monitoring Error"> ... </NotificationMonitor> <NotificationObjects> <!-- Send the job chain error, occurring in the "test/my_jobchain" job chain, to the "JobScheduler Monitoring Errors" service. --> <JobChain name="test/my_jobchain" return_code_from="5" return_code_to="5"/> </NotificationObjects> </Notification> <Notification> <NotificationMonitor service_name_on_error="JobScheduler Monitoring Performance"> ... </NotificationMonitor> <NotificationObjects> <!-- Sends the performance check error, occurring in the ... <JobChain name="test/my_jobchain" step_from="200"/> ... <JobChain name="test/my_jobchain" step_to="500"/> ... <JobChain name="test/my_jobchain" job chain, to the "JobScheduler Monitoring Performance" service. Sends the performance check error to the "JobScheduler Monitoring Performance" service will be ignored when the "step_from="300" step_to="300"/> ... <JobChain name="test/my_jobchain" excluded_steps="200;300"/> ... |
SystemMonitorNotification / Notification / NotificationObjects / TimerRef
TimerRef supports the following attributes:
Attribute | Usage | Description |
---|---|---|
notifications | Optional Integer | Specifies the number of transfers the same notification to a System Monitor. Default: |
ref | Optional | Corresponds with Timer name setting defined in the SystemMonitorNotification / Timer element |
notify_on_error |
Optional Boolean | Send timer check notification when the configured job chain contains the error notifications. Default: |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<SystemMonitorNotification system_id="op5"> <Notification> <NotificationMonitor service_name_on_error="JobScheduler Monitoring Error"has the job chain error (default notify_on_error = false). --> <TimerRef ref="my_timer" /> ... </NotificationObjects>NotificationMonitor> </Notification> <NotificationObjects> <!-- <Timer name="my_timer"> Send the job chain error, occurring in the "test/my_jobchain" job chain, to the "JobScheduler Monitoring Errors" service. --> <TimerJobChain<JobChain name="test/my_jobchain" /> </Timer> </SystemMonitorNotification> |
NotificationObjects>
</Notification>
<Notification>
<NotificationMonitor service_name_on_error="JobScheduler Monitoring Performance">
...
</NotificationMonitor>
<NotificationObjects>
<!--
Sends the performance check error, occurring in the "test/my_jobchain" job chain, to the "JobScheduler Monitoring Performance" service.
Sends the performance check error to the "JobScheduler Monitoring Performance" service will be ignored when the "test/my_jobchain" has the job chain error (default notify_on_error = false).
-->
<TimerRef ref="my_timer" />
</NotificationObjects>
</Notification>
<Timer name="my_timer">
<TimerJobChain name="test/my_jobchain" />
</Timer>
</SystemMonitorNotification> |
SystemMonitorNotification / Notification / NotificationObjects / MasterMessage
Jira server SOS JIRA columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 6dc67751-9d67-34cd-985b-194a8cdc9602 key JS-1837
MasterMessage
includes problems detected by a JobScheduler Master, e.g. database connection lost.
Requirements:
-
./config/factory.ini
configuration file:mail_queue_only=true
mail_queue_dir
setting specifies a directory to store the JobScheduler mailsmail_on_warning=true
mail_on_error=true
MasterMessage
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
scheduler_id | Optional | Notifications are restricted to the JobScheduler instance with the given identification. By default notifications will be sent for all JobScheduler instances that log into the same database. Regular expression can be used. |
| Optional Integer | Specifies the number of transfers the same notification to a System Monitor. Default: |
SystemMonitorNotification / Notification / NotificationObjects / TaskWarning
Jira server SOS JIRA columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 6dc67751-9d67-34cd-985b-194a8cdc9602 key JS-1837
TaskWarning
includes job execution warning messages.
Requirements:
-
./config/factory.ini
configuration file:mail_queue_only=true
mail_queue_dir
setting specifies a directory to store the JobScheduler mailsmail_on_warning=true
TaskWarning
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
scheduler_id | Optional | Notifications are restricted to the JobScheduler instance with the given identification. By default notifications will be sent for all JobScheduler instances that log into the same database. Regular expression can be used. |
| Optional Integer | Specifies the number of transfers the same notification to a System Monitor. Default: |
SystemMonitorNotification / Notification / NotificationObjects / TaskIfLongerThan
Jira server SOS JIRA columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 6dc67751-9d67-34cd-985b-194a8cdc9602 key JITL-522
TaskIfLongerThan
includes the feature to send notification in case that the execution of job requires a longer duration than expected.
Requirements:
- The Job configuration contains the
warn_if_longer_than
setting. ./config/factory.ini
configuration file:mail_queue_only=true
mail_queue_dir
setting specifies a directory to store the JobScheduler mailsmail_on_warning=true
TaskIfLongerThan
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
scheduler_id | Optional | Notifications are restricted to the JobScheduler instance with the given identification. By default notifications will be sent for all JobScheduler instances that log into the same database. Regular expression can be used. |
| Optional Integer | Specifies the number of transfers the same notification to a System Monitor. Default: |
SystemMonitorNotification / Notification / NotificationObjects / TaskIfShorterThan
Jira server SOS JIRA columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 6dc67751-9d67-34cd-985b-194a8cdc9602 key JITL-522
TaskIfShorterThan
includes the feature to send notification in case that the execution of job requires a shorter duration than expected.
Requirements:
The Job configuration contains the
warn_if_shorter_than
setting../config/factory.ini
configuration file:mail_queue_only=true
mail_queue_dir
setting specifies a directory to store the JobScheduler mailsmail_on_warning=true
TaskIfShorterThan
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
scheduler_id | Optional | Notifications are restricted to the JobScheduler instance with the given identification. By default notifications will be sent for all JobScheduler instances that log into the same database. Regular expression can be used. |
| Optional Integer | Specifies the number of transfers the same notification to a System Monitor. Default: |
SystemMonitorNotification / Timer
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<?xml version="1.0" encoding="ISO-8859-1"?> <job title="Sample Job with Store Result Monitor" order="yes" stop_on_error="no" tasks="1"> <params> <!-- set the scheduler_notification_result_parameters parameter --> <param name="scheduler_notification_result_parameters" value="file_size"/> </params> <!-- calculate and create the new order parameter if necessary --> <script language="java:javascript"><![CDATA[ function spooler_process(){ var order = spooler_task.order; var params = spooler.create_variable_set(); params.merge(spooler_task.params); params.merge(order.params); // parameter scheduler_file_path was set in the previous job chain step var file = new java.io.File(params.value("scheduler_file_path")); var fileSize = file.length()/1024; order.params.set_var("file_size",fileSize.toString()); return true; }]]> </script> <!-- set the StoreResultsJobJSAdapterClass as a monitor the StoreResultsJobJSAdapterClass as a monitor --> <monitor name="notification_monitor" ordering="1"> <!-- JobScheduler version 1.9.x, 1.10.x <script java_class="com.sos.scheduler.notification.jobs.result.StoreResultsJobJSAdapterClass" language="java"/> --> <!-- JobScheduler version 1.11.x, 1.12.x --> <monitor <script namejava_class="notification_monitorcom.sos.jitl.notification.jobs.result.StoreResultsJobJSAdapterClass" orderinglanguage="1java"/> </monitor> <run_time <!-- JobScheduler version 1.9.x, 1.10.x <script java_class="com.sos.scheduler.notification.jobs.result.StoreResultsJobJSAdapterClass" language="java"/> --> <!-- JobScheduler version 1.11.x, 1.12.x --> <script java_class="com.sos.jitl.notification.jobs.result.StoreResultsJobJSAdapterClass" language="java"/> </monitor> <run_time /> </job> |
...
Usage
The Message can be configured on the following parent nodes as a CDATA element :
SystemMonitorNotification / Notification /
NotificationInterface
SystemMonitorNotification / Notification / NotificationCommand
SystemMonitorNotification / Notification / NotificationMail
Subject
Body
SystemMonitorNotification / Notification / NotificationJMS / Message
The Message can contain:
- Fixed values
- Variables
...
/>
</job> |
Message
Anchor | ||||
---|---|---|---|---|
|
Usage
The Message can be configured on the following parent nodes as a CDATA element :
SystemMonitorNotification / Notification /
NotificationInterface
SystemMonitorNotification / Notification / NotificationCommand
SystemMonitorNotification / Notification / NotificationMail
Subject
Body
SystemMonitorNotification / Notification / NotificationJMS / Message
The Message can contain:
- Fixed values
- Variables
Example: <![CDATA[ scheduler id = ${MON_N_SCHEDULER_ID} ]]>
Variables
All variables (except OS environment variables) must be defined by using of the
${<variable name>}
syntax.
Note:
- Syntax for the JobScheduler version 1.10.6 and higher. Syntax for the JobScheduler version 1.10.4, 1.10.5 (see below) is still supported.
- Syntax for the JobScheduler version 1.10.4, 1.10.5: {<variable name>}
- Syntax for the JobScheduler previous versions:
%<variable name>%
The order of the substitution the variables values is:
- Table variables.
- Service variables.
- JOC Cockpit variables.
- OS environment variables.
Table variables
Expand | |||||||
---|---|---|---|---|---|---|---|
| |||||||
Table of the history of steps of processed orders / jobs.
|
...
|
...
Variables
...
|
...
|
syntax.
Note:
- Syntax for the JobScheduler version 1.10.6 and higher. Syntax for the JobScheduler version 1.10.4, 1.10.5 (see below) is still supported.
- Syntax for the JobScheduler version 1.10.4, 1.10.5: {<variable name>}
- Syntax for the JobScheduler previous versions:
%<variable name>%
The order of the substitution the variables values is:
...
Table variables
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Table of the history of steps of processed orders / jobs.
|
Code Block | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||
scheduler id = ${MON_N_SCHEDULER_RECOVERED} 0 = dependent of the ID}, history id = ${MON_N_ORDER_ERROR} - ok or error was not recovered,
| Return code number | JobScheduler Agent uri | available with release 1.11.2
|
Expand | |||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||
Table of the history of notifications sent to a system monitor.
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
scheduler id = ${MON_N_SCHEDULER_ID}, history id = ${MON_N_ORDER_HISTORY_ID}, job_chain = ${MON_N_JOB_CHAIN_NAME}(${MON_N_ORDER_ID}), error = ${MON_N_ERROR_TEXT} |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Table of the history of notifications sent to a system monitor.
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
step from = ${MON_SN_STEP_FROM}, step to = ${MON_SN_STEP_TO}, notification = ${MON_SN_CURRENT_NOTIFICATION} (of ${MON_SN_NOTIFICATIONS}) |
...