...
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> ... |
...
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> ... |
...
- set the
scheduler_notification_result_parameters
parameter (see job documentationjobs/JobSchedulerNotificationStoreResultsJob.xml
) - set the
StoreResultsJobJSAdapterClass
as monitor- JobScheduler version 1.9.x, 1.10.x
com.sos.scheduler.notification.jobs.result.StoreResultsJobJSAdapterClass
JobScheduler version 1.11.x
com.sos.jitl.notification.jobs.result.StoreResultsJobJSAdapterClass
- JobScheduler version 1.9.x, 1.10.x
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="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 com.sos.scheduler.notification.jobs.result.StoreResultsJobJSAdapterClass as 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> |
...
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 variablesenvironment variables
The defaultThe default com.sos.scheduler.notification.plugins.notifier. SystemNotifierProcessBuilderPlugin
plugin used by the SystemMonitorNotification / Notification / NotificationCommand
element sets the following variables as environment variables:
...
The following job chains are provided and should be configured accordingly:
sos / notification / CheckHistory (JobScheduler version 1.9.x, 1.10.x)
See <scheduler_install>/jobs/JobSchedulerNotificationCheckHistoryJob.xml
- This is the main job that analyze the JobScheduler history tables und write results into the notification tables.
- Job read all history entries for the job chains, configured in the
SystemMonitorNotification
XML files. - Job execute the performance checks for the defined
Timers
Check
configure repeat interval for order run time, e.g. every two minutes.the notification tables.- Job read all history entries for the job chains, configured in the
SystemMonitorNotification
XML files. - Job execute the performance checks for the defined
Timers
- Job read all history entries for the job chains, configured in the
- Order
Check
- configure repeat interval for order run time, e.g. every two minutes.
sos / notification / CheckHistory (JobScheduler version 1.11.x)
- Job chain removed
Set param
sos.use_notification true (config/scheduler.xml)
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
...
<spooler>
<config ...>
<params>
...
<param name="sos.use_notification" value="true"/>
...
</spooler> |
sos / notification / SystemNotifier
...
- Sends notifications to a specific System Monitor.
- Order
MonitorSystem
- JobScheduler version 1.9.x, 1.10.x
- configures a repeat interval for the order run time that is not less than the interval that has been chosen for triggering the job chain
sos/notification/CheckHistory
- configures a repeat interval for the order run time that is not less than the interval that has been chosen for triggering the job chain
- JobScheduler version 1.9.x, 1.10.x
sos / notification / CleanupNotifications
...
Jira | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|