Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 786
Tracy Ann Monteiro Avatar asked Oct 07 '16 19:10

Tracy Ann Monteiro


1 Answers

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

like image 148
Jason Avatar answered Oct 01 '22 23:10

Jason