Skip to content

Add lock option to the IPtables input plugin#2201

Merged
sparrc merged 3 commits intoinfluxdata:masterfrom
ldep30:master
Feb 1, 2017
Merged

Add lock option to the IPtables input plugin#2201
sparrc merged 3 commits intoinfluxdata:masterfrom
ldep30:master

Conversation

@ldep30
Copy link
Contributor

@ldep30 ldep30 commented Dec 26, 2016

This PR adds IPtables lock support to the input plugin, related to #2144

Required for all PRs:

  • CHANGELOG.md updated (we recommend not updating this until the PR has been approved by a maintainer)
  • Sign CLA (if not already signed)
  • README.md updated (if adding a new plugin)

@sparrc
Copy link
Contributor

sparrc commented Jan 6, 2017

is there a reason we wouldn't want to always use the lock feature?

@sparrc sparrc added this to the 1.3.0 milestone Jan 6, 2017
@ldep30
Copy link
Contributor Author

ldep30 commented Jan 7, 2017

The "-w" option was added to the 1.4.20 version of IPtables in august 2013 (https://www.netfilter.org/projects/iptables/files/changes-iptables-1.4.20.txt). Maybe this feature should be kept optional for compatibility reasons, in the case where someone would be using Telegraf on a system shipped with an IPtables version older than 1.4.20 ?

@sparrc
Copy link
Contributor

sparrc commented Jan 9, 2017

ok, fair enough 👍

Copy link
Contributor

@sparrc sparrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentation needs cleaning up and tweaking

## iptables can be restricted to only list command "iptables -nvL" or "iptables -wnvl" if using 'use_lock = true'
use_sudo = false
## Setting 'use_lock' to true will run iptables with xtables lock support.
## This option is useful to avoid iptables concurrency errors when running multiple instances of this plugin.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

limit line length to 80 chars and mention that use_lock simply adds the -w option to the iptables

Doc cleaning
@ldep30
Copy link
Contributor Author

ldep30 commented Jan 26, 2017

Doc has been cleaned up

@sparrc sparrc merged commit 07a6223 into influxdata:master Feb 1, 2017
mlindes pushed a commit to Comcast/telegraf that referenced this pull request Feb 6, 2017
* Update README.md

* Add lock support to the IPtables input plugin

* Update iptables.go

Doc cleaning
MrMaxBuilds pushed a commit that referenced this pull request Jun 26, 2018
* Update README.md

* Add lock support to the IPtables input plugin

* Update iptables.go

Doc cleaning
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 this pull request may close these issues.

2 participants