influxdata / influxdata/telegraf
Output to stdout by default
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
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
```console
$ 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the implementation of the `telegraf config` command and the validation that reports “no outputs found.” Reproduce the commands in the issue, then trace how the generated default configuration is loaded. Done means the stock configuration runs without customization and writes output to stdout by default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100