How do I query InfluxDB to show me current time and date?

Tracy Ann Monteiro picture Tracy Ann Monteiro · Oct 7, 2016 · Viewed 7.6k times · Source

I couldn't find much documentation on this. How do I query InfluxDB to show me current database system time and date?

Answer

Jason picture Jason · Oct 10, 2016

SHOW DIAGNOSTICS will do it, if you're an admin.

If you're not an admin, you can cheat:

precision rfc3339
INSERT foo,dummy_tag="time_test" testval=0i
SELECT last(*) FROM foo

Which is a bit awkward. This might deserve a feature request on their github page: https://github.com/influxdata/influxdb/issues