This is a Docker image initially inspired by the Docker Image with InfluxDB and Grafana repo from Phil Hawthorne, https://github.com/philhawthorne/docker-influxdb-grafana
The main point of difference with this image is:
- 2023 Updated Grafana to Version 9.3.6
Description | Value |
---|---|
InfluxDB | 1.8.2 |
ChronoGraf | 1.8.6 |
Grafana | 9.3.6 |
After creating the container do the following. Some of the plugins may not work correctly, and need to be udpated.
- docker exec -it docker-influxdb-grafana /bin/bash
- grafana-cli plugins update-all
- exit
- docker restart docker-influxdb-grafana
To run this with docker-compose use:
version: '3.3'
services:
docker-influxdb-grafana:
container_name: docker-influxdb-grafana
restart: unless-stopped
ports:
- '3003:3003'
- '3004:8083'
- '8086:8086'
volumes:
- './influxdb:/var/lib/influxdb'
- './grafana:/var/lib/grafana'
image: 'mspencerl87/docker-influxdb-grafana:latest'
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 \
philhawthorne/docker-influxdb-grafana:latest
To stop the container launch:
docker stop docker-influxdb-grafana
To start the container again launch:
docker start docker-influxdb-grafana
Host Container Service
3003 3003 grafana
3004 8083 chronograf
8086 8086 influxdb
docker exec -it <CONTAINER_ID> bash
Username: root
Password: root
- Using the wizard click on
Add data source
- Choose a
name
for the source and flag it asDefault
- Choose
InfluxDB
astype
- Choose
direct
asaccess
- Fill remaining fields as follows and click on
Add
without 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
influx
to open InfluxDB Shell (CLI)