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

Input execd - "restart_delay" config is ignored #7858

Closed
Trovalo opened this issue Jul 20, 2020 · 3 comments · Fixed by #7867
Closed

Input execd - "restart_delay" config is ignored #7858

Trovalo opened this issue Jul 20, 2020 · 3 comments · Fixed by #7867
Assignees

Comments

@Trovalo
Copy link
Collaborator

Trovalo commented Jul 20, 2020

In the execd input plugin, the configuration parameter restart_delay is not used, and a fixed value of 10 seconds is used.

see row below:

RestartDelay: config.Duration(10 * time.Second),

@ssoroka
Copy link
Contributor

ssoroka commented Jul 20, 2020

This is just the default for the plugin, and should be set from config after creation. Missing toml tags might be problematic. Are you seeing any problems changing the default?

@ssoroka ssoroka self-assigned this Jul 20, 2020
@Trovalo
Copy link
Collaborator Author

Trovalo commented Jul 20, 2020

I've tried with several values of restart_delay (by default set to 10s), but the value gets ignored and the executable restarts after 10s.
I had a look in the code, and personally I didn't find any reference to the value defined in the telegraf configuration (but I'm not so good at GO yet)

A sample conf section

[[inputs.execd]]

  ## use bat file
  command = ['C:\Users\gluisotto\Desktop\test_Telegraf\StartPrintrandom.bat']

  signal = "none"
  restart_delay = "25s"
  data_format = "influx"

In case of error, this is what I get in the log:

2020-07-20T14:52:21Z I! Process [C:\Users\gluisotto\Desktop\test_Telegraf\StartPrintrandom.bat] terminated: %!s(<nil>)
2020-07-20T14:52:21Z I! Restarting in 10s...

@ssoroka
Copy link
Contributor

ssoroka commented Jul 20, 2020

I tested it here and can reproduce. I have a patch incoming. Thanks for the bug report :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants