...
This article describes individual configuration parameters and provides examples of their use with monitors such as op5 and Zabbix and using of the mail und JMS interfaces.
Configuration Editor
We recommend that the XML Editor is used generate monitoring configuration objects. This editor automatically uses an XSD Schema to generate configuration suggestions and validate configurations, and its use is intended to provide a significant reduction in the time required to develop and test a configuration.
...
Element | Element description | Description |
---|---|---|
SystemMonitorNotification | Top Level Element | Configuration for notifications to be sent to a system monitor. |
Notification | Once or more inside a Required, multiple use allowed inside the SystemMonitorNotification element | Specifies a system monitor notification that includes a command line invocation and the JobScheduler objects. |
Timer | Optional , once or more multiple use allowed inside a the SystemMonitorNotification element | Performance measurement definition. |
...
Element | Element description | Description |
---|---|---|
NotificationMonitor | Once inside a Required, only once inside the Notification element | Specifies the System Monitor interface that is being used for messages: either by a Plug-in Interface or by command line invocation |
NotificationObjects | Once inside a Required, only once inside the Notification element | Specifies the Job Chain and the Timer definitions |
SystemMonitorNotification / Notification / NotificationMonitor
NotificationMonitor
supports the following attributes:
Note:
The JobScheduler Interface Monitor can be used to monitor the messages for the 3 use cases:
- error caseattributes
- an error has occured / been recovered during a job chain / job execution
- the
service_name_on_error
- setting is responsible for this monitoring case
- an error has occured / been recovered during a job chain / job execution
- success case
- a job chain / job ends succesfully
- the
service_name_on_success
- the
- at least one of these attributes must be configured
- both attributes can be configured together
- a job chain / job ends succesfully
...
- setting is responsible for this monitoring case
- performance check (see
Timer
)- usually the
service_name_on_error
- usually the
...
- setting
...
- is responsible for this monitoring case but the performance check will also work if only the
service_name_on_success
setting has been defined.
- is responsible for this monitoring case but the performance check will also work if only the
...
This setting specifies the service status code for error messages.
Default: CRITICAL
...
This setting specifies the service status code for success messages
Default: OK
In addition, the service_name_on_error
/ service_name_on_success
attributes have the following meaning:
NotificationInterface
- The setting must match the corresponding service name in the System Monitor such as Nagios or op5.
NotificationCommand
- Freely selectable, has no further meaning than to identify a notification.
NotificationMail
- Freely selectable, has no further meaning than to identify a notification.
NotificationJMS
- The setting must match the corresponding queue/topic name in the JMS Server.
Note:
- attributes
service_name_on_error
andservice_name_on_success
- at least one of these attributes must be configured
- both attributes can be configured together
- the use of this settings must be unique within one SystemNotification
NotificationMonitor
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
service_name_on_error | Optional | See explanation above. |
service_name_on_success | Optional | See explanation above. |
service_status_on_error | Optional | This setting specifies the service status code for error messages. Default: |
service_status_on_success | Optional | This setting specifies the service status code for success messages Default: |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<!-- Example
op5 NSCA Status:
0 - OK
1 - WARNING
2 - CRITICAL
3 - UNKNOWN -->
...
<!-- Sending occurred errors as CRITICAL (default) -->
<NotificationMonitor service_name_on_error="JobScheduler Monitoring Errors">
...
<!-- Sending occurred errors as WARNING -->
<NotificationMonitor service_name_on_error="JobScheduler Monitoring Errors" service_status_on_error="1">
... |
One of the following elements must be nested inside a NotificationMonitor
element:
Element | Element description | Description |
---|---|---|
NotificationInterface | Optional or only once inside the NotificationMonitor element | NSCA plug-in Interface to be executed for System Monitor notification |
NotificationCommand | Optional or only once inside the NotificationMonitor element | Command line to be executed for System Monitor notification |
NotificationMail | Optional or only once inside the NotificationMonitor element | Mail interface to be executed for System Monitor notification |
NotificationJMS | Optional or only once inside the NotificationMonitor element | JMS interface to be executed for System Monitor notification |
SystemMonitorNotification / Notification / NotificationMonitor / NotificationInterface
NSCA plug-in Interface to be executed for System Monitor notification.
NotificationInterface
supports the following attributes:
Attribute | Usage | Description |
---|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<!-- Example
op5 NSCA Status:
0 - OK
1 - WARNING
2 - CRITICAL
3 - UNKNOWN -->
...
<!-- Sending occurred errors as CRITICAL (default) -->
<NotificationMonitor service_name_on_error="JobScheduler Monitoring Errors">
...
<!-- Sending occurred errors as WARNING -->
<NotificationMonitor service_name_on_error="JobScheduler Monitoring Errors" service_status_on_error="1">
... |
One of the following elements must be nested inside a NotificationMonitor
element:
Element | Element description | Description |
---|---|---|
NotificationInterface | Optional, once inside of NotificationMonitor element | NSCA plug-in Interface to be executed for System Monitor notification |
NotificationCommand | Optional, once inside of NotificationMonitor element | Command line to be executed for System Monitor notification |
NotificationMail | Optional, once inside of NotificationMonitor element | Mail interface to be executed for System Monitor notification |
NotificationJMS | Optional, once inside of NotificationMonitor element | JMS 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:
Attribute | Usage | Description |
---|---|---|
monitor_host | Required | This setting specifies the host name or ip address of System Monitor host. |
monitor_port | Required | This setting specifies the TCP port that the System Monitor would listen to. |
monitor_password | Optional | This setting specifies the password
|
monitor_connection_timeout | Optional | This setting specifies the connection timeout in ms. Default: |
monitor_response_timeout | Optional | This setting specifies the response timeout in ms. |
monitor_encryption | Optional | This setting specifies that the communication with the System Monitor is encrypted. By default no encryption is used.
|
service_host | Required | This setting specifies the name of the host that executes the passive check. The name must match the corresponding setting in the System Monitor. |
plugin | Optional | Default:
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
... <NotificationInterface monitor_host="monitor_host" monitor_port="5667" monitor_encryption="XOR" service_host="service_host"><![CDATA[ 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} ]]></NotificationInterface> ... |
...
Command line to be executed for System Monitor notification.
NotificationCommand
support supports the following attributes:
Attribute | Usage | Description |
---|---|---|
plugin | Optional | Default:
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
... <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> ... |
...
Jira server SOS JIRA columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 6dc67751-9d67-34cd-985b-194a8cdc9602 key JS-1388
The Mail interface to be executed for System Monitor notification.
The Mail interface reads some the following values of from 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
- Section
config/private/private.conf
joc.url
NotificationMail
support supports the following attributes:
...
Element | Element description | Description |
---|---|---|
From | Optional or only once inside of the NotificationMail element | E-mail address of the account that sends e-mail. |
To | Optional or only once inside of the element | E-mail address of the recipient(s) of a notification e-mail. |
CC | Optional or only once inside of the NotificationMail element | E-mail address of the recipient(s) of a carbon copy notification e-mail. |
BCC | Optional or only once inside of the NotificationMail element | E-mail address of recipient(s) of a blind carbon copy notification e-mail. |
Subject | Required, only once inside of of the NotificationMail element | Subject of an e-mail notification. |
Body | Required, only once inside of the NotificationMail element | Body of an e-mail notification. |
...
E-mail address of the account that sends the 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.
...
The Subject
can contain the JobScheduler Monitoring Interface variables.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
... <Subject><![CDATA[JobScheduler notification: ${SERVICE_MESSAGE_PREFIX}, job executed with errors: ${MON_N_JOB_NAME}]]></Subject> ... |
...
The Body
can contain the JobScheduler Monitoring Interface variables.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
... <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> ... |
...
JMS Interface to be executed for System Monitor notification.
Note: the provider-specific queue
or topic name
will be defined with the service_name_on_error
/ service_status_on_succes
attribute of the parent SystemMonitorNotification / Notification / NotificationMonitor
element.
NotificationJMS
supports NotificationJMS
support the following attributes:
Attribute | Usage | Description |
---|---|---|
client_id | Optional | The client identifier for this connection. |
destination | Optional | A Possible values:
See: Destination
Default: |
acknowledge_mode | Optional | Session acknowledgment mode. Possible values:
See: Session
Default: |
delivery_mode | Optional | Delivery mode. Possible values:
See:
Default: |
priority | Optional | The producer's default priority. See: MessageProducer.setPriority
Default: |
time_to_live | Optional | 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:
Default: |
plugin | Optional | Java class of the plugin implementation (extends
Default: |
SystemMonitorNotification / Notification / NotificationObjects
One of the following elements must be nested inside a NotificationObjects
NotificationJMS
element:
Element | Element description | Description |
---|---|---|
ConnectionFactory | Optional | , once or more inside of NotificationObjects elementRestricts notifications for order or standalone jobs |
JobChain | Optional, once or more inside of NotificationObjects element | Restricts notifications for job chains |
TimerRef | Optional, once or more inside of 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
Support for standalone
jobs starting with
Jira | ||||||||
---|---|---|---|---|---|---|---|---|
|
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. |
or only once inside the NotificationJMS element | Specifies use of a JMS ConnectionFactory implementation | |
ConnectionJNDI | Optional or only once inside the NotificationJMS element | Specifies use of a JNDI properties file to create a JNDI IntialContextFactory |
JMS message:
Element | Element description | Description |
---|---|---|
Message | Required, only once inside of NotificationJMS element | Body of a JMS notification |
SystemMonitorNotification / Notification / NotificationMonitor / NotificationJMS / ConnectionFactory
Specifies use of a JMS ConnectionFactory implementation.
ConnectionFactory
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
java_class | Required | Java class of the JMS ConnectionFactory e.g.: |
user_name | Optional | The caller's user name |
password | Optional | The caller's password |
The following element can be nested inside a ConnectionFactory
element:
Element | Element description | Description |
---|---|---|
ConstructorArguments | Optional or only once inside of ConnectionFactory element |
SystemMonitorNotification / Notification / NotificationMonitor / NotificationJMS / ConnectionFactory / ConstructorArguments
The following elements can be nested inside a ConstructorArguments
element:
Element | Element description | Description |
---|---|---|
Argument | Required, multiple use allowed inside the ConstructorArguments element | JMS ConnectionFactory constructor argument |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<ConnectionFactory java_class="org.apache.activemq.ActiveMQConnectionFactory">
<ConstructorArguments>
<Argument type="java.lang.String"><![CDATA[tcp://localhost:61616]]></Argument>
</ConstructorArguments>
</ConnectionFactory>
...
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<ConnectionFactory java_class="org.apache.activemq.ActiveMQConnectionFactory">
<ConstructorArguments>
<Argument type="java.lang.String"><![CDATA[my_user_name]]></Argument>
<Argument type="java.lang.String"><![CDATA[my_password]]></Argument>
<Argument type="java.lang.String"><![CDATA[tcp://localhost:61616]]></Argument>
</ConstructorArguments>
</ConnectionFactory>
...
|
SystemMonitorNotification / Notification / NotificationMonitor / NotificationJMS / ConnectionFactory / ConstructorArguments / Argument
Argument
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
type | Required | Java type of a constructor argument. Possible values:
Default: |
The value of the constructor argument will be stored as CDATA
node.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Code Block | ||||||
| ||||||
... <Job<Argument notificationstype="2" name="test/my_job"/> ... <Job scheduler_id="scheduler_4444" /> ... <Job scheduler_id="scheduler_4444" name="test/my_.*" />java.lang.String"><![CDATA[tcp://localhost:61616]]></Argument> ... <Job name="test/my_job" return_code_from="5"/> ... <Job name="test/my_job" return_code_to="10"/> ... <Job name="test/my_job" return_code_from="5" return_code_to="5"/> ... |
SystemMonitorNotification / Notification / NotificationObjects / JobChain
|
SystemMonitorNotification / Notification / NotificationMonitor / NotificationJMS / ConnectionJNDI
Specifies use of a JNDI properties file to create a JNDI IntialContextFactory.
See: Connecting to the JMS Server by Using JNDI
ConnectionJNDI
JobChain
supports the following attributes:
Attribute | Usage | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
file | 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) | ||||||||||
Required | Path of the JNDI properties file | |||||||||||
lookup_name | Optional | Name to lookup JMS connection factory objects
Default: |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.provider.url=tcp://localhost:61616 |
SystemMonitorNotification / Notification / NotificationMonitor / NotificationJMS / Message
Body of a JMS notification.
SystemMonitorNotification / Notification / NotificationObjects
One of the following elements must be nested inside a NotificationObjects
element:
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 | ||||||
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_jobchainjob" return_code_to="10"/> ... <JobChain name= <!-- Send the job chain error, occurrent in the "test/my_jobchain" return_code_from="5" return_code_to="5"/> ... <JobChain name="test/my_jobchain" step_from="200"/> ... job chain, to the "JobScheduler Monitoring Errors" service. --> <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"/> ... </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
supports the following attributes:
...
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 scheduler_id | Optional | Corresponds with Timer name setting defined in the SystemMonitorNotification / Timer element | 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. | notify_on_error |
Optional Boolean | Send timer check notification when the configured job chain contains the error notifications. Default:false |
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... <Job notifications="2" name="test/my_job"/> ... <Job scheduler_id="scheduler_4444" /> ... <Job scheduler_id="scheduler_4444" name="test/my_.*" /> ... <Job name="test/my_job" return_code_from="5"/> ... <Job name="test/my_jobchain" /> </NotificationObjects> </Notification> <Notification> <NotificationMonitor service_name_on_error="JobScheduler Monitoring Performance"> ... </NotificationMonitor> <NotificationObjects> <!-- Sends the performance check error, occurring in the job" return_code_to="10"/> ... <Job name="test/my_jobchainjob" 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 / Timer
The following elements must be nested inside a Timer
element:
return_code_from="5" return_code_to="5"/>
...
|
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.
| ||||||||||||||
Element | Element description | Description | ||||||||||||||
TimerJob | Optional, once or more inside of Timer element | Restricts notifications for
| TimerJobChain | Optional, once or more inside of
| ||||||||||||
return_code_from | Optional | Restricts notifications for job chains for a particular return code range. | ||||||||||||||
return_code_from | Optional | Restricts notifications for job chains | ||||||||||||||
Minimum | Optional or once inside of Timer element | Minimum required execution time for job chains or selected job nodes. Allows script code to be executed that returns the minimum execution time in seconds. | ||||||||||||||
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) | Maximum | Optional or once inside of Timer element | Maximum 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 | ||||||
---|---|---|---|---|---|---|
| ||||||
<SystemMonitorNotification system_id="op5"> ... <JobChain notifications="2" name="test/my_jobchain"/> ... <Timer name<JobChain scheduler_id="myscheduler_timer_14444"> <TimerJobChain /> ... <JobChain scheduler_id="scheduler_4444" name="test/my_jobchain_1.*" /> <TimerJob ... <JobChain name="test/my_job_1" jobchain" return_code_from="5"/> ... <Maximum><Script language="javascript"><![CDATA[1000]]></Script></Maximum> </Timer> <Timer name="my_timer_2"> <TimerJobChain <JobChain name="test/my_jobchain" return_code_to="10"/> ... <JobChain name="test/my_jobchain" return_code_from="5" return_code_to="5"/> ... <JobChain name="test/my_jobchain" step_from="200"/> ... <JobChain name="test/my_jobchain_2" /> <TimerJobChain " step_to="500"/> ... <JobChain name="test/my_jobchain_3" /> <Minimum><Script language="javascript"><![CDATA[500]]></Script></Minimum> <Maximum><Script language="javascript"><![CDATA[1000]]></Script></Maximum> </Timer> </SystemMonitorNotification> " step_from="300" step_to="300"/> ... <JobChain name="test/my_jobchain" excluded_steps="200;300"/> ... |
SystemMonitorNotification / Notification / NotificationObjects / TimerRef
TimerRef supports Timer
support 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 | name | Required | Corresponds to Timer used in the SystemMonitorNotification / Notification / NotificationObjects / TimerRefTimer element.The name must be unique across all timers definitions. |
notify_on_error |
Optional Boolean | Send timer check notification when the configured job chain contains the error notifications. Default: |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
Code Block | ||||||
| ||||||
...
<Timer name="my_timer">
... |
SystemMonitorNotification / Timer / TimerJob
Jira server SOS JIRA columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 6dc67751-9d67-34cd-985b-194a8cdc9602 key JITL-401
TimerJob
support the following attributes:
Atribute | 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. |
name | Optional | Job name including possible folder names. Regular expression can be used.
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
... <TimerJob scheduler_id="scheduler_4444" /> ... <TimerJob scheduler_id="scheduler_4444"<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" /> </NotificationObjects> </Notification> ... <TimerJob name="test/my_job"/> <Notification> <NotificationMonitor service_name_on_error="JobScheduler Monitoring Performance"> ... |
SystemMonitorNotification / Timer / TimerJobChain
TimerJobChain
support the following attributes:
</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 / Timer
The following elements must be nested inside a Timer
element:
Element | Element description | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
TimerJob | Optional or multiple use allowed inside the Timer element | Restricts notifications for | ||||||||||
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. | ||||||||||
name | Optional | Job chain name including possible folder names. Regular expression can be used.
step_from | ||||||||||
TimerJobChain | Optional or multiple use allowed inside the Timer element | Restricts notifications for job chains | ||||||||||
Minimum | Optional or only once inside the Timer element | Minimum required execution time for job chains or selected job nodes. Allows script code to be executed that returns the minimum execution time in seconds. | ||||||||||
Maximum | Optional or only once inside the Timer element | Maximum allowed execution time for job chains or selected job nodes. Allows script code to be executed that returns the maximum execution time in seconds | Optional | Restricts checks for job chains to a sequence of job nodes that are specified with the step_from and step_to attributes. | step_to | Optional | Restricts checks for job chains to a sequence of job nodes that are specified with the step_from and step_to attributes. |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
... <TimerJobChain scheduler<SystemMonitorNotification system_id="scheduler_4444op5" /> ... <TimerJobChain scheduler_id <Timer name="schedulermy_timer_44441"> <TimerJobChain name="test/my_jobchain_.*1" /> ... <TimerJobChain <TimerJob name="test/my_jobchain" step_from="200"/> ... job_1" /> <Maximum><Script language="javascript"><![CDATA[1000]]></Script></Maximum> </Timer> <Timer name="my_timer_2"> <TimerJobChain name="test/my_jobchain_2" step_to="500"/> ... <TimerJobChain name="test/my_jobchain_3" step_from/> <Minimum><Script language="300" step_to="300"/> ... |
SystemMonitorNotification / Timer / Minimum
The following elements must be nested inside a Minimum
element:
javascript"><![CDATA[500]]></Script></Minimum>
<Maximum><Script language="javascript"><![CDATA[1000]]></Script></Maximum>
</Timer>
</SystemMonitorNotification> |
Timer
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
name | Required | Corresponds to Timer used in the The name must be unique across all timers definitions. |
Element | Element description | Description |
Script | Once inside of Minimum element | Script code in one of the supported languages
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
... <Timer name="my_timer"> ... <Minimum><Script language="javascript"><![CDATA[1000]]></Script></Minimum> </Timer> ... |
SystemMonitorNotification / Timer /
...
The following elements must be nested inside a Maximum
element:
...
TimerJob
Jira server SOS JIRA columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 6dc67751-9d67-34cd-985b-194a8cdc9602 key JITL-401
TimerJob
supports the following attributes:
Atribute | 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. |
name | Optional | Job name including possible folder names. Regular expression can be used.
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
... <Timer<TimerJob namescheduler_id="myscheduler_timer4444" /> ... <Maximum><Script language<TimerJob scheduler_id="javascript"><![CDATA[1000]]></Script></Maximum> </Timer>scheduler_4444" name="test/my_.*" /> ... <TimerJob name="test/my_job"/> ... |
SystemMonitorNotification / Timer /
...
TimerJobChain
TimerJobChain
...
Script
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
language | Required | Script language name Supported languages:
|
The Script element can contain:
- a fixed value
- a calculation based on the job/order parameters
Fixed value
...
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.
| ||||||||||
step_from | Optional | Restricts checks for job chains to a sequence of job nodes that are specified with the step_from and step_to attributes. | ||||||||||
step_to | Optional | Restricts checks for job chains to a sequence of job nodes that are specified with the step_from and step_to attributes. |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
... <Script language<TimerJobChain scheduler_id="javascript"><![CDATA[1000]]></Script> ... |
Calculation
The calculation is to result in the time in seconds for the specific Minimum
or Maximum
definition.
This example calculates the execution time depending on the ${file_size}
parameter that was set by a specific job (see the example below)´.
scheduler_4444" />
...
<TimerJobChain scheduler_id="scheduler_4444" name="test/my_.*" />
...
<TimerJobChain name="test/my_jobchain" step_from="200"/>
...
<TimerJobChain name="test/my_jobchain" step_to="500"/>
...
<TimerJobChain name="test/my_jobchain" step_from="300" step_to="300"/>
... |
SystemMonitorNotification / Timer / Minimum
The following elements must be nested inside a Minimum
element:
Element | Element description | Description |
---|---|---|
Script | Required, only once inside the Minimum element | Script code in one of the supported languages |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<Timer name="my_timer">
...
<Minimum><Script language="javascript"><![CDATA[1000]]></Script></Minimum>
</Timer>
... |
SystemMonitorNotification / Timer / Maximum
The following elements must be nested inside a Maximum
element:
Element | Element description | Description |
---|---|---|
Script | Required, only once inside the Maximum element | Script code in one of the supported languages |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<Timer name="my_timer">
...
<Maximum><Script language="javascript"><![CDATA[1000]]></Script></Maximum>
</Timer>
... |
SystemMonitorNotification / Timer / Minimum|Maximum / Script
Script
supports the following attributes:
Attribute | Usage | Description |
---|---|---|
language | Required | Script language name Supported languages:
|
The Script element can contain:
- a fixed value
- a calculation based on the job/order parameters
Fixed value
A fixed value is the time allowed in seconds for the specific Minimum
or Maximum
definition
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<Script language="javascript"><![CDATA[1000]]></Script>
... |
Calculation
The calculation is to result in the time in seconds for the specific Minimum
or Maximum
definition.
This example calculates the execution time depending on the ${file_size}
parameter that was set by a specific job (see the example below)´.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<Script language="javascript"><![CDATA[ | ||||||
Code Block | ||||||
| ||||||
... <Script language="javascript"><![CDATA[ function my_calculate(){ var fileSize = new java.lang.Double(${file_size}); var timerExpiryFactor = 0.0025; function my_calculate(){ var timerExpiryTolerance = timerExpiryFactor*0.1; var fileSize var timerExpiry = new java.lang.Double(timerExpiryFactor+timerExpiryTolerance${file_size}); timerExpiryvar timerExpiryFactor = 0.0025; var timerExpiryTolerance = timerExpirytimerExpiryFactor*fileSize0.1; returnvar timerExpiry = new java.lang.Double(timerExpiryFactor+timerExpiryTolerance); timerExpiry } = timerExpiry*fileSize; my_calculate(); ]]></Script> ... return timerExpiry; } my_calculate(); ]]></Script> ... |
This example job calculates and creates a new order parameter file_size
.
...
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 --> <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 --> <script java_class="com.sos.jitl.notification.jobs.result.StoreResultsJobJSAdapterClass" language="java"/> </monitor> <run_time /> </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 / NotificationInterfaceNotificationJMS / Message
The Message can contain:
- fixed Fixed values
- variablesVariables
Example: <![CDATA[ scheduler id = ${MON_N_SCHEDULER_ID} ]]>
...
- Table variables.
- Service variables.OS
- environment JOC Cockpit variables.JOC
- OS environment variables.
Table variables
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Table of the history of steps of processed orders / jobs.
|
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
service name = ${SERVICE_NAME} |
OS environment variables
All existing OS environment variables can be defined by message using the syntax %<variable name>%
(Windows) or $<variable name>
(Unix)
.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
%TEMP%/test.exe |
JOC Cockpit variables
Jira server SOS JIRA columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 6dc67751-9d67-34cd-985b-194a8cdc9602 key JS-1388
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<a href="${JOC_HREF_JOB_CHAIN}">${MON_N_JOB_CHAIN_NAME}</a> <a href="${JOC_HREF_ORDER}">${MON_N_ORDER_ID}</a> <a href="${JOC_HREF_JOB}">${MON_N_JOB_NAME}</a> |
...
...
language | xml |
---|---|
title | Message on error |
collapse | true |
...
OS environment variables
All existing OS environment variables can be defined by message using the syntax %<variable name>%
(Windows) or $<variable name>
(Unix)
.
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}), steps(${MON_SN_STEP_FROM} to ${MON_SN_STEP_TO}), order time elapsed = ${MON_N_ORDER_TIME_ELAPSED}s |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
name = ${MON_C_NAME}, scheduler id=${MON_N_SCHEDULER_ID}, history id=${MON_N_ORDER_HISTORY_ID}, job_chain=${MON_N_JOB_CHAIN_NAME}(${MON_N_ORDER_ID}), steps(${MON_C_STEP_FROM} to ${MON_C_STEP_TO}), check = ${MON_C_CHECK_TEXT} |
Notification environment variables
The default SystemNotifierProcessBuilderPlugin
plugin used by the SystemMonitorNotification / Notification / NotificationCommand
element sets the following variables as environment variables:
Table variables
Service variables
These variables can be used when the NotificationCommand calls the notification client - not directly but via a shell script that makes the logical implementation for sending the notification messages.
Table variables
Expand | ||
---|---|---|
| ||
All table variables (see
e.g.:
|
Service variables
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
%TEMP%/test.exe |
Notification environment variables
The default SystemNotifierProcessBuilderPlugin
plugin used by the SystemMonitorNotification / Notification / NotificationCommand
element sets the following variables as environment variables:
Table variables
Service variables
These variables can be used when the NotificationCommand calls the notification client - not directly but via a shell script that makes the logical implementation for sending the notification messages.
Table variables
Expand | ||
---|---|---|
| ||
All table variables (see
e.g.:
|
Service variables
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
1) configured command in the SystemMonitorNotification_<MonitorSystem>.xml file
<NotificationCommand><![CDATA[/tmp/command.sh]</NotificationCommand>
2) content of the /tmp/command.sh file
#! /bin/sh
# Note: "> /tmp/command_output.txt" is used to simulate the starting of the notification client
#
echo "$SCHEDULER_MON_SERVICE_NAME:$SCHEDULER_MON_SERVICE_STATUS:$SCHEDULER_MON_SERVICE_MESSAGE_PREFIX history id = $SCHEDULER_MON_TABLE_MON_N_ORDER_HISTORY_ID" > /tmp/command_output.txt
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
1) configured command in the SystemMonitorNotification_<MonitorSystem>.xml file
<NotificationCommand><![CDATA[/tmp/command.sh]</NotificationCommand>
2) content of the /tmp/command.sh file
#! /bin/sh
# Note: "> /tmp/command_output.txt" is used to simulate the starting of the notification client
#
echo "$SCHEDULER_MON_SERVICE_NAME:$SCHEDULER_MON_SERVICE_STATUS:$SCHEDULER_MON_SERVICE_MESSAGE_PREFIX history id = $SCHEDULER_MON_TABLE_MON_N_ORDER_HISTORY_ID" > /tmp/command_output.txt
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
1) configured command in the SystemMonitorNotification_<MonitorSystem>.xml file
<NotificationCommand><![CDATA[C:/Temp/command.cmd]</NotificationCommand>
2) content of the C:/Temp/command.cmd file
rem Note: "> C:/Temp/command_output.txt" is used to simulate the starting of the notification client
rem
echo %SCHEDULER_MON_SERVICE_NAME%:%SCHEDULER_MON_SERVICE_STATUS%:%SCHEDULER_MON_SERVICE_MESSAGE_PREFIX% history id = %SCHEDULER_MON_TABLE_MON_N_ORDER_HISTORY_ID% > C:/Temp/command_output.txt
|
Examples
Examples op5
NotificationInterface
The following is an except from an XML file used to notify a specific System Monitor (op5 Monitor) via the NotificationInterface:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<!--
monitor_host The hostname or ip address of System Monitor host
monitor_port The TCP port that the System Monitor would listen to
monitor_encryption Encryption algorithm
service_host The host that executes the passive check. The name must match the corresponding setting in the System Monitor
{MON_N_SCHEDULER_ID} See explanation "Table variables"
...
-->
<NotificationInterface monitor_host="monitor_host" monitor_port="5667" monitor_encryption="XOR" service_host="service_host"><![CDATA[
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}
]]></NotificationInterface>
... |
...
The following is an except from an XML file used to notifying a specific System Monitor (op5 Monitor) via the NotificationCommand on Windows:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<!--
service_host The host that executes the passive check. The name must match the corresponding setting in the System Monitor.
monitor_host The hostname or ip address of System Monitor host.
{SERVICE_NAME} See explanation "Service variables"
{SERVICE_STATUS} See explanation "Service variables"
{SERVICE_MESSAGE_PREFIX} See explanation "Service variables"
{MON_N_SCHEDULER_ID} See explanation "Table variables"
...
NotificationCommand after substitution (error case):
<![CDATA[echo service_host:JobScheduler Monitoring Errors:2:ERROR scheduler id=scheduler_4444, history id=123, job_chain=test/my_jobchain(order_id), step=100, error=error occurred | D:\nsca\send_nsca.exe -H monitor_host -c D:\nsca\send_nsca.cfg -d : ]]>
NotificationCommand after substitution (recovery case):
<![CDATA[echo service_host:JobScheduler Monitoring Errors:0:RECOVERED scheduler id=scheduler_4444, history id=123, job_chain=test/my_jobchain(order_id), step=100, error=error occurred | D:\nsca\send_nsca.exe -H monitor_host -c D:\nsca\send_nsca.cfg -d : ]]>
NotificationCommand after substitution (success case):
<![CDATA[echo service_host:JobScheduler Monitoring Success:0:scheduler id=scheduler_4444, history id=123, job_chain=test/my_jobchain(order_id), step=100, error= | D:\nsca\send_nsca.exe -H monitor_host -c D:\nsca\send_nsca.cfg -d : ]]>
-->
<NotificationMonitor service_name_on_error="JobScheduler Monitoring Errors" service_name_on_success="JobScheduler Monitoring Success">
<NotificationCommand><![CDATA[echo service_host:${SERVICE_NAME}:${SERVICE_STATUS}:${SERVICE_MESSAGE_PREFIX}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:\nsca\send_nsca.exe -H monitor_host -c D:\nsca\send_nsca.cfg -d : ]]>
</NotificationCommand>
</NotificationMonitor>
... |
...
NotificationCommand
The following is an except from an XML file used to notify a specific System Monitor (Zabbix Monitor) and using NotificationCommand
...
language | xml |
---|---|
title | SystemMonitorNotification_zabbix.xml |
collapse | true |
...
| |||
1) configured command in the SystemMonitorNotification_<MonitorSystem>.xml file
<NotificationCommand><![CDATA[C:/Temp/command.cmd]</NotificationCommand>
2) content of the C:/Temp/command.cmd file
rem Note: "> C:/Temp/command_output.txt" is used to simulate the starting of the notification client
rem
echo %SCHEDULER_MON_SERVICE_NAME%:%SCHEDULER_MON_SERVICE_STATUS%:%SCHEDULER_MON_SERVICE_MESSAGE_PREFIX% history id = %SCHEDULER_MON_TABLE_MON_N_ORDER_HISTORY_ID% > C:/Temp/command_output.txt
|
Examples
Anchor | ||||
---|---|---|---|---|
|
Message on error
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}), step=${MON_N_ORDER_STEP_STATE}, error=${MON_N_ERROR_TEXT} |
Message on success
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}), steps(${MON_SN_STEP_FROM} to ${MON_SN_STEP_TO}), order time elapsed = ${MON_N_ORDER_TIME_ELAPSED}s |
Message on performance check (Timer)
Code Block | ||
---|---|---|
| ||
name = ${MON_C_NAME}, scheduler id=${MON_N_SCHEDULER_ID}, history id=${MON_N_ORDER_HISTORY_ID}, job_chain=${MON_N_JOB_CHAIN_NAME}(${MON_N_ORDER_ID}), steps(${MON_C_STEP_FROM} to ${MON_C_STEP_TO}), check = ${MON_C_CHECK_TEXT} |
Examples System Monitoring
Anchor example_op5 example_op5
NotificationInterface ( Nagios / OP5 )
example_op5 | |
example_op5 |
The following is an except from an XML file used to notify a specific System Monitor (op5 Monitor) via the NotificationInterface:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<!--
monitor_host The hostname or ip address of System Monitor host
monitor_port The TCP port that the System Monitor would listen to
monitor_encryption Encryption algorithm
service_host The host that executes the passive check. The name must match the corresponding setting in the System Monitor
{MON_N_SCHEDULER_ID} See explanation "Table variables"
...
-->
<NotificationInterface monitor_host="monitor_host" monitor_port="5667" monitor_encryption="XOR" service_host="service_host"><![CDATA[
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}
]]></NotificationInterface>
... |
NotificationCommand ( Nagios / OP5 )
The following is an except from an XML file used to notifying a specific System Monitor (op5 Monitor) via the NotificationCommand on Windows:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<!--
service_host The host that executes the passive check. The name must match the corresponding setting in the System Monitor.
monitor_host The hostname or ip address of System Monitor host.
{SERVICE_NAME} See explanation "Service variables"
{SERVICE_STATUS} See explanation "Service variables"
{SERVICE_MESSAGE_PREFIX} See explanation "Service variables"
{MON_N_SCHEDULER_ID} See explanation "Table variables"
...
NotificationCommand after substitution (error case):
<![CDATA[echo service_host:JobScheduler Monitoring Errors:2:ERROR scheduler id=scheduler_4444, history id=123, job_chain=test/my_jobchain(order_id), step=100, error=error occurred | D:\nsca\send_nsca.exe -H monitor_host -c D:\nsca\send_nsca.cfg -d : ]]>
NotificationCommand after substitution (recovery case):
<![CDATA[echo service_host:JobScheduler Monitoring Errors:0:RECOVERED scheduler id=scheduler_4444, history id=123, job_chain=test/my_jobchain(order_id), step=100, error=error occurred | D:\nsca\send_nsca.exe -H monitor_host -c D:\nsca\send_nsca.cfg -d : ]]>
NotificationCommand after substitution (success case):
<![CDATA[echo service_host:JobScheduler Monitoring Success:0:scheduler id=scheduler_4444, history id=123, job_chain=test/my_jobchain(order_id), step=100, error= | D:\nsca\send_nsca.exe -H monitor_host -c D:\nsca\send_nsca.cfg -d : ]]>
-->
<NotificationMonitor service_name_on_error="JobScheduler Monitoring Errors" service_name_on_success="JobScheduler Monitoring Success">
<NotificationCommand><![CDATA[echo service_host:${SERVICE_NAME}:${SERVICE_STATUS}:${SERVICE_MESSAGE_PREFIX}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:\nsca\send_nsca.exe -H monitor_host -c D:\nsca\send_nsca.cfg -d : ]]>
</NotificationCommand>
</NotificationMonitor>
... |
Anchor example_zabbix example_zabbix
NotificationCommand ( Zabbix )
example_zabbix | |
example_zabbix |
The following is an except from an XML file used to notify a specific System Monitor (Zabbix Monitor) and using NotificationCommand
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<!--
zabbix_sender Zabbix sender installed on the JobScheduler host
localhost Hostname of the zabbix server
Zabbix_server JobScheduler Agent name(host name) that registred on Zabbix
samples.job1 Item key of zabbix (replace "/" to "." of JOB_NAME
${MON_N_ERROR_TEXT} See explanation "Table variables"
-->
<NotificationCommand>
<![CDATA[zabbix_sender -z localhost -s zabbix_server -k samples.job1 -o ${MON_N_ERROR_TEXT}]]>
</NotificationCommand>
... |
Examples Mail
NotificationMail content_type="text/html"
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<NotificationMail content_type="text/html" charset="ISO-8859-1" encoding="7bit" priority="Normal">
<From><![CDATA[jobscheduler@sos-berlin.com]]></From>
<To><![CDATA[spam@sos-berlin.com]]></To>
<Subject><![CDATA[JobScheduler notification: ${SERVICE_MESSAGE_PREFIX}, job chain executed with errors: ${MON_N_JOB_CHAIN_NAME}]]></Subject>
<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">Order History</th>
</tr>
<tr>
<td>Time elapsed</td><td>${MON_N_ORDER_TIME_ELAPSED}</td><td> </td><td> </td>
</tr>
<tr>
<td>Start Time</td><td>${MON_N_ORDER_START_TIME}</td>
<td>End Time</td><td>${MON_N_ORDER_END_TIME}</td>
</tr>
<tr>
<th colspan="4">Order Step History</th>
</tr>
<tr>
<td>State</td><td>${MON_N_ORDER_STEP_STATE}</td>
<td>Time elapsed</td><td>${MON_N_ORDER_STEP_TIME_ELAPSED}</td>
</tr>
<tr>
<td>Start Time</td><td>${MON_N_ORDER_STEP_START_TIME}</td>
<td>End Time</td><td>${MON_N_ORDER_STEP_END_TIME}</td>
</tr>
</table>]]></Body>
</NotificationMail>
... |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<NotificationMail content_type="text/html" charset="ISO-8859-1" encoding="7bit" priority="Normal">
<From><![CDATA[jobscheduler@sos-berlin.com]]></From>
<To><![CDATA[spam@sos-berlin.com]]></To>
<Subject><![CDATA[JobScheduler notification: job chain successfully completed: ${MON_N_JOB_CHAIN_NAME}]]></Subject>
<Body><![CDATA[<style type="text/css">
.tg {border-collapse:collapse;border-spacing:0;border-color:#aaa;}
.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:#aaa;color:#333;background-color:#fff;}
.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:#aaa;color:#fff;background-color:#f38630;}
</style>
<table class="tg">
<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>
<th colspan="4">Order History</th>
</tr>
<tr>
<td>Time elapsed</td><td>${MON_N_ORDER_TIME_ELAPSED}</td><td> </td><td> </td>
</tr>
<tr>
<td>Start Time</td><td>${MON_N_ORDER_START_TIME}</td>
<td>End Time</td><td>${MON_N_ORDER_END_TIME}</td>
</tr>
</table>]]></Body>
</NotificationMail>
... |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<NotificationMail content_type="text/html" charset="ISO-8859-1" encoding="7bit" priority="Normal">
<From><![CDATA[jobscheduler@sos-berlin.com]]></From>
<To><![CDATA[spam@sos-berlin.com]]></To>
<Subject><![CDATA[JobScheduler notification: ${SERVICE_MESSAGE_PREFIX}, job executed with errors: ${MON_N_JOB_NAME}]]></Subject>
<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>
</NotificationMail>
... |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<NotificationMail content_type="text/html" charset="ISO-8859-1" encoding="7bit" priority="Normal">
<From><![CDATA[jobscheduler@sos-berlin.com]]></From>
<To><![CDATA[spam@sos-berlin.com]]></To>
<Subject><![CDATA[JobScheduler notification: job successfully completed: ${MON_N_JOB_NAME}]]></Subject>
<Body><![CDATA[<style type="text/css">
.tg {border-collapse:collapse;border-spacing:0;border-color:#aaa;}
.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:#aaa;color:#333;background-color:#fff;}
.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:#aaa;color:#fff;background-color:#f38630;}
</style>
<table class="tg">
<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>
</NotificationMail>
... |
JobScheduler - Store parameters to database
...
- Some System Monitors may provide an "acknowledge" operation, that signaling has known problem.
- Should an "acknowledge" operation have been performed for a specific service in the System Monitor then job chain
ResetNotifications
would stop JobScheduler from sending notifications for that service for errors that have already occurred. - Do not configure the order run time for this job chain, as job chain will be triggered by the System Monitor's "acknowledge" operation via add_order XML command.
Examples
Example ResetNotifications <add_order> XML command
...