Skip to content
This repository has been archived by the owner on Feb 26, 2018. It is now read-only.

Latest commit

 

History

History
49 lines (32 loc) · 1.5 KB

influxdb.md

File metadata and controls

49 lines (32 loc) · 1.5 KB

InfluxDB

InfluxDB is a great reference for tsdb-ql

TODO

Background

Install

  • Download binary from https://www.influxdata.com/downloads/#influxdb
  • Extract and put the bin folder in path, i.e. export PATH=$PATH:$HOME/app/influxdb/usr/bin
  • run influxd to start the daemon
  • run influx to enter interactive shell or import data
  • TODO: figure out where the disk data is stored

Query Language

The entry can be found in https://docs.influxdata.com/influxdb/v1.2/query_language/

  • curl https://s3.amazonaws.com/noaa.water-database/NOAA_data.txt -o NOAA_data.txt
  • SELECT COUNT(water_level) FROM h2o_feet
  • SELECT * FROM h2o_feet LIMIT 5
  • InfluxQl Short

Select

  • SELECT <field_key>[,<field_key>,<tag_key>] FROM <measurement_name>[,<measurement_name>]

Where

  • field value can be string/value

  • tag value are all string

  • timestamp

    • TODO: we can have a strict mode?
    • does it support now? now+1min etc. Yes it does, now() + 6m
  • functions

Group by