Skip to main content

TIME_OF_WEEK

Adds a TIME_OF_WEEK label to anomalies that happen during a specific time of the week. For instance, can be used to filter anomalies that happen on Saturday.

Inputs

  • The output of the detector. Labels are applied to the anomalies of this input.
{
"sourcePlanNode": "anomalyDetector"
}

Parameters

namedescriptiondefault value
component.daysOfWeekA list of days to match. Eg ["MONDAY", "SATURDAY"].[] (no match)
component.hoursOfDayA list of hours to match. Eg [0,1,2,23][] (no match)
component.dayHoursOfWeekA map of <day, List<hour>> to match. Eg {"FRIDAY": [22, 23], "SATURDAY": [0, 1, 2]}{} (no match)

To determine days, the timezone defined in metadata$timezone is used.

Example

{
"name": "root",
"type": "PostProcessor",
"params": {
"type": "TIME_OF_WEEK",
"component.ignore": "true",
"component.daysOfWeek": ["MONDAY", "SATURDAY"],
"component.hoursOfDay": [0,1,2,23],
"component.dayHoursOfWeek": {"FRIDAY": [22, 23], "SATURDAY": [0, 1, 2]}
},
"inputs": [
{
"sourcePlanNode": "anomalyDetector"
}
]
}