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

HAproxy admin socket filename globbing #1700

Closed

Conversation

weshmashian
Copy link

When dealing with multiple instances of HAproxy (or just multiple admin sockets) on a single server, it might be useful to just add wildcard match in configuration file, server=["/var/run/haproxy*.sock"] for example.

With proper naming and socket locations telegraf could send out stats without manual intervention. The only thing not tested is if telegraf client needs to be reloaded to pick up (or forget) sockets as they appear/disappear.

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 Sep 7, 2016

Looks good but you'll need to write some tests for this, as well as documenting this behavior: see https://github.com/influxdata/telegraf/blob/master/plugins/inputs/haproxy/haproxy_test.go#L174 for how the current socket test looks.

@sparrc sparrc added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Sep 7, 2016
@weshmashian
Copy link
Author

Thanks for the suggestions. I took the opportunity to rework the tests a bit and updated docs in sample config to reflect the behavior of the plugin.

@sparrc
Copy link
Contributor

sparrc commented Sep 8, 2016

great, thanks, any chance you could write a README for the plugin as well? 😬 🙏

see the general input example here: https://github.com/influxdata/telegraf/blob/master/plugins/inputs/EXAMPLE_README.md

@weshmashian
Copy link
Author

Sure, I'll whip something up and add it to this lot.

Marko Crnic added 8 commits September 16, 2016 11:09
This behaviour was introduced along with socket support, but never got
documented properly.
Map holding expected results was defined in multiple places, making test
cases a bit hard to read. This way we can change our expectations of
good results in one place and have them affect multiple test cases.
@weshmashian
Copy link
Author

Rebased to current master branch. Is there anything holding this off? Readme is rather short as the plugin is simple in terms of options and operation.

@sparrc sparrc added this to the 1.1.0 milestone Sep 16, 2016
@sparrc sparrc closed this in b702a97 Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants