InfluxDB - austral-electronics/Austral_Support GitHub Wiki
https://docs.influxdata.com/influxdb/v1.8/query_language/manage-database/
https://projetsdiy.fr/tutoriel-influxdb-installation-configuration-macos/
https://projetsdiy.fr/tutoriel-node-red-enregistrer-mesures-dht22-mysensors-influxdb/
https://funprojects.blog/2020/02/01/influxdb-with-node-red/
Vérify if influxDB is running (in a console) :
curl -sl -I localhost:8086/ping
show :
HTTP/1.1 204 No Content Content-Type: application/json Request-Id: 6362bbf7-2e43-11eb-8009-000000000000 X-Influxdb-Build: OSS X-Influxdb-Version: 1.6.4 X-Request-Id: 6362bbf7-2e43-11eb-8009-000000000000 Date: Tue, 24 Nov 2020 10:54:13 GMT
Open influxDB (in a console)
influx
Create a new Database and show all databases :
> CREATE DATABASE quantum > SHOW DATABASES
To delete an obsolete database:
> DROP DATABASE quantum
Create a new retention Policy and show it :
> CREATE RETENTION POLICY "3 months" ON quantum DURATION 90d REPLICATION 1 DEFAULT > SHOW RETENTION POLICIES ON quantum
Quit influx :
> quit
To go further :
https://flows.nodered.org/node/node-red-contrib-influxdb
store your datas flow in a msg.payload array
Add a 'InfluxDB Out' node and configure it :
Host : 127.0.0.1 Port : 8086 Database : quantum
In a console:
influx
>SHOW SERIES ON quantum
show:
key --- navigation
So see the datas:
> use quantum Using database quantum
> show measurements name: measurements name ---- navigation
>select time,Boatspeed,AW_angle from navigation where time > now() - 1m name: navigation time Boatspeed AW_angle ---- --------- -------- 1614074120461105089 -30.1 1614074120461315066 16.5 1614074120880261180 -30.1 1614074120880583580 16.5
-precision rfc3339
sudo du -sh /var/lib/influxdb/data/quantum
https://docs.influxdata.com/influxdb/v1.8/administration/backup_and_restore/
https://docs.influxdata.com/influxdb/v2.0/write-data/developer-tools/csv/ https://docs.influxdata.com/influxdb/cloud/reference/syntax/annotated-csv/extended/ https://stackoverflow.com/questions/50770966/influxdb-data-table-be-downloaded-as-csv-file http://googlielmo.blogspot.com/2017/10/exporting-influxdb-data-to-cvs-file.html https://getkotori.org/docs/handbook/influxdb.html
Export to a csv file :
cd git mkdir influxdb-export influx -database 'quantum' -execute 'SELECT * FROM navigation' -format csv > ~/git/influxdb-export/navigation.csv
influx -precision rfc3339 -database 'quantum' -execute 'SELECT * FROM navigation where time > now() - 1m fill(previous)' -format csv > ~/git/influxdb-export/navigation.csv
https://infrontconsulting.asia/excel-convert-iso-8601-formatted-timestamp-into-datetime/
http://www.datplot.com/download/
With an editor replace all ',' with ';' with excel in 'time' column replace '-' with '/' , 'T' with ' ' , 'Z' with and save the .csv
2021-02-23T13:31:53.895Z -> 2021/02/23 13:31:53.895
Open datplot :
File -> Load New Data Source -> \\quantum\partage\influxdb-export\navigation.csv