I am using Influxdb to store some data representing requests being made to certain services. I want to calculate the number of requests done in one second in a time interval of 5 seconds (multiple requests might happen in one second). In order to achieve this I have written this query in order to obtain the amount of requests happening during 5 seconds time period
select sum(Value) as RequestSum from Requests where group by time(5s) fill(0)
. The issue that I am facing is that instead of creating intervals starting with the first timestamp registered which in my case would look like 2020-10-16 14:09:13
it always starts with something ending in a number of seconds divisible by 5 like 2020-10-16 14:09:10
.
The same case happens when I try to group by time(6s), when the first timestamp it starts grouping by is 2020-10-16 14:09:12
.
Is there a way to force Influx to start grouping by from a certain timestamp and not one that seems predefined?