Hi, I am trying to use docker-compose to setup influx_cli and telegraf with influxdb. I have been using influxdb for a couple of weeks now.
This is the docker compose file:
influxdb:
image: influxdb:latest
volumes:
# Mount for influxdb data directory and configuration
- ./influxdb2:/var/lib/influxdb2:rw
ports:
- "8086:8086"
# Use the influx cli to set up an influxdb instance.
influxdb_cli:
ulimits:
nofile: 100000
links:
- influxdb
image: influxdb:latest
volumes:
# Mount for influxdb data directory and configuration
- ./influxdb2:/var/lib/influxdb2:rw
- ./ssl/influxdb-selfsigned.crt:/etc/ssl/influxdb-selfsigned.crt:rw
- ./ssl/influxdb-selfsigned.key:/etc/ssl/influxdb-selfsigned.key:rw
environment:
# Use these same configurations parameters in your telegraf configuration, mytelegraf.conf.
- DOCKER_INFLUXDB_INIT_MODE=setup
- DOCKER_INFLUXDB_INIT_USERNAME=KMansour
- DOCKER_INFLUXDB_INIT_PASSWORD=Lebanon25
- DOCKER_INFLUXDB_INIT_ORG=Vadimus
- DOCKER_INFLUXDB_INIT_BUCKET=Project1
- INFLUXD_BOLT_PATH=./influxdb2/influxd.bolt
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=ufvddBPqWQe-hnfEh0dGiIXEKTmZJoR1WkhzTo4AaBhj22I71zftNsWhkp10mRyRU5-FXMYtfRNZkIMPdwrczw==
- INFLUXD_TLS_CERT=/etc/ssl/influxdb-selfsigned.crt
- INFLUXD_TLS_KEY=/etc/ssl/influxdb-selfsigned.key
entrypoint: [ "./entrypoint.sh" ]
restart: on-failure:10
depends_on:
- influxdb
telegraf:
image: telegraf
links:
- influxdb
volumes:
# Mount for telegraf config
- ./telegraf/mytelegraf.conf:/etc/telegraf/telegraf.conf
env_file:
- ./influxv2.env
environment:
- DOCKER_INFLUXDB_INIT_ORG=Vadimus
- DOCKER_INFLUXDB_INIT_BUCKET=Project1
- DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=ufvddBPqWQe-hnfEh0dGiIXEKTmZJoR1WkhzTo4AaBhj22I71zftNsWhkp10mRyRU5-FXMYtfRNZkIMPdwrczw==
depends_on:
- influxdb_cli
I am getting this error when setting up influxdb_cli:
Do you know how I can fix this error? Even when I remove all containers, images and volumes from docker and start again with the docker compose it doesn’t seem to fix it.
I don’t get any errors for the influxdb setup however and I can connect to the ui with port 8086.
Thank you!