Rule Table

 

Column Name

Definition

Name (string)

The unique name for the rule. Rule names can only contain letters, digits, spaces, underscores, and/or dashes.

Day (string)

The list of days of the week (Mon, Wed, Fri, for example) or specific dates (dd-MMM-yyyy) that this rule is in effect.

Start Time (string)

The time of day that this rule goes into effect, in 24 hour format (hh:mm:ss). If left empty, then 00:00:00 is used.

End Time (string)

The time of day when this rule is no longer in effect, in 24 hour format (hh:mm:ss). If left empty, then 23:59:59 is used.

Exception (boolean)

This value is used differently for SQL queries and alerts:

SQL Queries: If set to false then, when the rule is in effect, the query is run at the indicated interval. If set to true then, when the rule is in effect, the query is NOT run.

Alerts: If set to false then, when the rule is in effect, the alert is enabled. If set to true then, when the rule is in effect, the alert is disabled.

Interval (string)

This value is not used for alerts. For SQL queries, this value is the time interval between queries when this rule is in effect (1m, 30m, 1h, for example).

Enable (boolean)

Set to true to enable the rule. Set to false if you do not want the rule to ever be in effect.

Time Zone (string)

The name of the time zone for the rule (US/Eastern). Leaving the column blank results in using the local time zone. Names that include daylight savings (PST or EDT, for example) should not be used.

Note: You can add additional formats for specifying dates in your rules using the sl.rtview.scheduler.dateFormat property in your .properties file. For example:

sl.rtview.scheduler.dateFormat=MMM dd, yyyy

Entering -scheduler.dumpFormats:true on the command line will print the accepted formats for days of the week, specific dates, and time zones.

Example Rule Table

 

Name

Exception

Days

Start Time

End Time

Interval

Time Zone

Enabled

Description

workdays_30m

false

Mon,Tue,Wed,Thu,Fri

09:00:00

17:00:00

30m

 

true

weekdays 9-5 @30 min

weekends_9_12_15

false

Sat,Sun

09:00:00

17:00:00

3h

 

true

weekends at 9, noon, 3

lunch_hour_ex

true

Mon,Tue, Wed,Thu,Fri

12:00:00

12:59:59

 

 

true

no queries during lunch

holidays_2016_ex

true

1-Jan-2016,4-Jul-2016,25-Dec-2016

 

 

 

 

true

no queries on these days

workdays30m_ central

false

Mon,Tue,Wed,Thu,Fri

09:00:00

17:00:00

30m

US/Central

true

weekdays 9-5 @30 min (in US/Central timezone)

Explanation of Rule Examples

workdays_30m

For SQL queries, runs a query every 30 minutes between 9am and 5pm Monday to Friday.

For alerts, enables the alert between 9am and 5pm Monday to Friday.

weekends_9_12_15

For SQL queries, runs a query on weekends at 9am, noon, and 3pm.

For alerts, enables the alert between 9am and 5pm on weekends.

lunch_hour_ex

For SQL queries, this exception rule prevents a query from being run between noon and 12:59:59 on weekdays.

For alerts, this exception rule disables alerts between noon and 12:59:59 on weekdays.

holidays_2016_ex

For SQL queries, this exception rule prevents a query from being run on 3 specific dates in 2016 (Christmas, 4th of July, and January 1).

For alerts, this exception rule disables alerts on 3 specific dates in 2016 (Christmas, 4th of July, and January 1).

Note that this rule does not specify a Start Time or End Time, so the rule is in effect for the entire day.

workdays30m_central

Same as the workdays_30m rule except that it uses the US/Central timezone when checking the time of day against the Start/End time.