...
The block below shows the configuration of the Enforced Monitor plugin, which is specified in the
scheduler.xml
file and which itself can be found in the$SCHEDULER_DATA/config
folder.Code Block language xml title Enforced Monitor Plugin Configuration collapse true <config> <plugins> <plugin java_class="com.sos.scheduler.plugins.globalmonitor.GlobalMonitorPlugin"> <plugin.config> <jobparams> <param name="configuration_directory" value="C:/ProgramData/sos-berlin.com/jobscheduler/jobscheduler_1.10/config"/> <param name="regex_selector" value="^job_.*\.job.xml$"/> <param name="exclude_dir" value="sos"/> <param name="exlude_file" value="xxx"/> </jobparams> <monitorparams> <param name="use_parent_folders" value="true"/> <param name="recursive" value="true"/> <param name="regex_selector" value="^global_.*$"/> </monitorparams> </plugin.config> </plugin> ... </plugins> ... </config>
The plugin configuration can be seen to consist of two main blocks - <
jobparams
> and <monitorparams
>. The purpose of both configuration blocks is broadly to define which Monitors will be applied to which jobs.Changes to the plugin configuration will only be applied after a restart of the JobScheduler.
- The
configuration_directory
parameter should always be set to the$SCHEDULER_DATA/jobschedulerID/config
value as shown in the listing. It is not possible to use this parameter to restrict the directories that are considered by the plugin. - Both the job and Monitor parameter blocks have
regex_selector
parameters that are used to filter Monitor files and job files according to their names.- The
^global_.*$
value shown for the<monitorparams><param name="
regex_selector"> means that only Monitor files with the prefixglobal_
will be applied. - If this parameter was not so restrictive then other Monitors that were intended for use as Named Monitors could also be implemented, if the <
monitorparams><param name="recursive">
parameter was set totrue
.
- The
- In addition the following optional parameters can be specified in both blocks:
- exclude_dir
- This parameter can be specified any number of times using comma-seperated list.
- A directory will be excluded when the directory name ends with the given value in exclude_dir. E E.g. the value sos will exclude the directory
live/subfolder/sos
andlive/sos
andlive/subfolder2/subfolder3/sos
- Monitor names should be specified without the ending
.monitor.xml
- i.e. exclude_file="/sos/subfolder/myMonitor" is translated to$SCHEDULER_HOME/config/live/sos/subfolder/myMonitor.monitor.xml
- exclude_file
- This parameter can be specified any number of times using comma-seperated list.
- A file will be excluded when the job|monitor path ends is equal the given value in
exclude_file.
E.g. the value/myfolder/myjob
will exclude the directorylive/myfolder/myjob.job.xml
- Job file names should be specified without the ending
.job.xml
- i.e. exclude_file="/sos/subfolder/myFile" is translated to$SCHEDULER_HOME/config/live/sos/subfolder/myFile.xml
recursive
This parameter can be specified using true/false.
The parameter has the default value true.
If true all files will be taken into consideration starting from the live folder
if false only file that are located in the live folder will be taken into consideration.
- exclude_dir
...