Advanced Example: Abnormal Dips in User Traffic using Seasonalityedit

Building on the fist example, it is often common for user traffic to have regular patterns within a given day, and within a given week:

  • At night, a smooth decrease
  • During the day, one or more sharp increase and decrease eg at lunch time
  • During the week-ends or holidays, a totally different pattern

An updated user_traffic.json file (Or .yml file if YAML format is used) will activate seasonality parameters to take it into account:

{
  "name": "traffic-model",
  "seasonality": {
      "daytime": true,
      "weekday": true
  },
  "bucket_interval": "1m",
  "default_datasource": "my-datasource",
  "features": [
    {
      "default": 0,
      "metric": "count",
      "field": "requests",
      "measurement": "traffic",
      "name": "count_all_requests",
      "anomaly_type": "low"
    }
  ],
  "interval": 60,
  "max_evals": 10,
  "offset": 30,
  "forecast": 5,
  "span": 20,
  "max_threshold": 90,
  "min_threshold": 50,
  "type": "timeseries"
}