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

Add input plugin for Fail2ban. #2875

Merged
merged 5 commits into from
Jun 21, 2017
Merged

Add input plugin for Fail2ban. #2875

merged 5 commits into from
Jun 21, 2017

Conversation

grugrut
Copy link
Contributor

@grugrut grugrut commented Jun 1, 2017

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

Copy link
Contributor

@danielnelson danielnelson left a 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.

f.path = path
}
inputs.Add("fail2ban", func() telegraf.Input {
return &f
Copy link
Contributor

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

## 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
Copy link
Contributor

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

``` toml
# use sudo to run fail2ban-client
use_sudo = false
```
Copy link
Contributor

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 danielnelson added this to the 1.4.0 milestone Jun 8, 2017
@grugrut
Copy link
Contributor Author

grugrut commented Jun 21, 2017

@danielnelson
Thanks for review, and I modified problems.

@danielnelson danielnelson merged commit ca9cec2 into influxdata:master Jun 21, 2017
jeichorn pushed a commit to jeichorn/telegraf that referenced this pull request Jul 24, 2017
maxunt pushed a commit that referenced this pull request Jun 26, 2018
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