Working with SLA Rules

To take advantage of the SLA capabilities, you must create SLA rules. Each SLA rule monitors a single Process Definition or Chain Definition. When you create an SLA rule, you specify when you expect the Process to start or end, and what should happen if the run starts or ends late. RunMyJobs can notify operators of problems via email, Alert Alerts, and custom Alerts.

Choosing Processes to Monitor

First, you must decide which Processes to monitor. Note that each SLA rule is can monitor a single Process run per day. You can use SLA with Process or Chain Definitions that run continuously with restart behaviors, or that run multiple times per day, but be aware of the following limitations:

  • Each SLA rule tracks a single Process Definition or Chain Definition.

  • If you want to monitor a Process that runs multiple times a day, you must create a separate SLA rule for each run. So, for example, if a Process runs at midnight and at noon, you need two SLA rules to monitor both runs.

Note: You can use SLA with a Process Definition that is used within a Chain Definition.

Edit Rule Definition Window

To create an SLA rule, click at the top.

The Edit Rule Definition window provides the following controls for configuring SLA rules.

Definition Area

Field Description Default Value Valid Values
Name The name of the rule.

 

 

Process Definition The Process Definition or Chain Definition the rule should monitor.

 

 

Priority The minimum priority of the Process. Processes with a lower priority will be ignored. 50 1-100
Type

Type of SLA rule definition. The options are:

  • SLA for starttime: Use this option if you want to make sure the Process starts on time.

  • SLA for endtime: Use this option if you want to make sure the Process finishes on time.

SLA for endtime  
Enabled Lets you enable or disable the rule.

 

 

Lead Offset

The amount of time BEFORE the SLA Deadline that the SLA Component should monitor. For example, if you have a deadline of 11:00 and a Lead Offset of one hour, RunMyJobs will start monitoring for this Process at 10:00.

Note: The default value of 1:00 is just a starting value. If a Process runs at the same time every day and does not depend on any other Processes for its start time, you can reduce this to something more like 15 minutes. However, if the start time for the Process depends on other Processes that do not always finish at the same time, you may want to increase it beyond 1:00. Redwood recommends looking at actual execution times when setting this value so that you have a realistic idea of the Process's actual start and end times.

1:00 [0-23]:[00-59]
SLA Deadline The actual SLA Deadline for start or end time, depending on the Type field. 00:00 [0-23]:[00-59]
Time Zone The time zone to use for the rule. This is optional, but recommended. If your time zone uses daylight saving time, you must ensure that all Process and Chain Definitions involved have a time zone set. Time zone specified in User Settings.  
Late Offset

The duration (hh:mm) after the SLA Deadline during which the Process is marked as Late, but before the Process is marked as Missed. An Alert is sent when a Process is marked as Late. This lets you make some allowance for a Process that starts late or takes longer than expected. As with the Lead Offset value, Redwood recommends looking at actual execution times when determining this value.

Note: If Late Offset is set to 00:00, the Process is marked as Missed immediately when the SLA Deadline is reached, and the Alert is sent at that time.

Note: The default value of 1:00 is just a starting value. If a Process finishes reliably at the same time every day, you can reduce this to something more like 15 minutes. However, if the end time for the Process varies over time, you may want to increase it beyond 1:00. Redwood recommends looking at actual execution times when setting this value so that you have a realistic idea of the Process's actual start and end times.

01:00 [0-23]:[00-59]
Time Window If you specify a Time Window here, the rule only runs during that Time Window.

 

 

Rule tags Rule tags let you filter the Processes displayed in the SLA Dashboard. When you are creating SLA rules, you can enter a comma-separated list of arbitrary strings in the Rule Tags field. In the SLA Dashboard, those rule tags display in the Rule Tags column. You can then filter the dashboard by clicking the tags.

 

 

Disabled Time Window If you specify a Time Window here, the rule will not run that Time Window. If you specified a time window in the Time Window field, and that time window overlaps with the Disabled Time Window, the rule will not run during the intersection between the two Time Windows (if any).

 

 

Parameters Area

If the Process Definition has Parameters that are flagged as being Part of Key, you can specify name/value pairs for those Parameters in order to restrict this rule to monitoring Processes that have those Parameters and values.

To add a Parameter name/value pair, click . If this button is not displayed, the selected Process Definition does not have any Parameters that are designated as Part of Key.

Alerts Area

The Alerts area includes tabs for Email Alerts, Alert Alerts, and Custom Alerts.

Each of these tabs includes some common settings. These are described in the following table.

Field Description Default Value
Priority

Lets you select when the Alert should be triggered, based on predicted values.

  • High: Triggers the Alert if the Process is not predicted to make the SLA Deadline within the average runtime for the Process plus two standard deviations.

  • Medium: Triggers the Alert when the Process is not predicted to make the SLA Deadline within the average runtime for the Process plus one standard deviation.

  • Low: Triggers the Alert when the Process is not predicted to make the SLA Deadline within the average runtime for the Process.

Note: Because Alert triggering is based on a Process's predicted runtime rather than its actual runtime, it is possible to have "false alarms" where an Alert is triggered, but the Process actually finishes on time. If you want to minimize such "false alarms," use the Low setting.

 

Enabled Lets you enable or disable the Alert. true
Auto Confirm If this is set, confirmation of SLA Operator Messages is automatic. true

Alert Types

Each Alert has a type that indicates what specifically triggered the Alert. You can include this type in message bodies using the alertType replacement variable.

  • PredictedAlert: Triggered when the Process's predicted start time (for SLA for starttime) or end time (for SLA for endtime) is after the SLA Deadline.
  • DeadlineAlert: Triggered if the Process is not predicted to start (for SLA for starttime) or end (for SLA for endtime) when the SLA Deadline passes.
  • Finished: Triggered if the Process starts (for SLA for starttime) or ends (for SLA for endtime) after the SLA Deadline, but within the Late Offset.
  • HalfMissedAlert: Triggered if the predicted start time (for SLA for starttime) or end time (for SLA for endtime) is halfway to the end of the Late Offset.
  • Missed: Triggered if the Process has not started (for SLA for starttime) or ended (for SLA for endtime) when the SLA Deadline passes.

Email Alerts Area

You can use the controls in this tab to configure an email to be sent if the SLA rule detects a failure. To add an email Alert, click .

Tip: For information about providing execution-specific information in the email body, see Replacement Variables.

Note: For a description of the fields not described in this table, see Alerts Area.

Field Description Default Value
Email address The address to send the Alert email to.

 

Subject The subject of the Alert email. A default subject based on the state of the SLA rule.
Body The body of the Alert email. A default body based on the state of the SLA rule. This field must contain source code for a valid HTML document. For more information, see Email Alert Body Options.

Alert Alerts Area

You can use the controls in this tab to arrange for an Ad Hoc Alert to be sent if the SLA Component detects a problem. Note that you will need to create Alert Source first.

To add an Ad Hoc Alert to the active SLA rule, click in the Alert Alerts area.

Note: For a description of the fields not described in this table, see Alerts Area.

Field Description
Alert Source The Ad Hoc Alert source to trigger.
Alert Source Data The data to send to the Ad Hoc Alert source.

Custom Alerts Area

You can use the controls in this tab to submit your own custom Process Definition or Chain Definition if the SLA Component detects a problem. You must create this Process Definition or Chain Definition yourself, and name it SLA_Custom_Alert. It must be in the same Partition as the SLA Component.

If this Process Definition or Chain Definition has Parameters, you can pass Parameter name/value pairs using the Parameters column. To do so, add a row and then click in the Parameters column. A Parameters dialog box displays, letting you specify the values to be sent to your custom Process Definition or Chain Definition.

To add a custom Alert, click .

Note: For a description of the fields not described in this table, see Alerts Area.

Field Description
Parameters The Parameter name/value pairs to be passed to the SLA_Custom_Alert Process Definition or Chain Definition.

Replacement Variables

You can use replacement variables in the Subject and Body fields for an email to provide specific information about the problem detected by the SLA Component. For example, you could set the email Subject field to Rule breach for ${jobId} from ${jobDefinition}.

Replacement Variable Description
${jobId} The ID of the Process that breached the SLA.
${ruleName} The name of the SLA rule.
${jobDefinition} The name of the Process Definition or Chain Definition.
${description} A description of the breached Process.
${requiredJobTime} The SLA Deadline time.
${predictedJobTime} The predicted start time (for SLA for starttime) or end time (for SLA for endtime) for the Process.
${alertText} Default Alert text based on the state of the SLA rule.
${alertType} The Alert type.
${alertPriority} The Alert priority: Low, Medium, or High.
${parameters.<parameter name>} The value of the indicated Parameter.

Email Alert Body Options

You have three options for the email Alert Body field.

  • Manually enter text, optionally using replacement variables.

  • Enter the path to a document (for example: doc:REDWOOD/SLA_EmailAlert_Template). The document can also use replacement variables.

  • Leave the field blank. If you do not enter any text in the Body field, RunMyJobs inserts default body text based on the state of the SLA rule associated with the monitored Process.

The following example shows a sample email Body that uses replacement variables.

Copy
For example: 
<html>
<head><title>Email</title></head>
 <body>
  <p>SLA ${alertType} Breach </p>
  <p>Jobid=${jobId} </p>
  <p>Jobname=${jobDefinition}</p>
  <p>SLA deadline: ${requiredJobTime}</p>
  <p>Details:</p>
  <ul>
   <li>Alert priority: ${alertPriority}</li>
   <li>SLA Rule: ${ruleName}</li>
   <li>Job description: ${description}</li>
  </ul>
 </body>
</html>

Event and Lock Dependencies

The SLA Component's predicted end times are calculated based on Process and Chain dependencies. If Processes on the critical path for the deadline have events and/or locks, they will be taken into consideration only if the Processes they are depending on are also being monitored by the SLA Component.