Table of Contents

About

Telegraf is a metrics collector entirely plugin driven.

Plugins must be declared in the conf file to be active.

Steps

Installation

wget https://dl.influxdata.com/telegraf/releases/telegraf-1.2.1.x86_64.rpm
sudo yum localinstall telegraf-1.2.1.x86_64.rpm
# or with a local download
rpm -ivh telegraf-1.2.1.x86_64.rpm
Preparing...                ########################################### [100%]
   1:telegraf               ########################################### [100%]

Installed in: /usr/bin/telegraf

File Config

Config File Search order:

  • TELEGRAF_CONFIG_PATH,
  • /home/user/.telegraf/telegraf.conf,
  • or /etc/telegraf/telegraf.conf

Generate a config file in one of the above path

telegraf config > telegraf.conf

Environment variables can be used anywhere in this config file, simply prepend them with $.

  • For strings the variable must be within quotes (ie, “STR_VAR”),
  • For numbers and booleans they should be plain (ie, INT_VAR, BOOL_VAR)

Metrics

To see what metrics a config file would generate:

telegraf -config telegraf.conf -test

Documentation / Reference