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 a monitoring uri to the stats port. #5151
Conversation
@ramr awesome, putting it within the stats listener is a good idea. LGTM |
My only other comment is maybe we want this always exposed. Ie, if you don't "turn on" stats we still add this listener and just don't include the stats section. If you choose a different stats port the health endpoint moves with it but it is always there. Thoughts? |
healthz? |
Yeah, I guess we could do that (did start of doing that after the initial commit but then backed away). Though it does mean that the port would have to be exposed out always and on the flip side of the argument, there's no way to turn off the monitoring uri. We can always address it later if someone wants more granular control on it. |
@liggitt next you will be asking for a SOAP envelope around the content!! ;^) |
give em a z and they take the whole alphabet |
Is everything on that port open or protected by the admin password? |
@liggitt there's 2 paths exposed on the stats port - the |
affect hosted backends but rather use the listener on the stats port to service health check requests. Of course the side effect here is that if you turn off stats, then the monitoring uri will not be available.
The last Zed you will ever wear is in, Agent L!! |
LGTM good call |
I'm cool with a follow up issue. I would suggest in the issue that we should always expose this, change "stats port" to "admin port", and key exposing stats on something other than port > 0 (--enable-stats=false, so we can continue defaulting pw/username). If you REALLY REALLY don't want a health check uri then customize the template. |
just be backwards compatible with any changes to the |
Yes every component we have should have an always on, publicly accessible On Oct 16, 2015, at 9:54 AM, Thomas Wiest notifications@github.com wrote: @ramr https://github.com/ramr @pweil- https://github.com/pweil- I would Not a huge issue for me, though. We'll make it work either way. — |
/bump @smarterclayton anything else required here? |
I think we're saying, if stats port is not specified we should still expose the health check only on the stats port. |
@smarterclayton so if stats port is not specified, then the default is to expose stats on port 1936 and the health check would still be enabled. However if I am reading your comment right and stats port is 0 which is what causes the health check to be disabled - that creates other problems (we can't listen/bind on that port as its 0). Now we could use the default port 1936 in that case - but it does sounds a bit hacky to do that here. |
It wouldn't be the stats port at that point, it'd be the health check On Tue, Oct 20, 2015 at 8:24 PM, Ram Ranganathan notifications@github.com
|
[test] |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/5997/) |
Evaluated for origin test up to e6ac51a |
LGTM [merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/3758/) (Image: devenv-rhel7_2547) |
Evaluated for origin merge up to e6ac51a |
Merged by openshift-bot
@pweil- PTAL Thx
This allows us to not affect hosted backends but rather use the listener on the stats port to
service health check requests. Of course the side effect here is that if you turn off stats, then the monitoring uri will not be available.
I debated putting this into the frontends 80 and 443 but felt it would be too onerous to introduce a config option or even allow a custom uri to be specified and there's of course the issue of clashing within the URI space of the backends (
/health
won't be available to the backend) But figured its easier to do it on a haproxy specific port we listen on for the web stats service,Usage examples:
The return code of 200 satisfies providers like GCE that don't just check connectivity but also the response code.
Update: Usage examples.