InfluxDB: Canviar el format de hora columna ‘time’

Imprimeix
Per fer consultes per CLI a la influxdb per veure el camp de temps de forma una mica humana s’ha d’utilitzar la comanda: precision rfc3339

Exemple:

silva:~ # influx
Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.
Connected to http://localhost:8086 version 1.1.1
InfluxDB shell version: 1.1.1
> use telegraf
Using database telegraf
> select usage_iowait from cpu ORDER BY time DESC limit 5
name: cpu
time                    usage_iowait
----                    ------------
1478105250000000000     0
1478105250000000000     0
1478105250000000000     0.05012531328327943
1478105250000000000     0.10020040080169909
1478105250000000000     0

> precision rfc3339
> select usage_iowait from cpu ORDER BY time DESC limit 5
name: cpu
time                    usage_iowait
----                    ------------
2016-11-02T16:47:30Z    0
2016-11-02T16:47:30Z    0
2016-11-02T16:47:30Z    0.05012531328327943
2016-11-02T16:47:30Z    0.10020040080169909
2016-11-02T16:47:30Z    0

Deixa un comentari

L'adreça electrònica no es publicarà. Els camps necessaris estan marcats amb *

1 × 3 =