Hi
I’m trying to run a kapacitor batch task with a replay against historical data. The task calculates average and stores it in a measurement in the same InfluxDB database (different retention policy)
The task is supposed to calculate avg (and max) on a 24 h interval, while I get it to run it seems that even if I run if for say the past 3 days it only writes the output for the last day?
My script:
batch
|query(‘SELECT mean(value) as avg,max(value) FROM performance.autogen.cpu_usage’)
.period(24h)
.every(24h)
.groupBy(*)
|influxDBOut()
.database(‘performance’)
.retentionPolicy(‘agg_24h’)
.measurement(‘cpu_usage’)
.precision(‘s’)
And I’ve run it like this (after defining the task)
kapacitor record batch -task cpu24 -past 3d
kapacitor replay -task cpu24 -rec-time -recording
I’ve also tried the replay-live functionality
kapacitor replay-live batch -task cpu24 -rec-time -past 3d
The data it runs against is cpu metrics for around 4000 instances (VMs) and they have all metrics on 20 second intervals
Any idea as to why the replay only writes the avg for the last day (for each VM)?