Gateway Hub ["Geneos"]
["Geneos > Gateway Hub"]["Technical Reference", "API"]

Time windows filter

Overview

The topic outlines the filter.timeWindows syntax in the Gateway Hub REST API.

Time windows filter

filter.timeWindows is an optional filter used in REST API metric queries. This filter allows you to specify periods of time to include data within the time range you have specified.

For example, you can specify a 3-month time range using filter.range, and use filter.timeWindows to select only weekdays from this range.

Valid day filters are:

  • monday / mon
  • tuesday / tue
  • wednesday / wed
  • thursday / thu
  • friday / fri
  • saturday / sat
  • sunday / sun
  • weekends — Saturday and Sunday.
  • weekdays — Monday to Friday.

For example, to only include data between the hours of 7am and 5pm on weekdays, the filter is the following:

 - from: "07:00:00"
   to: "17:00:00"
   on:
    - "weekdays"

Specify multiple ranges

If you provide multiple timeWindows, they are treated separately. The example below includes data from 07:00 to 17:00 on weekdays and 12:00 to 23:59:59 on weekends:

 - from: "07:00:00"
   to: "17:00:00"
   on:
     - "weekdays"
 - from: "12:00:00"
   to: "23:59:59"
   on:
     - "weekends"

When you provide multiple ranges, the following rules apply:

  • The overall filter is the collective OR of all the ranges specified. Data is included from window A OR window B OR window C.
  • Overlapping ranges for the same day may be combined internally into one single filter.
    • For example:
           - from: "07:00:00"
             to: "17:00:00"
             on:
                - "weekdays"
           - from: "10:00:00"
             to: "19:00:00"
             on:
                - "weekdays
      The filter above can be combined into a single filter:
          - from: "07:00:00"
             to: "19:00:00"
             on:
                - "weekdays"

Specify multiple days

You can use more than one day per filter. For example:

    - from: "07:00:00"
       to: "19:00:00"
       on:
          - "monday"
          - 'wednesday"
          - "friday"

Use exclusive times

By default, times are inclusive. To make a time exclusive, use square brackets around the time:

    - from: "07:00:00"
       to: "[19:00:00]" # exclusive range
       on:
          - "weekdays"