Active Times

Overview

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:

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

Basic configuration

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

A scheduled period or active time can be in one of three states:

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

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.

How to specify an override period

See below for an example of how to configure a named holiday period.

How to specify time periods

See below for an example of how to specify certain times of the day.

How to specify inverted time periods

See below for an example of how to configure a sample night shift ActiveTime.

Configuration

activeTimes

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

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

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

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

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

The name used to reference this active time. Each name must be unique within the system.

Mandatory: Yes

activeTimes > activeTime > schedulePeriod

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

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

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

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

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 > override

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

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

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

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.