Skip to content

Instantly share code, notes, and snippets.

@LarsBergqvist
Last active March 2, 2017 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LarsBergqvist/d2ddf35ed99fe523f1970a63b85ea9ac to your computer and use it in GitHub Desktop.
Save LarsBergqvist/d2ddf35ed99fe523f1970a63b85ea9ac to your computer and use it in GitHub Desktop.
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