influxdata / influxdata/telegraf

Output to stdout by default

Open
#16,718 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request help wanted size/s
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.