Skip to content

Instantly share code, notes, and snippets.

Last active March 2, 2017 18:11
What would you like to do?
Example on creating and using an InfluxDB database
$ influx -precision rfc3339 // starts the InfluxDB shell and shows time in rfc3339 format
Connected to http://localhost:8086 version 1.2.0
InfluxDB shell version: 1.2.0
> create database demo // Creates a new database
> use demo
Using database demo
> insert mysensor1 value=0.51 // Insert new datapoints
> insert mysensor1 value=0.53 // for the measurement
> insert mysensor1 value=0.45 // "mysensor1"
> select * from mysensor1 // Get the whole time series
name: mysensor1
time value
---- -----
2017-02-26T13:33:49.00279827Z 0.51
2017-02-26T13:33:53.045762633Z 0.53
2017-02-26T13:33:57.015427575Z 0.45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment