homeserver/monitoring/test-telegraf.sh

20 lines
561 B
Bash
Raw Normal View History

2021-01-09 20:40:51 +01:00
# call this script like "./test-telegraf.sh net:cpu"
docker run \
--rm \
--volume $(pwd)/telegraf/telegraf.conf:/telegraf.conf \
--volume /:/hostfs:ro \
--volume /var/run/utmp:/var/run/utmp:ro \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
-e HOST_ETC=/hostfs/etc \
-e HOST_PROC=/hostfs/proc \
-e HOST_SYS=/hostfs/sys \
-e HOST_VAR=/hostfs/var \
-e HOST_RUN=/hostfs/run \
-e HOST_MOUNT_PREFIX=/hostfs \
telegraf \
telegraf \
--config /telegraf.conf \
--input-filter $1 \
--test