telegraf

Installation
SKILL.md

Telegraf

Overview

Set up Telegraf to collect, process, and forward metrics from systems, databases, and applications. Covers input/output plugin configuration, metric filtering, aggregation processors, and deployment patterns.

Two behaviours matter on current releases (1.38 and later):

  • Strict environment-variable handling is the default. $VAR and ${VAR} are substituted only inside quoted string values; a variable that is not set is not reported: ${NAME} stays as literal text (or the value ends up empty), so write ${NAME:?NAME is required} for anything mandatory, and a literal $ must be written $$. Start with --non-strict-env-handling only as a stop-gap.
  • fieldpass/fielddrop are deprecated. Use fieldinclude/fieldexclude; namepass, namedrop, tagpass, taginclude and friends are unchanged.

Install with the vendor's apt/yum repository (package telegraf, config in /etc/telegraf/) or run the telegraf Docker image (see Task F). Validate before every deploy:

telegraf --config /etc/telegraf/telegraf.conf --config-directory /etc/telegraf/telegraf.d --test   # one gather, prints line protocol, writes nothing

Instructions

Installs
3
GitHub Stars
197
First Seen
Mar 13, 2026