loudml
loudml copied to clipboard
Error using derivative operator
I'm trying to train a counter (GAUGE) metric. Therefore derivative is needed to calculate requests/timeframe.
[root@influxdb01 ~]# loudml train --from "now-60d" --to "now" nginx_requests-model
INFO:root:connecting to influxdb on localhost:8086, using database 'annotations'
INFO:root:train(nginx_requests-model) range=2019-06-14T13:07:00.000Z-2019-08-13T13:08:00.000Z train_size=0.670000 batch_size=256 epochs=100)
INFO:root:connecting to influxdb on localhost:8086, using database 'telegraf'
ERROR:root:datasource[telegraf]: aggregate function required inside the call to derivative
My model is as follow:
{
"bucket_interval": "1m",
"default_datasource": "telegraf",
"features": [
{
"match_all": [
{"tag": "host", "value": "plesk01"}
],
"default": "previous",
"field": "requests",
"measurement": "nginx",
"metric": "derivative",
"name": "nginx_requests_feature"
}
],
"interval": 60,
"max_evals": 10,
"name": "nginx_requests-model",
"offset": 60,
"span": 10,
"max_threshold": 90,
"min_threshold": 50,
"type": "donut"
}