-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
area/execarea/execdIssues related to execd or plugins that would be better suited to be used through execdIssues related to execd or plugins that would be better suited to be used through execdfeature requestRequests for new plugin and for new features to existing pluginsRequests for new plugin and for new features to existing plugins
Description
Feature Request
Proposal:
Add an option in inputs.exec and inputs.execd to pass custom environment variables to their child process.
Current behavior:
Currently, if you want to pass some values to the child process, you can only use the command line parameters or the whole environment of Telegraf.
Desired behavior:
For inputs.execd, there is always a single command so we could have an option like this:
[[inputs.execd]]
command = ["/path/to/my/process"]
[inputs.execd.env]
CUSTOM_VAR_1 = "var1"
CUSTOM_VAR_2 = "var2"
CUSTOM_VAR_2 = "var3"
Use case:
This can be useful to easily customize the child process behavior without having a separate configuration file and not display this information in the command line (e.g. for credentials)
an-mmx
Metadata
Metadata
Assignees
Labels
area/execarea/execdIssues related to execd or plugins that would be better suited to be used through execdIssues related to execd or plugins that would be better suited to be used through execdfeature requestRequests for new plugin and for new features to existing pluginsRequests for new plugin and for new features to existing plugins