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

2

7

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

Wilheminawilhide answered 7/10, 2016 at 19:50 Comment(0)
Q
13

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

Quadratic answered 10/10, 2016 at 4:9 Comment(0)
H
3

Another possibility is to look at the HTTP-header of any response from the influx server. It contains a "Date" field. However, the HTTP-date field only has seconds precision.

Hindman answered 4/4, 2018 at 11:32 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.