dockerfiles/influxdb
kev 82143a5b63 swith to new domain: easypi.pro 2017-05-08 07:05:07 +08:00
..
Dockerfile swith to new domain: easypi.pro 2017-05-08 07:05:07 +08:00
README.md update 2016-12-13 19:34:39 +08:00
docker-compose.yml update influxdb 2016-05-24 11:29:59 +08:00

influxdb

⚠️ Please use the official image influxdb!

InfluxDB is an open source distributed time series database with no external dependencies. It's useful for recording metrics, events, and performing analytics.

docker-compose.yml

For official image:

influxdb:
  image: influxdb:alpine
  ports:
    - "8083:8083"
    - "8086:8086"
  volumes:
    - ./data:/var/lib/influxdb
  restart: always

For unofficial image:

influxdb:
  image: vimagick/influxdb
  ports:
    - "8083:8083"
    - "8086:8086"
    - "8088:8088"
    - "25826:25826/udp"
  restart: always

up and running

$ docker-compose up -d
$ docker-compose exec influxdb influx
>>> show databases
name: databases
name
----
_internal
db_name

>>> use db_name
Using database db_name

>>> show series
key
---
cpu

>>> quit
  • Open url: http://localhost:8083
  • Create user: CREATE USER "username" WITH PASSWORD 'password'
  • Create database: CREATE DATABASE "db_name"
  • Select database: db_name
  • Write data: INSERT cpu,host=serverA,region=us_west value=0.64
  • Query data: SELECT * FROM cpu