Firstly I ran a influxdb container by docker client . And now I want to run a telegraf container which collects the containers' datas and the hypervisor host' data like cpu\mem\diskio and so on . But I failed , the docker logs show that I can't map the custom telegraf.conf to the container's /etc/telegraf/telegraf.conf .
BASIC INFO :
- docker version : 1.13.1
- centos version : centos7
- kernel version : 3.10.0-957.12.2.el7.x86_64
COMMANDS I tried :
Influxdb : docker network create influxdb docker run -d -p 8086:8086 -p 8083:8083 --name=influxdb --net=influxdb docker.io/influxdb
Telegraf : docker run -d --name=telegraf --net=influxdb \ -e HOST_PROC=/host/proc \ -v /proc:/host/proc:ro \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /root/telegraf.conf:/etc/telegraf/telegraf.conf:ro \ telegraf
[root@localhost ~]# docker logs telegraf 2019-05-19T03:05:17Z I! Starting Telegraf 1.10.4 2019-05-19T03:05:17Z E! [telegraf] Error running agent: No config file specified, and could not find one in $TELEGRAF_CONFIG_PATH, /root/.telegraf/telegraf.conf, or /etc/telegraf/telegraf.conf