Skip to main content

Configuration file

Every model needs to have a config.yaml. This file is the truth when it comes to every model. Different fields have different specifications.

schedule

yaml FieldExample valueMeaningis required
runEveryMinute1Model runs every minuteOne of the three
runEveryHour1Model runs every hourOne of the three
cronExpression0 0/1 * * *Model runs every full hourOne of the three

modelDescription

yaml FieldExample valueMeaningis required
frontEndName"Dirt Detector"The name end-users will see in the user interfaceYes
description"Detects dirt"A short description end-users will see in the user interfaceYes
longDescription"Detects all the dirt. Everywhere!"A longer, more detailed description end-users will see in the user interfaceYes

modelSettings

yaml FieldExample valueMeaningis required
modelVersion"0.1.0"Versioning for the model and all events it's producesYes
sendAlertsTrueIf the events produced by this model should be picked up and propagated to the user interfaceYes
displayInFrontEndTrueIf the model should be displayed in the user interface so that the end-user can submit their own schedulesYes
backfillTrueIf you want your function to be backfilled historicallyYes

fields

10 different fields can be rendered in the user interface for the end-user to fill out for creating a monitoring task. Each key is the fields ID with which the information parsed information can be retrieved through the AIR client in the model itself and can be visualized in the user interface (next section).

yaml FieldExample valueMeaningis required
name"Time series to be monitored"The name end-users will see in the front endYes
description"Provide a time series to be monitored."A description end-users will see in the user interfaceYes
type"TimeSeries"Here you can specify one of the following types Asset, TimeSeries, bool, float or str. The user interface will render the field accordingly (for TimeSeries it will provide a search for time series.)Yes
multipleTrueDEPRECATED This field is only allowed when type equals Asset or TimeSeries. When True the end-user can specify more than one time series or asset.No

visualization

The AIR user interface doesn't know which time series are important to be displayed. Instead of hard coding all settings in the user interface, data scientists can define basic visualizations themselves. All IDs used here are derived from the previous fields section.

For now, possible IDs are timeSeries and thresholds.

timeSeries

As many time series can be specified as TimeSeries fields are present.

yaml FieldExample valueMeaningis required
fields["time_series_external_id1", "time_series_external_id2"]As defined in the fields section, needs to be a TimeSeries field.No

thresholds

As many thresholds can be specified as float fields are present. One limitation: you can only have one or multiple thresholds with exactly one time series specified in timeSeries.

yaml FieldExample valueMeaningis required
fields["threshold_1", "threshold_2"]As defined in the fields section, needs to be a float field.No

grouping

If thresholds and more than one time series should be visualized, the groupings parameter needs to be used. This way, time series can be mapped to different thresholds. Note that the order of the time series and threshold IDs in the list/array doesn't matter.

grouping:
[
['time_series_1', 'threshold_1', 'threshold_2'],
['time_series_2', 'threshold_3'],
]

Example

schedule:
runEveryMinute: 30

modelDescription:
frontEndName: "Lower Threshold"
description: "When a selected time series crosses down this value, an alert is created."
longDescription: "When a selected time series crosses down this value, an alert is created.
Alerts that are not older than two hours are merged to prevent spamming."


modelSettings:
modelVersion: "1.3.0" # set the version of your model here
sendAlerts: True # set to True if you want the events of this model being propagated to the user interface
displayInFrontEnd: True # set to True if it should be selectable in the user interface
backfill: True

fields:
ts_ext_id:
name: "Time series"
description: "A time series that is going to be monitored"
type: "TimeSeries"
upper_threshold:
name: "Upper Threshold"
description: "When the selected time series crosses above on this threshold an alert will be created."
type: "float"
lower_threshold:
name: "Lower Threshold"
description: "When the selected time series crosses down on this threshold an alert will be created."
type: "float"
min_minutes:
name: "Minimum Length in Minutes"
description: "Please define how long the threshold needs to be crossed before it is registered as an alert. (Note: a smaller amount might lead to more notifications but you can edit this value later on.)"
type: "float"

visualization:
timeSeries:
fields: ["ts_ext_id"]
thresholds:
fields: ["threshold"]
grouping: [["ts_ext_id", "upper_threshold", "lower_threshold"]]