On 2012-10-17 00:46, Willy Tarreau wrote:
On Tue, Oct 16, 2012 at 11:33:44PM +0200, Baptiste wrote:
If you do that, it would be good to add a "stats css-file" to tell
HAProxy to load CSS from a local file at startup...
This avoid you to have a webserver running only for serving a CSS (or
using HAProxy with a dedicated listen to match the URL and serve the
file as well....)

Could be an idea too. Anyway I think that people who would use the CSS
URL would already have a server ready for this. This basically makes
sense for intern monitoring teams where web servers are deployed
everywhere.

Well, yes, but if the server is down, css will not be loaded and this will make it harder to read the stats page and to find, that the server is down. Possibly, it will also require a lot of time to load the page.

BTW: if you are going to implement reading a css from a file, please make sure that we check if size of the file is <= BUFSIZE minus html headers.

Probably the easiest way to do this, is to split DATA_ST_HEAD into DATA_ST_HEAD_BEGIN, DATA_ST_HEAD_CSS and DATA_ST_HEAD_END, so we can fill msg up to the trashlen in DATA_ST_HEAD_CSS. I think this is what I did, when I was implementing this.

And yes, I still should have a ~2y old patch patch somewhere for this, but have not been able to find this while writing this e-mail. I wish I had sent it then. :| Anyway, I will try to find it tomorrow - it is 11PM here, time to sleep. ;)

Best regards,

                        Krzysztof Olędzki


Reply via email to