docker
and a suitable config file
N.B. Disable SE Linux (or figure out how to get it to play well with Docker and local file mounts)
Clone this repo
git clone https://github.com/GlobalNOC/tsds-telegraf.git
Build the container
docker build -t tsds-telegraf .
Pull the container from Docker Hub and tag the image so the following commands work.
docker pull ghcr.io/globalnoc/tsds-telegraf
docker tag ghcr.io/globalnoc/tsds-telegraf tsds-telegraf
Place config file(s) in conf.d
directory
e.g. Copy conf/config.yaml
and conf/telegraf_interface_example.conf
to conf.d
and edit accordingly.
docker run -d --name tsds-telegraf -v $(pwd)/conf.d:/etc/telegraf/conf.d tsds-telegraf
docker logs tsds-telegraf
Copy conf/test.conf.example
to conf.d/test.conf
and run
docker run --rm --name tsds-telegraf -v $(pwd)/conf.d:/etc/telegraf/conf.d tsds-telegraf
You should see telegraf logs and eventually a bunch of output related to cpu and memory.
ctrl-c
to exit.