...
XML Schemas and XML files (see examples below) have to be placed together at \config\notification
. The schemas are the ones that define which values are allowed in your XML files for the JobScheduler monitoring. That means, you just have to modify your 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.
Schema:
...
SystemMonitorNotification_v1.0.xsd
Description:
- Specifies the JobScheduler objects that should be monitored for error and success conditions:
- Jobs, Job Chains and Orders eligible for monitoring.
- The monitoring of JobScheduler objects is independent from the System Monitor that will be used and applies to all notifications to System Monitors.
- For settings that are specific for notifications see the below configuration for System Monitors => Link
- Specifies notification for error or success conditions
- Specifies notification for checks of Specifies checks to measure the performance of JobScheduler objects:
- Timers checks if timeouts for job and job chain execution have been exceeded or expired.
Example: CheckHistoryConfiguration.xml
Here you go an example of an XML file used for the monitoring of a specific JobChain:
...
language | xml |
---|
...
Example SystemMonitorNotification_op5.xml
The configuration element descriptions are organized into the following major categories:
Element | Element description | Description |
---|---|---|
SystemMonitorNotification | Top Level Element | Configuration for Notifications to a System Monitor |
Notification | Once or more inside a SystemMonitorNotification element | Specifies a System Monitor notification that includes a command line invocation and the JobScheduler objects |
Timer | Optional, once or more inside a SystemMonitorNotification element | Performance measurement definition |
SystemMonitorNotification
SystemMonitorNotification support the following attributes:
Attribute | Usage | Description |
---|---|---|
id | required |
Example:
<SystemMonitorNotification id="OP5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
...
xsi:noNamespaceSchemaLocation="
...
SystemMonitorNotification_v1.0.xsd">
...
Notification
The following elements may be nested inside a Notification element:
Element | Element description | Description |
---|---|---|
NotificationMonitor | Once inside a Notification element | Specifies the System Monitor interface that is being used for messages: either by a Plugin Interface or by command line invocation (requires NCSA client installation) |
NotificationObjects | Once inside a Notification element | Specifies the JobChains and the Timers definitions |
Explanation
- MonitoredObject/JobChains (optional) can contain several JobChain definitions for monitoring of error or success conditions
- JobChain (required) has the following attributes (one of scheduler_id or name must be set):
- scheduler_id (optional) - JobScheduler instance with the given identification. By default - JobChain will be checked in all JobScheduler instances that logged into the same database
- name (optional) - Job chain name including possible folder names. By default - all JobChains for defined scheduler_id are checked
- The
*
sign can be used to define wildcards (missing letters) both before and after the pattern- Filtering implemented on the Database side (LIKE condition)
- The
- restriction (optional) - Restrictions to filtering the job names
- restriction can be used as the next filtering step after the preselection from the database by using wildcards in the name attribute was defined.
- Filtering implemented on the Java side (Regular Expression)
- restriction can be used as the next filtering step after the preselection from the database by using wildcards in the name attribute was defined.
name wildcards & restrictions are not implemented yet and the implementation is under discussion
Status colour Yellow title TODO Attribute: name Attribute: restriction Output Description samples* samples/sample_jobChain_1
samples/sample_jobChain_2
samples/sample_jobChain_A
samples/sample_jobChain_B
job chain names starting with samples
*_jobChain_1 samples/sample_jobChain_1
job chain names ending with _jobChain_1
*_jobChain_* samples/sample_jobChain_1
samples/sample_jobChain_2
samples/sample_jobChain_A
samples/sample_jobChain_B
job chain names containing _jobChain_
samples* .*[0-9]{1}$ samples/sample_jobChain_1
samples/sample_jobChain_2
- preselection from the database by using wildcard in the name attribute
- filtering of the preselection by using of the restriction attribute
job chain names (from preselection) starting with any character and ending with 1 digit character*_jobChain_* ^samples/.*[A-Z]$ samples/sample_jobChain_A
samples/sample_jobChain_B
- preselection from the database by using wildcards in the name attribute
- filtering of the preselection by using of the restriction attribute
job chain names (from preselection) starting with
samples
and ending with a letter character- step_from (optional) - Start Job node name for checking
- step_to (optional) - End Job node name for checking
- JobChain (required) has the following attributes (one of scheduler_id or name must be set):
- MonitoredObject/Timers (optional) can contain several Timer definitions for performance measurement
- Timer (required) has the following elements
- JobChains (optional) - can contain several JobChain definitions for performance measurement
- JobChain (required) has the following attributes (one of scheduler_id or name must be set):
- scheduler_id (optional) - JobScheduler instance with the given identification. By default - JobChain will be checked in all JobScheduler instances that logged into the same database
- name (optional) - Job chain name including possible folder names. By default - all JobChains for defined scheduler_id are checked
- step_from (optional) - Start Job node name for checking
- step_to (optional) - End Job node name for checking
- JobChain (required) has the following attributes (one of scheduler_id or name must be set):
- Minimum (optional) - expected minimum execution time for all configured job chains in the MonitoredObject/Timers/Timer/JobChains
- Script (required) - definition of the expected minimum value and has the following attributes
- language (required) - script engine. currently javascript engine will be supported
- Script (required) - definition of the expected minimum value and has the following attributes
- Maximum (optional) - expected maximum execution time for all configured job chains in the MonitoredObject/Timers/Timer/JobChains
- Script (required) - definition of the expected maximum value and has the following attributes
- language (required) - script engine. currently javascript engine will be supported
- Script (required) - definition of the expected maximum value and has the following attributes
- JobChains (optional) - can contain several JobChain definitions for performance measurement
- Timer (required) has the following elements
Sample Timer configuration using order parameter to calculate expected execution time
Code Block | ||
---|---|---|
| ||
....
<!-- configure check for performance measurement -->
<Timer>
<!--
configure job chains and expected maximum execution time for performance measurement
impact: if the execution time of current order in job chain samples/sample_jobChain_1 is greater as calculated time (in seconds),
the current order will be set as performance problem.
The calculation uses the order parameter FILE_SIZE.
Parameter FILE_SIZE must be configured on the appropriate step in a job chain (using StoreResultsJobJSAdapterClass as monitor) for storing into database.
-->
<JobChains>
<JobChain name="samples/sample_jobChain_1"/>
</JobChains>
<Maximum>
<!-- sample execution time calculation dependend of file size -->
<Script language="javascript"><![CDATA[
function calculate(){
var fileSize = new java.lang.Double(%FILE_SIZE%);
var timerExpiryFactor = 0.0025;
var timerExpiryTolerance = timerExpiryFactor*0.1;
var timerExpiry = new java.lang.Double(timerExpiryFactor+timerExpiryTolerance);
timerExpiry = timerExpiry*fileSize*60;
return timerExpiry;
}
calculate();
]]></Script>
</Maximum>
</Timer>
... |
Schema: SystemMonitorNotification_v1.0.xsd
Description:
- Specifies delivery way to System Monitor.
- Specifies notification for error or success conditions
- Specifies notification for checks of measure the performance of JobScheduler objects
...
Here you go an example of an XML file used for notifying a specific System Monitor (op5 Monitor) and using NotificationCommand:
...