when i run the below query i am supposed to get 6 values(Since telegraf agent colllects data once every 10seconds 1 minute = 6 data points) but i am getting 2399 values
select http_response_code from http_response where host = ‘server’ and time > now() - 1m
the query is fetching data for the past 6 hours, can anyone help me why this is happening and how can i fix this issue.
desired output: now() - 1m should display only 6 data-points
current output: now() - 1m displays last 6 hurs and 1 minute of data
While when i give time it is showing me my desired output. query below
time > ‘2018-06-07T11:15:00Z’ and time < ‘2018-06-07T11:16:00Z’;
query
time > ‘2018-06-07T11:15:00Z’ and time < ‘2018-06-07T11:16:00Z’;
this shows accurate time
time > now() - 1m
this query shows 6 hours and 1 minute data.
earlier i used to get last minutes information for this query. I am not sure what happened can you please help me fix this issue.
I don’t think you need Kapacitor or a TICKSCRIPT to do this. If the query used to work, that might mean that something changed about your data or the way that you’re collecting it.
Even if Telegraf is only collecting every ten seconds, that doesn’t mean it’s only grabbing one data point for that ten seconds. Can you verify that that is the case?
If the query worked before, that probably means that something changed with your data. I would check on your retention policies and the shards you’re querying.