Skip to content

Instantly share code, notes, and snippets.

@mlabouardy
Created October 27, 2017 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlabouardy/c4d8effdb31ba75ac63326a8d911a379 to your computer and use it in GitHub Desktop.
Save mlabouardy/c4d8effdb31ba75ac63326a8d911a379 to your computer and use it in GitHub Desktop.
Telegraf, InfluxDB, Grafana stack
version: "2"
services:
influxdb:
container_name: influxdb
image: influxdb:1.0.2
ports:
- "8083:8083"
- "8086:8086"
volumes:
- /home/core/volumes/influxdb:/var/lib/influxdb
restart: always
grafana:
container_name: grafana
image: grafana/grafana:4.3.2
ports:
- "3000:3000"
links:
- influxdb
restart: always
telegraf:
container_name: telegraf
image: telegraf:1.3.3
network_mode: "host"
volumes:
- /home/core/conf/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf
- /var/run/docker.sock:/var/run/docker.sock
restart: always
@yaki123
Copy link

yaki123 commented Mar 6, 2018

Got error when starting telegraf. Is this volumes mount working? - /home/core/conf/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf

ERROR: for telegraf Cannot start service telegraf: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/Users/x7yv/home/core/conf/telegraf/telegraf.conf\" to rootfs \"/var/lib/docker/overlay2/d1630b537fdbb83cf1234b67f18b909f2acbc2be46937efd0bdc3fe27b483280/merged\" at \"/var/lib/docker/overlay2/d1630b537fdbb83cf1234b67f18b909f2acbc2be46937efd0bdc3fe27b483280/merged/etc/telegraf/telegraf.conf\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.

@ACSmith1337
Copy link

Got error when starting telegraf. Is this volumes mount working? - /home/core/conf/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf

ERROR: for telegraf Cannot start service telegraf: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting "/Users/x7yv/home/core/conf/telegraf/telegraf.conf" to rootfs "/var/lib/docker/overlay2/d1630b537fdbb83cf1234b67f18b909f2acbc2be46937efd0bdc3fe27b483280/merged" at "/var/lib/docker/overlay2/d1630b537fdbb83cf1234b67f18b909f2acbc2be46937efd0bdc3fe27b483280/merged/etc/telegraf/telegraf.conf" caused "not a directory""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.

I also get this error

@m4xim0
Copy link

m4xim0 commented Feb 27, 2019

marvelsoft@ubuntu-server:~/telegraf-influxdb-grafana$ sudo docker-compose -f /home/marvelsoft/telegraf-influxdb-grafana/docker-compose.yml up -d
influxdb is up-to-date
Creating telegraf ...
grafana is up-to-date
Creating telegraf ... error

ERROR: for telegraf Cannot start service telegraf: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/home/core/conf/telegraf/telegraf.conf\" to rootfs \"/var/lib/docker/overlay2/ee83723e903674b45343410e40d6834165d1fe2a4efeeda52b40594fa6250728/merged\" at \"/var/lib/docker/overlay2/ee83723e903674b45343410e40d6834165d1fe2a4efeeda52b40594fa6250728/merged/etc/telegraf/telegraf.conf\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

ERROR: for telegraf Cannot start service telegraf: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused "rootfs_linux.go:58: mounting \"/home/core/conf/telegraf/telegraf.conf\" to rootfs \"/var/lib/docker/overlay2/ee83723e903674b45343410e40d6834165d1fe2a4efeeda52b40594fa6250728/merged\" at \"/var/lib/docker/overlay2/ee83723e903674b45343410e40d6834165d1fe2a4efeeda52b40594fa6250728/merged/etc/telegraf/telegraf.conf\" caused \"not a directory\""": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment