Configuring maintenance windows
To distinguish between data that is generated in normal business hours and data that is generated during maintenance windows, create a maintenance window.
To create a maintenance window, create a JSON file in the following directory
$PI_HOME/spl/instances/Analytics<topic_name>/config/training_exclusion_schedule<file_identifier>.json.
Where <topic_name>
is the name of the related topic.
<file_identifier>
is the part of the name of the JSON file that you use to
identify it. The file name must include training_exclusion_schedule
as a prefix.
For example,
$PI_HOME/spl/instances/AnalyticsTopic1/config/training_exclusion_schedule1.json.
You can create multiple files to specify different dates, resources, or events. All the files in the $PI_HOME/spl/instances/Analytics<topic_name>/config/ directory are detected by IBM® Operations Analytics Predictive Insights and parsed. Duplicates are ignored. All changes and additions to these files are implemented immediately and do not require you to restart IBM Operations Analytics Predictive Insights.
File format
The JSON file uses Cron expressions to make it easier for you to specify complex dates. For more information about these expressions, see Cron trigger tutorial.
Unit of time | Mandatory | Allowed values | Allowed special characters |
---|---|---|---|
Seconds | Yes | 0 - 59 | ,-*/ |
Minutes | Yes | 0 - 59 | ,-*/ |
Hours | Yes | 0 - 23 | ,-*/ |
Day of the month | Yes | 1 - 31 | ,-*?/LW |
Month | Yes | 1 - 12 or JAN to DEC | ,-*/ |
Weekday | Yes | 1 - 7 or SUN to SAT | ,-*?/LW |
Year | No | Empty or 1970 - 2099 | ,-*/ |
@blackfriday
- Use this expression to exclude data that is generated on Black Friday, which is the day after Thanksgiving. This expression is to help you to capture this date in a Cron expression.
@always
- Use this expression to exclude data from a resource regardless of time.
default
- This mode ensures that data is on the specified date.
go_backward
- This mode ensures that data is excluded from the previous Friday. Use this mode for pay roll runs or other applicable scenarios.
go_forward
- This mode ensures that data is excluded from the next weekday, usually a Monday.
You can also specify a start and or end time in milliseconds. You can implement one or both of these fields. Use these values to optimize performance.
Examples
xpto
and abcdezw
resources on the 23rd of every month. If the date falls on a weekend, data from the previous Friday
is excluded.
[
/*
{
// 23rd of every month
expression
: * * * 23 * ?
// optional config from here on
, strictlyOnWeekdayStrategy
: go_backward
, resourcePatterns
: xpto, abcdezw
, start
: 1487688195000
, end
: 1487688196000
},
]
[
/*
{
// 28th of every month
expression
: * * * 28 * ?
// optional config from here on
, strictlyOnWeekdayStrategy
: go_forward
}
*/
]