Advanced Example: Using Filtersedit

Building on the previous example we can use the match_all property to query the data whose host value equals app.xyz.com

One or more match_all conditions can be added to narrow down your search and will automatically send queries to your buckets with the right filters.

An updated user_traffic.json file (Or .yml file if YAML format is used) will become:

{
  "name": "traffic-model",
  "bucket_interval": "1m",
  "default_bucket": "my-bucket",
  "features": [
    {
      "match_all": [
        {"tag": "host", "value": "app.xyz.com"}
      ],
      "default": 0,
      "metric": "count",
      "field": "requests",
      "name": "count_all_requests",
      "anomaly_type": "low"
    }
  ],
  "interval": 60,
  "max_evals": 10,
  "offset": 30,
  "span": 20,
  "max_threshold": 90,
  "min_threshold": 50,
  "type": "donut"
}