1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-25 16:28:40 +00:00
dockerfiles/influxdb/README.md

69 lines
1.2 KiB
Markdown
Raw Normal View History

2015-08-15 17:56:52 +00:00
influxdb
========
2016-05-24 03:29:59 +00:00
> :warning: Please use the official image [influxdb](https://hub.docker.com/_/influxdb/)!
2016-03-26 00:34:17 +00:00
[InfluxDB][1] is an open source distributed time series database with no external
2015-08-15 17:56:52 +00:00
dependencies. It's useful for recording metrics, events, and performing
analytics.
2016-03-26 00:34:17 +00:00
2016-05-02 14:42:42 +00:00
## docker-compose.yml
2016-06-01 05:50:01 +00:00
For official image:
2016-05-24 03:29:59 +00:00
```yaml
influxdb:
image: influxdb:alpine
ports:
- "8083:8083"
- "8086:8086"
volumes:
- ./data:/var/lib/influxdb
restart: always
```
2016-06-01 05:50:01 +00:00
For unofficial image:
2016-05-02 14:42:42 +00:00
```yaml
influxdb:
image: vimagick/influxdb
ports:
- "8083:8083"
- "8086:8086"
- "8088:8088"
- "25826:25826/udp"
restart: always
```
2016-03-26 00:34:17 +00:00
2016-05-10 06:58:37 +00:00
## up and running
2016-12-13 11:34:39 +00:00
```bash
$ 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
```
2016-05-10 06:58:37 +00:00
- 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`
2016-03-26 00:34:17 +00:00
[1]: https://influxdata.com/