LogicModules

Creating JobMonitor Definitions in LogicMonitor

JobMonitors on Windows and Linux/Unix systems can be monitored to ensure the jobs start on time, complete when expected, and exit with the proper exit code.

Creating JobMonitors

You can find JobMonitor definitions from Settings | LogicModules | JobMonitors in your LogicMonitor account.  By default, your account does not come with any JobMonitor definitions.  You can add JobMonitor definitions by:

  1. creating custom JobMonitor definitions,
  2. importing custom XML JobMonitor definitions or
  3. importing JobMonitor definitions from LogicMonitor's repository (we don't currently provide any to import, but this may be applicable in the future).  
Creating Batchjobs

Regardless of how it is added, every JobMonitor definition has the same information:

Name

This is how the JobMonitor is displayed on your Devices page. It also must be referenced in the job wrapper to identify the particular job being executed.  Note that JobMonitor names cannot include the operators and comparison functions listed on this page.

Description

Optional informative description of the job.

Search Keywords

Tag the JobMonitor with keywords (related to its name, purpose, scope, etc) that will facilitate a search for it.

Technical Notes

This field can contain any technical notes associated with the JobMonitor.

Applies To

The Applies To field defines the devices on which this JobMonitor will run. This field needs to be in AppliesTo Scripting syntax.  

Longest possible run time (min)

The maximum number of minutes your JobMonitor can run before it will trigger an alert. Set this field to 0 if you don't know how long a JobMonitor will take.

Group

The Group is the display group the JobMonitor will display under in the device tree.  Enter a new group, select an existing one, or leave blank for no grouping.

Alert if the job isn't started on time

If this option is checked, three more fields (Cron Schedule, Max Relative Time Interval Error (min), and Alert Level) will dynamically appear. As discussed next, these three fields combine to determine the conditions under which an alert, along with its severity, will be raised if a job isn't started on time. If this option is not checked, monitoring will only occur for the JobMonitor's run time and exit code.

Cron Schedule

The Cron Schedule field specifies when the job is expected to start, using a Cron expression. For help writing Cron expressions, see Help Constructing Cron Expressions.

Max Relative Time Interval Error (min)

The Max Relative Time Interval Error (min> field contains the number of minutes that the JobMonitor's start time is allowed to be delayed before an alert is triggered.

Note: The interval established here must be shorter than the interval entered into the Effective Interval (min) field. If it isn't, the alert will no longer be active (i.e. effective) by the time the Max Relative Time Interval Error (min) time is reached and no alert will be triggered.

Alert Level

The Alert Level field indicates the severity of alert that should be triggered if the job does not start when scheduled, runs longer than expected, or exits with an unexpected code.

Effective Interval (min)

The number of minutes that alerts triggered for this JobMonitor should remain active before they auto-clear.

Note: If the Alert if the job isn't started on time option is selected, the interval established here must be longer than the interval entered into the Max Relative Time Interval Error (min) field. If it isn't, the alert will no longer be active (i.e. effective) when the Max Relative Time Interval Error (min) time is reached and no alert will be triggered.

Alert Subject

Filling out this field will override the default JobMonitor alert subject that will be displayed in alert notifications for this JobMonitor.  

Alert Message

Filling out this field will override the default JobMonitor alert message that will be displayed in alert notifications for this JobMonitor. It is usually a good idea to provide an alert message specific to this JobMonitor (as opposed to leaving this field blank and relying on the default JobMonitor alert message). You can customize this field using tokens, which are substituted with the appropriate content at the time alert notifications are routed to recipients. For a list of available JobMonitor tokens, see Tokens Available in LogicModule Alert Messages.

Note that if a JobMonitor is disabled, all its active alerts will be updated with a "Cleared On" time reflecting the time at which the JobMonitor was disabled.