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

Adding support for Default Haproxy Stats Page #1034

Closed
wants to merge 8 commits into from

Conversation

pasancario
Copy link

Related to #1019

@sparrc
Copy link
Contributor

sparrc commented Apr 18, 2016

@pasancario you appear to have broke a unit test with this change and changed the default behavior. Can you explain why this was necessary?

@sparrc
Copy link
Contributor

sparrc commented Apr 20, 2016

@pasancario I think I understand the problem now.

But how about we just change this to have users specify the full path? guessing and parsing URLs is a recipe for failure.

So rather than parsing, just have the servers list look like this:

servers = [
  "http://myhaproxy.com:1936/;csv",
  "http://anotherhaproxy.com:1936/haproxy?stats;csv"
]

@pasancario
Copy link
Author

pasancario commented Apr 21, 2016

HI @sparrc ,

I just tried with this configuration:
servers = [ "http://myhaproxy.com:80/haproxy?stats", "http://myhaproxy.com:80/haproxy?stats;csv" ]
But it doesn't work as your are appending ;csv in final petition:
fmt.Sprintf("%s://%s%s/;csv", u.Scheme, u.Host, u.Path), nil)

I was only trying to give support to default haproxy configuration URI. We can change then URI passed by configuration file, and let haproxy plugin use it as a final request, without modifying or appending anything.

@sparrc
Copy link
Contributor

sparrc commented Apr 28, 2016

@pasancario I can merge this if you make the changes to have users specify the full URL

@pasancario
Copy link
Author

I changed it made user specify full URL, and also change default behaviour (with ;csv too)

@sparrc
Copy link
Contributor

sparrc commented May 2, 2016

you need to run go fmt ./... on your code

@sparrc
Copy link
Contributor

sparrc commented May 3, 2016

So what does this change for users exactly? Does the SampleConfig need to change?

Also please update the changelog

Added full URI to parse haproxy stats
@sparrc
Copy link
Contributor

sparrc commented May 4, 2016

@pasancario Thanks for the readme, but I meant the SampleConfig() function, this needs to change to return the correct URLs.

You'll also need to rebase because there was a separate PR for haproxy unix socket support.

@sparrc
Copy link
Contributor

sparrc commented May 26, 2016

closing for lack of updates, @pasancario please feel free to open a new PR with your changes rebased off of master.

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