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

[Feature request] Add lock option to the IPtables input plugin #2144

Closed
ldep30 opened this issue Dec 12, 2016 · 1 comment
Closed

[Feature request] Add lock option to the IPtables input plugin #2144

ldep30 opened this issue Dec 12, 2016 · 1 comment

Comments

@ldep30
Copy link
Contributor

ldep30 commented Dec 12, 2016

Feature Request

Proposal:

Add an option allowing to pass the -w argument to the Iptables command called by the plugin

Current behavior:

Iptables commands are launched without any lock argument

Desired behavior:

Add an option like use_lock = true|false to the plugin configuration. If the option is set to true, then add -w to the Iptables arguments.

Use case:

In our case, using multiple inputs.iptables plugins can lead to concurrent Iptables access resulting in "ERROR in input [inputs.iptables]: exit status 4" messages in telegraf.log and missing metrics. This can be partially fixed using collection_jitter = "3s" in the agent section of telegraf.conf, but this is not an ideal solution. The -w switch should solve the problem according to the Iptables man page :

-w, --wait
Wait for the xtables lock. To prevent multiple instances of the program from running concurrently, an attempt will be made to obtain an exclusive lock at launch. By default, the program will exit if the lock cannot be obtained. This option will make the program wait until the exclusive lock can be obtained.

@sparrc sparrc added this to the Future Milestone milestone Dec 12, 2016
@danielnelson danielnelson removed this from the Future Milestone milestone Jun 14, 2017
@sspaink
Copy link
Contributor

sspaink commented Feb 28, 2022

Resolved by #2201

@sspaink sspaink closed this as completed Feb 28, 2022
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

No branches or pull requests

4 participants