influxdata/telegraf

Output to stdout by default

Open

#16,718 opened on Apr 2, 2025

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Go (9,892 stars) (4,161 forks)batch import
feature requesthelp wantedsize/s

Description

Use Case

Modern applications use an approach called zero configuration, in which the default configuration file is 100% valid.

Today, telegraf takes a more classical approach, requiring the user to customize configuration. Otherwise the application crashes. That's an awful out of the box experience.

Instead of bombing out with generic parse error messages on the stock configuration file, telegraf should automatically set outputs.file to ["stdout"].

By the way, the default configuration file has many gaps in terms of failing to mention the default configuration, for about half of the assorted fields. Many of the fields fail to nest comments, further complicating the default behavior.

The documentation occasionally hints at a need to customize outputs, but that's still a far cry from zeroconf.

Expected behavior

Output to stdout by default, so that the telegraf config default configuration file finally becomes 100% valid.

Actual behavior

$ telegraf config >telegraf.config
$ telegraf -config telegraf.conf
2025-04-02T16:58:47Z I! Loading config: telegraf.conf
2025-04-02T16:58:47Z E! [telegraf] Error running agent: no outputs found, probably invalid config file provided

Additional info

No response

Contributor guide