Skip to content
A Docker repository to run Telegraf Agent
Branch: master
Clone or download
Pull request Compare This branch is 2 commits ahead, 1 commit behind loicortola:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Dockerfile
LICENSE
README.md
run.sh
telegraf.conf.template

README.md

docker-telegraf

A simple and easy-to-use Telegraf docker container.

Current version: 0.1.0

Default configuration template

The default configuration template (telegraf.conf.template) has been set with the following settings:

flush_interval = 10s  
flush_jitter = 5s  

Following parameters can be overridden (see Configuration section):

node = "node"  
interval = 1s  

[[outputs.influxdb]]  
  urls = ["http://localhost:8086"]  
  database = "metrics"
  precision = "s"  
  user = "root"  
  password = "root"

Procedure

Simply run this command on your host:

docker run -t loicortola/telegraf

Configuration

Multiple environment variables can be set to better configure your Telegraf container.

  • NODE_NAME : a global tag for your node. Tag will be called "node" (default value: "node")
  • INTERVAL : set the default interval to perform data collection. (default value: 1s)
  • HOST : change the target InfluxDB host (default: "localhost")
  • PORT : change the default InfluxDB HTTP API port (default: "8086")
  • DB : change the InfluxDB name where data will be sent (default: "metrics")
  • USERNAME : provide username for the target InfluxDB (default: "root")
  • PASSWORD : provide password for the target InfluxDB (default: "root")

Examples:

docker run -t -e "HOST=influx.loicortola.com" -e "USER=metrics" -e "PASSWORD=1234password" loicortola/telegraf  
docker run -t -e "NODE_NAME=local" -e "DB=localmetrics" -e "INTERVAL=10s" -e "PORT=8111" loicortola/telegraf
You can’t perform that action at this time.