Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exec input should be able to handle long-running commands #2087

Closed
phemmer opened this issue Nov 25, 2016 · 3 comments
Closed

exec input should be able to handle long-running commands #2087

phemmer opened this issue Nov 25, 2016 · 3 comments
Labels
area/exec feature request Requests for new plugin and for new features to existing plugins

Comments

@phemmer
Copy link
Contributor

phemmer commented Nov 25, 2016

Feature Request

Proposal:

The exec input should be able to handle commands which run, and then stream their output data.

Current behavior:

Currently telegraf expects commands launched by the exec input to generate output and then exit. Thus telegraf buffers all the output until the command does exit.

Desired behavior:

Telegraf should instead be able to launch the command and read the output as the command generates it.

Use case: [Why is this important (helps with prioritizing requests)]

This is useful for plugins which stay running, generating statistics on their own interval. Currently the only way to get data from such inputs is through some sort of socket (tcp/udp), which is less than ideal.

In my specific use case, I am trying to launch a second telegraf inside a network namespace to collect statistics from that namespace. I have the second telegraf configured with the file output plugin writing to STDOUT.

@paulgear
Copy link

This would also help in porting/adapting input plugins from older systems like collectd.

@shish
Copy link

shish commented Dec 26, 2018

Looks like #4424 implements this, just waiting for it to be merged

@sspaink
Copy link
Contributor

sspaink commented Mar 22, 2022

Resolved with #4424

@sspaink sspaink closed this as completed Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/exec feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

5 participants