Versions Compared

Key

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

...

Location: <scheduler_install>/config/notification

FileDescription
SystemMonitorNotification_v1.0.xsd

XML Schema file that define which values are allowed in your XML files for the JobScheduler monitoring.

That means, you just have to modify your SystemMonitorNotification_<MonitorSystem>.xml files in order to configure the JobScheduler objects you want to monitor and which System Monitor you want to use for that goal, but the XML schemas do not have to be modified.

SystemMonitorNotification_<MonitorSystem>.xml

 Configuration file for each System Monitor.

  • Specifies delivery way to System Monitor.
  • Specifies notification for error or success conditions
  • Specifies notification for checks of measure the performance of JobScheduler objects
 

SystemMonitorNotificationTimers.xml

Configuration file for all System Monitors.

  • Specifies notification for checks of measure the performance of JobScheduler objects

This file is optional and must contains only the definitions of the SystemMonitorNotification/Timer elements.

...

ElementElement descriptionDescription
SystemMonitorNotificationTop Level ElementConfiguration for Notifications to a System Monitor
NotificationOnce or more inside a SystemMonitorNotification elementSpecifies a System Monitor notification that includes a command line invocation and the JobScheduler objects
TimerOptional, once or more inside a SystemMonitorNotification elementPerformance measurement definition
SystemMonitorNotification

SystemMonitorNotification support the following attributes:

...

AttributeUsageDescription
system_idrequired

System Monitor identifier.

See System Monitor personalization 

...

The following elements may be nested inside a Notification element:

ElementElement descriptionDescription
NotificationMonitorOnce inside a Notification elementSpecifies the System Monitor interface that is being used for messages: either by a Plugin Interface or by command line invocation
NotificationObjectsOnce inside a Notification elementSpecifies the JobChains and the Timers definitions
SystemMonitorNotification / Notification / NotificationMonitor

NotificationMonitor support the following attributes:

...

AttributeUsageDescription
service_name_on_errorOptionalThis setting specifies the service that is configured in the Service Monitor for messages of job runs with errors and for job recovery messages. The service name must match the corresponding setting in the System Monitor.
service_name_on_successOptionalThis setting specifies the service that is configured in the Service Monitor for receiving informational messages on successful job runs. The service name must match the corresponding setting in the System Monitor
service_status_on_errorOptional

This setting specifies the service status code for error messages.

Default: CRITICAL

service_status_on_successOptional

This setting specifies the service status code for success messages

Default: OK

Code Block
languagexml
titleExample
collapsetrue
<!--
Example OP5
NSCA Status:
0 - OK
1 - WARNING
2 - CRITICAL
3 - UNKNOWN
-->
...
<!--
Sending occurred errors as CRITICAL (default)
-->
<NotificationMonitor service_name_on_error="JobScheduler Errors">
...
<!--
Sending occurred errors as WARNING
-->
<NotificationMonitor service_name_on_error="JobScheduler Errors" service_status_on_error="1">
...        

One of the following elements must be nested inside a NotificationMonitor element:

ElementElement descriptionDescription
NotificationInterfaceOptional, once inside of NotificationMonitor elementPlugin Interface to be executed for System Monitor notification
NotificationCommandOptional, once inside of NotificationMonitor elementCommand line to be executed for System Monitor notification

...

SystemMonitorNotification / Notification / NotificationMonitor / NotificationInterface

NotificationInterface support the following attributes:

AttributeUsageDescription
monitor_hostRequiredThis setting specifies the hostname or ip address of System Monitor host.
monitor_portRequiredThis setting specifies the TCP port that the System Monitor would listen to.
monitor_passwordOptional 
monitor_connection_timeoutOptional 
monitor_response_timeoutOptional 
monitor_encryptionOptional

This setting specifies that the communication with the System Monitor is encrypted. By default no encryption is used.

  • NONE               - no encryption
  • XOR             - XOR encryption
  • TRIPLE_DES - use of triple des algorhythm for encryption
service_hostOptionalThis setting specifies the name of the host that executes the passive check. The name must match the corresponding setting in the System Monitor.
pluginOptionalDefault: com.sos.scheduler.notification.plugins.notifier.SystemNotifierSendNscaPlugin
Code Block
languagexml
titleExample
collapsetrue
...
<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>
...
SystemMonitorNotification / Notification / NotificationMonitor / NotificationCommand

NotificationCommand support the following attributes:

AttributeUsageDescription
pluginOptionalDefault: com.sos.scheduler.notification.plugins.notifier.SystemNotifierProcessBuilderPlugin
Code Block
languagexml
titleExample
collapsetrue
...
<NotificationCommand><![CDATA[
echo scheduler id=%MON_N_SCHEDULER_ID%, history id=%MON_N_ORDER_HISTORY_ID%, job_chain=%MON_N_JOB_CHAIN_NAME%(%MON_N_ORDER_ID%), step =%MON_N_ORDER_STEP_STATE%, error=%MON_N_ERROR_TEXT% > D://errors.txt
]]></NotificationCommand>
...

...

One of the following elements must be nested inside a NotificationObjects element:

ElementElement descriptionDescription
JobChainOptional, once or more inside of NotificationObjects elementRestricts notifications for job chains
TimerOptional, once or more inside of NotificationObjects elementRestricts notifications for job checks (Timer)
SystemMonitorNotification / Notification / NotificationObjects / JobChain

JobChain support JobChain support the following attributes:

AttributeUsageDescription
notifications

Optional

Integer

Specifies the number of notifications that are sent to a System Monitor.

Default: 1

scheduler_idOptional

Notifications are restricted to the JobScheduler instance with the given identification. By default notifications will be sent for all JobScheduler instances that would log into the same database.

Regular expression can be used.

nameOptional

Job chain name including possible folder names.

Regular expression can be used.

step_fromOptionalRestricts notifications for job chains to a sequence of job nodes that are specified with the step_from and step_to attributes.
step_toOptionalRestricts notifications for job chains to a sequence of job nodes that are specified with the step_from and step_to attributes.
excluded_stepsOptionalSpecifies the steps which will be excluded from the analysing (separated by semicolon)

...

AttributeUsageDescription
notifications

Optional

Integer

Specifies the number of notifications that are sent to a System Monitor.

Default: 1

 name nameOptionalCorrespondence to Timer defined in the SystemMonitorNotification / Timer element
 notify_on_error

Optional

Boolean

Send timer check notification if the error ocurred in the configured timer job chain (steps)

Default: false

SystemMonitorNotification / Timer 

The following elements must be nested inside a NotificationObjects element:

ElementElement descriptionDescription
JobChainOnce or more inside of Timer elementRestricts notifications for job chains
MinimumOptional or once inside of Timer elementMinimum required time consumption for job or job chain execution. Allows script code to be executed that returns the minimum execution time required in seconds.
MaximumOptional or once inside of Timer elementMaximum allowed time consumption for job or job chain execution. Allows script code to be executed that returns the maximum execution time required in seconds.

 

Timer support the following attributes:

AttributeUsageDescription
 name nameRequired

Correspondence to Timer used in the SystemMonitorNotification / Notification / NotificationObjects / Timer element.

The name must be unique across all timers definitions.

SystemMonitorNotification / Timer / JobChain

JobChain support JobChain support the following attributes:

AttributeUsageDescription
 scheduler scheduler_idOptional Notifications are restricted to the JobScheduler instance with the given identification. By default notifications will be sent for all JobScheduler instances that would log into the same database.
 name nameOptional Job chain name including possible folder names
 step step_fromOptional Restricts checks for job chains to a sequence of job nodes that are specified with the step_from and step_to attributes.
 step step_toOptional Restricts checks for job chains to a sequence of job nodes that are specified with the step_from and step_to attributes.
SystemMonitorNotification / Timer / Minimum

The following elements must be nested inside a Minimum element:

ElementElement descriptionDescription
ScriptOnce inside of Minimum elementScript code in one of the supported languages

...

The following elements must be nested inside a Maximum element:

ElementElement descriptionDescription
ScriptOnce inside of Maximum elementScript code in one of the supported languages
SystemMonitorNotification / Timer / Minimum|Maximum / Script

 

Script support Script support the following attributes:

AttributeUsageDescription
 language languageRequired

Script language name

Supported languages:

  • javascript
  • ECMAScript 

Message

Usage

The Message sended to System Monitor can be configured as CDATA element on the following parent nodes:

...

Tables variables 
Expand
titleTable Variables: table SCHEDULER_MON_NOTIFICATIONS
NameDescription 
%MON_N_ID% 
%MON_N_SCHEDULER_ID%  
%MON_N_TASK_ID% 
%MON_N_STEP% STEP%  
%MON_N_ORDER_HISTORY_ID%  
%MON_N_JOB_CHAIN_NAME% NAME%  
%MON_N_JOB_CHAIN_TITLE% 
%MON_N_ORDER_ID%  
%MON_N_ORDER_TITLE%  
%MON_N_ORDER_START_TIME% TIME%  
%MON_N_ORDER_END_TIME%  
%MON_N_ORDER_TIME_ELAPSED%  
%MON_N_ORDER_STEP_STATE%  
%MON_N_ORDER_STEP_START_TIME% 
%MON_N_ORDER_STEP_END_TIME%  
%MON_N_JOB_NAME% 
%MON_N_JOB_TITLE% TITLE%  
%MON_N_TASK_START_TIME% 
%MON_N_TASK_END_TIME%  
%MON_N_TASK_TIME_ELAPSED% ELAPSED%  
%MON_N_RECOVERED%  
%MON_N_ERROR% 
%MON_N_ERROR_CODE%  
%MON_N_ERROR_TEXT% 
%MON_N_CREATED%  
%MON_N_MODIFIED% 

 

Code Block
languagexml
titleExample
collapsetrue
 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
titleTable Variables: table SCHEDULER_MON_SYSNOTIFICATIONS
NameDescription
%MON_SN_ID% 
%MON_SN_NOTIFICATION_ID% 
%MON_SN_CHECK_ID% 
%MON_SN_SYSTEM_ID%  
%MON_SN_SERVICE_NAME% 
%MON_SN_STEP_FROM% 
%MON_SN_STEP_TO% 
%MON_SN_STEP_FROM_START_TIME% 
%MON_SN_STEP_TO_END_TIME% 
%MON_SN_STEP_TIME_ELAPSED% ELAPSED%  
%MON_SN_NOTIFICATIONS% 
%MON_SN_MAX_NOTIFICATIONS% 
%MON_SN_ACKNOWLEDGED% 
%MON_SN_RECOVERED% 
%MON_SN_SUCCESS% 
%MON_SN_CREATED% 
%MON_SN_MODIFIED% 
Code Block
languagexml
titleExample
collapsetrue
 step from = %MON_SN_STEP_FROM%, step to = %MON_SN_STEP_TO%, notification = %MON_SN_NOTIFICATIONS% (of %MON_SN_MAX_NOTIFICATIONS%)
Expand
titleTable Variables: table SCHEDULER_MON_CHECKS
NameDescription
%MON_C_ID% 
%MON_C_NOTIFICATION_ID% 
%MON_C_NAME% 
%MON_C_STEP_FROM% FROM%  
%MON_C_STEP_TO% 
%MON_C_STEP_FROM_START_TIME%  
%MON_C_STEP_TO_END_TIME%  
%MON_C_STEP_TIME_ELAPSED% ELAPSED%  
%MON_C_CHECK_TEXT%  
%MON_C_CREATED% 
%MON_C_MODIFIED% 
Code Block
languagexml
titleExample
collapsetrue
 timer name = %MON_C_NAME%, text = %MON_C_CHECK_TEXT%
Service variables
Expand
titleVariables
NameDescription
%SERVICE_NAME% 
%SERVICE_STATUS% 
%SERVICE_MESSAGE_PREFIX% 
Code Block
languagexml
titleExample
collapsetrue
 service name = %SERVICE_NAME%

...

Expand
titleVariables
NameDescription

SCHEDULER_MON_SERVICE_STATUS

 

SCHEDULER_MON_SERVICE_NAME

 

SCHEDULER_MON_SERVICE_MESSAGE_PREFIX

 

SCHEDULER_MON_SERVICE_COMMAND

 
Tables variables
Expand
titleVariables

All tables variables (see tables variables explanation) have the prefix

SCHEDULER_MON_TABLE_

e.g.:

SCHEDULER_MON_TABLE_MON_N_ID

SCHEDULER_MON_TABLE_MON_N_SCHEDULER_ID

...

...