Skip to content

docs: clarify partial configuration behaviour #18306

@redbaron

Description

@redbaron

Use Case

We run telegraf passing multiple --config params. One config contains [agent] and [output] and another one (dynamically generated) contains multiple [input] entries.

Current documentation has following warning:

Telegraf doesn’t concatenate configuration files before processing them. Each configuration file that you provide must be a valid configuration.
If you want to use separate files to manage a configuration, you can use your own custom code to concatenate and pre-process the files, and then provide the complete configuration to Telegraf

Clearly our setup doesn't match it: dynamic config is not self-contained, yet this setup seems to work as if files are concatenated.

Also if files are truly not concatenated, then how multiple --config or --config-directory are even supported?

Expected behavior

Clarify how telegraf processes multiple configuration files:

  • does it internally concatenate them? If so, then in what order? If directory is taken, does it sort files lexicographically (default ls command) or takes them in whatever order filesystem stores them (ls -f on macOS)?
  • if same section, for example [agent], appears in multiple files, how is it handled? Does the whole section definition from one of them used (which? first? last?) or individual config params within section are merged? (if they are, how maps and lists are merged?)

Actual behavior

Documentation seems inaccurate

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequests for new plugin and for new features to existing plugins

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions