-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add input plugin for Fail2ban. #2875
Add input plugin for Fail2ban. #2875
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job, special thanks for adding the configurable sudo use. There are just some very minor tweaks and we should be able to merge.
plugins/inputs/fail2ban/fail2ban.go
Outdated
f.path = path | ||
} | ||
inputs.Add("fail2ban", func() telegraf.Input { | ||
return &f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make a copy so settings are not shared if there are multiple plugins. See #2684
plugins/inputs/fail2ban/fail2ban.go
Outdated
## Setting 'use_sudo' to true will make use of sudo to run fail2ban-client. | ||
## Users must configure sudo to allow telegraf user to run fail2ban-client with no password. | ||
## This plugin run only "fail2ban-client status". | ||
use_sudo = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indent this two spaces, since we splice this together for the sample config. Check with telegraf --input-filter fail2ban --output-filter none config
plugins/inputs/fail2ban/README.md
Outdated
``` toml | ||
# use sudo to run fail2ban-client | ||
use_sudo = false | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the toml table header:
[[inputs.fail2ban]]
## fail2ban-client require root access.
## Setting 'use_sudo' to true will make use of sudo to run fail2ban-client.
## Users must configure sudo to allow telegraf user to run fail2ban-client with no password.
## This plugin run only "fail2ban-client status".
use_sudo = false
@danielnelson |
Required for all PRs: