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

iptables input plugin use_lock error #6234

Closed
voiprodrigo opened this issue Aug 9, 2019 · 0 comments · Fixed by #6304
Closed

iptables input plugin use_lock error #6234

voiprodrigo opened this issue Aug 9, 2019 · 0 comments · Fixed by #6304
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@voiprodrigo
Copy link
Contributor

voiprodrigo commented Aug 9, 2019

Hi,
Versions: Telegraf 1.11.4 / CentOS 7.6

This is how telegraf calls iptables when use_lock is true:

execve("/usr/sbin/iptables", ["/usr/sbin/iptables", "-wnvL", "OUTPUT", "-t", "filter", "-x"], [/* 10 vars */] <unfinished ...>

Telegraf errors with exit code 2 in the log.

This is why:

# /usr/sbin/iptables -wnvL FORWARD -t filter -x
iptables v1.4.21: wait seconds not numeric

Solution: separate the -w flag from the rest of the flags:

# /usr/sbin/iptables -w -nvL FORWARD -t filter -x
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
    pkts      bytes target     prot opt in     out     source               destination
@danielnelson danielnelson added this to the 1.11.5 milestone Aug 9, 2019
@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants