Active Times
Overview Copied
Active times provide time-based control over Gateway features, allowing configured functions to be enabled or disabled based on user-defined time periods.
Two major components that utilise active times are Rules and Actions. The following examples demonstrate scenarios where active times could be utilised:
- Trading links which must be kept operational during trading hours can often be taken down for maintenance during off hours. Rules monitoring these links can reference an active time describing the trading hours, so that alerts are not triggered if the link is down outside of this time.
- Actions can be configured to prevent or delay an action being fired using an active time. This could be used to prevent an email action from emailing an administrator outside of office hours, as they would not be present to deal with the error.
Active times are configured in the top-level “Active times” section of the gateway setup, and are then referenced by name in other parts of the gateway setup. Thus, active times must be created with a unique name among other active times to avoid ambiguity.
When configuring active times in the Gateway Setup Editor, active time groups can be defined. An active time group contains a logical set of active time definitions. Groups can be added within groups to create a tree structure. Active time groups are purely for ease of use - they allow users to logically organise their active time definitions within their setup. They do not have any affect at a functional level.
Operation Copied
Basic configuration Copied
A basic active time is composed of one or more scheduled periods, each of which contains a user-defined time period. When the time on the gateway host enters the range defined by a scheduled period that period becomes active, and correspondingly becomes inactive when the time exits the defined range. A basic active time is considered to be active if at least one of the contained periods is active.
Scheduled periods can optionally be configured to be inverted or overridden – the default is none. For an inverted period, the time specified in the period is inactive rather than active. This means that the configured hours actually specify an inactive time. This can be helpful for specifying hours in which you know a particular event in unimportant (e.g. during morning check).
Overriding indicates that a particular time (or day) is a holiday, and should definitely not be active. When the current time enters the specified period the state changes to inactive (overridden) rather than inactive. This prevents the active time from becoming active, even if another period is active at the same time.
Combining times Copied
A scheduled period or active time can be in one of three states:
- inactive
- inactive (override)
- active
When a time is active, gateway features referencing the time will operate as normal.
Active times, in addition to containing several scheduled periods, can also reference multiple other active times. The state of the referenced active times contribute to the state of the active time. Complex active times can therefore be built up by combining several other periods and times.
During Gateway operation, the state of an active time is calculated from the state of all contained scheduled periods and / or time references. These states are combined according to the table below:
State 1 | State 2 | Combined State |
---|---|---|
Inactive | Inactive | Inactive |
Active | Inactive | Active |
Active | Active | Active |
Inactive | Inactive (override) | Inactive (override) |
Active | Inactive (override) | Inactive (override) |
Inactive (override) | Inactive (override) | Inactive (override) |
Note
Configuring a cycle of times which reference each other results in an error. For example, configuring a time A which references a time B (A->B), B->C and C->A is disallowed since changes to time A would affect C, which affects B which affects A. This could lead to a possible infinite loop. This is detected and discarded by the Gateway.
Timezones Copied
It is possible to specify an ActiveTime to run in a different timezone.
If you specify a timezone, the specified times in that ActiveTime will run as if they were a local ‘wall clock’ in the region specified. This can be useful for example if you have rules on a London Gateway that monitor a service from Tokyo.
The Gateway takes into account timezone offsets and daylight savings rules for both the local and specified timezones. The default is to run in the local time to the Gateway.
Specify an override period Copied
You can set up specific holiday dates in the Active Time that define all of the scheduled holiday periods as overrides.
To specify an override period:
- Open Gateway Setup Editor.
- Click Active times from the Navigation section.
- Click New Active time.
- Click Add new in the Scheduled period to specify the start and end time period.
- Select date on the options menu. This allows you to specify the date, month, and year.
- Tick the Override check box. For example:
- Click Save current document to apply the changes.
For more information, see activeTimes > activeTime > schedulePeriod > override.
Specify a time period Copied
See below for an example of how to specify certain times of the day.
- Explicit start and end time are configured.
- No days or date options are specified so all will be active during the specified time period on all days.
- Either the start time or end time can be left unspecified. If the start time is unspecified, then the start of day (00:00) will be assumed. If the end time is unspecified, then the end of day will be assumed.
Specify an inverted time period Copied
See below for an example of how to configure a sample night shift Active Time.
- Explicit start and end times are configured.
- The Invert flag is enabled. The Active Time will be active from
0.00 - 06:30
and19:30 - end of day
. The Active Time will be inactive outside of these times.
Configuration Copied
activeTimes Copied
The top-level section contains the active time configuration.
This configuration includes the definition of the time periods, but not which components / features are affected by these times.
Mandatory: No
activeTimes > activeTimeGroup Copied
A logical set of active time definitions.
Active time groups allow you to logically organise your active time definitions within your setup. Groups do not have any functional effect.
Mandatory: No
activeTimes > activeTimeGroup > name Copied
Specifies the name of the active time group.
Although the name is not used internally by the Gateway, it is recommended to give the group a descriptive name so that users editing the setup file can easily determine the purpose of the group.
Mandatory: Yes
activeTimes > gatewayControlledProbeActiveTimes Copied
Enabling this flag shifts control of the operation of active times assigned to samplers from the Netprobe (default behaviour) to the Gateway. The Gateway messages the Netprobe when relevant active times are entered and exited.
Enabling the flag allows active times assigned to samplers to have timezones specified and can use seconds precision.
If a timezone is not specified in the active time definition the sampler active times work according to the timezone on the Gateway host.
If this feature is not enabled, the sampler active times will work according to the time on the Netprobe host. Mandatory: No
activeTimes > activeTime Copied
The definition of an active time for use by other Gateway components.
This definition is referenced by name, and so all active time definitions must have a unique name within the active times top-level section.
Mandatory: No
activeTimes > activeTime > name Copied
The name used to reference this active time. Each name must be unique within the system.
Mandatory: Yes
activeTimes > activeTime > schedulePeriod Copied
A scheduled period definition contains a description of a time period. There can be multiple periods specified for a single active time.
Mandatory: No
activeTimes > activeTime > schedulePeriod > startTime Copied
Specifies the start time for the period in HH:MM
or HH:MM:SS
format, using 24-hour clock.
If seconds are not specified then this defaults to 0. The start time is inclusive, and so the period becomes active at HH:MM:SS
.
Note
activeTimes > gatewayControlledProbeActiveTimes must be enabled to use active times with seconds precision.
Mandatory: No
Default: 00:00:00
(start of day)
activeTimes > activeTime > schedulePeriod > endTime Copied
Specifies the end time for the period in HH:MM
or HH:MM:SS
format, using 24-hour clock. If seconds are not specified then this defaults to 0.
The end time is exclusive, and so the period becomes inactive at HH:MM:SS
(for Gateway controlled active times) or HH:MM
and 0 seconds for Netprobe-controlled active times. Leave this unspecified to create a scheduled period that lasts until the end of a day.
Note
activeTimes > gatewayControlledProbeActiveTimes must be enabled to use active times with seconds precision.
Mandatory: No
Default: End of day
activeTimes > activeTime > schedulePeriod > date Copied
Specifies the date that the active time period occurs.
Possible formats include the day (DD
), the day and month (DD/MM
), or the day, month, and year (DD/MM/YYYY
).
If specified on a day, the time period will apply on that day each month. For a day and month, the time period will apply on that date each year.
Mandatory: No
Default: If day is not specified, then the time period applies every day.
activeTimes > activeTime > schedulePeriod > days Copied
Specifies the days of the week on which the time period applies to.
This contains a list of Boolean settings selecting the named day.
Mandatory: No
Default: If date is not specified, then the time period applies every day.
activeTimes > activeTime > schedulePeriod > day Copied
Specifies the time period as a repeating day. For example, the last Friday in every month of every year, or the first Monday in June every year.
Note
It is not possible to specify the repeating day every month in a given year. For example, you can specify the first Monday of every month of every year, but you cannot specify the first Monday of every month in the year 2020.
Day contains the following options:
- Ordinal — First, Second, Third, Fourth, Last.
- Day — each day Monday–Sunday.
- Month — each month January–December, Every Month.
- (Optional) Year — 10 years including the current year, year entered by you (for example, 2020).
Mandatory: No
activeTimes > activeTime > schedulePeriod > override Copied
If set to true
, this period describes a holiday and therefore the time is inactive during this period.
Mandatory: No
Default: false
activeTimes > activeTime > schedulePeriod > invert Copied
If set to true
, this period is inverted and therefore specifies an inactive time rather than an active time.
Mandatory: No
Default: false
activeTimes > activeTime > activeTime Copied
References another active time by name. The state of the referenced time then contributes to the state of this active time.
Mandatory: No
activeTimes > activeTime > timezone Copied
Sometimes, it might be necessary for an Active Time to run in a timezone that is different to the local timezone that the Gateway is running in.
For example, if you are using a Gateway in New York to monitor services in London and New York.
The timezone region can be selected from the list.
Note
activeTimes > gatewayControlledProbeActiveTimes must be enabled to use this feature.
Mandatory: No
Default: Runs in local timezone of the Netprobe or Gateway.