1
votes

I have InfluxDB 0.13 and I'm sending data via the HTTP API. I'm getting status code 204 back, assuming that means OK. I can see the series if I query with "SHOW SERIES", I see the measurement and tags. But I cannot query on any of the data, it just says no results (query: SELECT * FROM "sql-query"). This is the raw data sent to Influx from Fiddler. Any idea what's wrong?

sql-query,Environment=QA,Service=XTAM_Lag SubscriberName="TXXOff",LagMinutes=141278i 1472628420980000000
sql-query,Environment=QA,Service=XTAM_Lag SubscriberName="TXXTIMEDEPOT",LagMinutes=248i 1472628420980000000
sql-query,Environment=QA,Service=XTAM_Lag SubscriberName="TXXOffMirror",LagMinutes=0i 1472628420980000000
sql-query,Environment=QA,Service=XTAM_Lag SubscriberName="TXXOffMirrorQA",LagMinutes=527i 1472628420980000000
sql-query,Environment=QA,Service=XTAM_Lag SubscriberName="TXXOff",LagMinutes=141279i 1472628480390000128
sql-query,Environment=QA,Service=XTAM_Lag SubscriberName="TXXTIMEDEPOT",LagMinutes=249i 1472628480390000128
sql-query,Environment=QA,Service=XTAM_Lag SubscriberName="TXXOffMirror",LagMinutes=0i 1472628480390000128
sql-query,Environment=QA,Service=XTAM_Lag SubscriberName="TXXOffMirrorQA",LagMinutes=528i 1472628480390000128
1
are you running that query inside grafana? - IIIIIIIIIIIIIIIIIIIIII
I have tried it both in Grafana and via the Influx admin UI. I can see other metrics from other measurements, just not this one, and I can't figure out why. Also no errors in the influxdb log, but not sure I'd expect to see anything there. The serie is created, so it's getting the data at least. - Haukman
And today I can query, haven't done anything, just let it set overnight (feeding data into it). Is there anything in Influx that would delay queries on new series/data? Some caching? - Haukman
HTTP Status 204 means No Content Details - httpstatuses.com/204 - praj
Yes, but that's not an error condition, it just means there is no body returned. - Haukman

1 Answers

2
votes

By default, all InfluxDB queries with no time constraint will use the current time in UTC on the InfluxDB server as an implicit upper time bound. Essentially, the query SELECT * FROM "sql-query" is interpreted as SELECT * FROM "sql-query" WHERE time < now().

The current UTC time on the server running InfluxDB can be different from the current time on the server generating metrics. This difference can be due to either a bad clock or, more likely, the use of a time zone other than UTC.

If there is an offset, new data will sometimes be written with timestamps in the relative future. Due to the implicit upper time bound on queries explained above, those points will then be excluded from a basic query.

To confirm whether this is the issue, try running a query with the upper time bound set a few days in the future.

SELECT * FROM "sql-query" WHERE time < now() + 1w

The query above will return all points in the sql-query measurement, plus any points written written with a relative time up to a week in the future.