Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using HAProxy for load balancing and would like to make the stats page visible for certain people. I have already configured this to a point where the users must log into the website first and then under the status page of the site will load an iframe of HAProxy's status. However, I am wanting to remove the top portion of the page and just have the server statistics. Is this even possible?

share|improve this question
add comment

2 Answers

You can do this directly in HA Proxy

stats enable
stats auth user:pass
stats uri     /haproxy-status

You can set whatever URI you wish.

You can find full details in

http://haproxy.1wt.eu/download/1.3/doc/configuration.txt

Look near: stats auth :

share|improve this answer
1  
This doesn't really get into modifying the stats page though. It's already enabled and working just fine, but I'm looking to change what is displayed. Their documentation does not really cover that. –  kobaltz Dec 16 '11 at 3:52
add comment

Have you dug into the source directory to see where the HTML lives? You could just grep the source directory for some relevant phrases (i.e.: what it says on the stats page) and it'll turn up any files that contain them. Then you can modify to your heart's content. That's the most foolproof way. Another way, though not recommended, is to fetch the stats page via AJAX using something like jQuery. Then you can dynamically and programmatically remove the parts you don't want before inserting them into an iframe or div element. I still say go with my first suggestion.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.