This is a Docker image based on the awesome Docker Image with Telegraf (StatsD), InfluxDB and Grafana from Samuele Bistoletti.
The main point of difference with this image is:
- Persistence is supported via mounting volumes to a Docker container
- Grafana will store its data in SQLite files instead of a MySQL table on the container, so MySQL is not installed
- Telegraf (StatsD) is not included in this container
- Grafana Version has been updated to 7.3.1 , which supports Flux for InfluxDB.
- Flux endpoint is enabled in influxdb config to support direct access in grafana.
- Chronograf has a explore tab which supports building queries in flux language out of box.
| Description | Value |
|---|---|
| InfluxDB | 1.8.3 |
| ChronoGraf | 1.8.8 |
| Grafana | 7.3.1 |
To start the container with persistence you can use the following:
docker run -d \
--name docker-influxdb-grafana \
-p 3003:3003 \
-p 3004:8083 \
-p 8086:8086 \
-v /path/for/influxdb:/var/lib/influxdb \
-v /path/for/grafana:/var/lib/grafana \
dtushar/docker-influxdb-grafana:latestTo stop the container launch:
docker stop docker-influxdb-grafanaTo start the container again launch:
docker start docker-influxdb-grafanaHost Container Service
3003 3003 grafana
3004 8083 chronograf
8086 8086 influxdb
docker exec -it <CONTAINER_ID> bashUsername: root
Password: root
- Using the wizard click on
Add data source - Choose a
namefor the source and flag it asDefault - Choose
InfluxDBastype - Choose
directasaccess - Fill remaining fields as follows and click on
Addwithout altering other fields
Basic auth and credentials must be left unflagged. Proxy is not required.
Now you are ready to add your first dashboard and launch some queries on a database.
Username: root
Password: root
Port: 8086
- Establish a ssh connection with the container
- Launch
influxto open InfluxDB Shell (CLI)