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

Conversation

Projects
None yet
2 participants
@grugrut
Contributor

grugrut commented Jun 1, 2017

Required for all PRs:

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

Nice job, special thanks for adding the configurable sudo use. There are just some very minor tweaks and we should be able to merge.

Show outdated Hide outdated plugins/inputs/fail2ban/fail2ban.go
f.path = path
}
inputs.Add("fail2ban", func() telegraf.Input {
return &f

This comment has been minimized.

@danielnelson

danielnelson Jun 8, 2017

Contributor

Make a copy so settings are not shared if there are multiple plugins. See #2684

@danielnelson

danielnelson Jun 8, 2017

Contributor

Make a copy so settings are not shared if there are multiple plugins. See #2684

Show outdated Hide outdated plugins/inputs/fail2ban/fail2ban.go
## 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

This comment has been minimized.

@danielnelson

danielnelson Jun 8, 2017

Contributor

Indent this two spaces, since we splice this together for the sample config. Check with telegraf --input-filter fail2ban --output-filter none config

@danielnelson

danielnelson Jun 8, 2017

Contributor

Indent this two spaces, since we splice this together for the sample config. Check with telegraf --input-filter fail2ban --output-filter none config

Show outdated Hide outdated plugins/inputs/fail2ban/README.md
``` toml
# use sudo to run fail2ban-client
use_sudo = false
```

This comment has been minimized.

@danielnelson

danielnelson Jun 8, 2017

Contributor

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 Jun 8, 2017

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@grugrut

grugrut Jun 21, 2017

Contributor

@danielnelson
Thanks for review, and I modified problems.

Contributor

grugrut commented Jun 21, 2017

@danielnelson
Thanks for review, and I modified problems.

@danielnelson danielnelson merged commit ca9cec2 into influxdata:master Jun 21, 2017

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

jeichorn added 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