influxdata/telegraf

Output to stdout by default

Open

#16,718 建立於 2025年4月2日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)Go (9,892 star) (4,161 fork)batch import
feature requesthelp wantedsize/s

描述

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

貢獻者指南