First Modeledit

Data is loaded. Let’s declare a first model in a JSON file. This model learns the average CPU utilization of an AWS instance auto scaling group. Our JSON file describes the parameters and features to pull and aggregate data from a data source.

cat <<EOF | tee asg.json
    "default_datasource": "nab",
    "default_datasink": "output",
    "name": "nab_cpu_utilization_asg_misconfiguration_mean_value__5m",
    "type": "donut",
    "features": [
            "metric": "mean",
            "measurement": "cpu_utilization_asg_misconfiguration",
            "field": "value",
            "io": "io",
            "name": "mean_value",
            "match_all": [
                    "tag": "nab",
                    "value": "cpu_utilization_asg_misconfiguration"
            "default": null
    "bucket_interval": "5m",
    "offset": "10s",
    "interval": "60s",
    "max_evals": 21,
    "span": 24

We can use the CLI to create this model and ten days of historical data for training.

loudml create-model asg.json
loudml train nab_cpu_utilization_asg_misconfiguration_mean_value__5m -f now-30d -t now-20d