On 1/26/11 2:06 AM, Willy Tarreau wrote:
On Wed, Jan 26, 2011 at 12:56:54AM -0800, Joel Krauska wrote:
On 1/25/11 10:48 PM, Willy Tarreau wrote:
Hi Joel,

On Tue, Jan 25, 2011 at 01:29:11PM -0800, Joel Krauska wrote:
I'm not sure if people have asked for this, but I would love a custom
field/column in the Stats Report web page.

Specifically, I would like to be able to see my backend server
version. This is a custom text string which I could provide a
health-check-like URL to populate.

Then the HAProxy stats page could be a one-stop page to watch during
rolling upgrades of backends.

Probably for easy customization, an external call to third party
script would be ideal.

Has anyone considered this before?  Is there any way to hack existing
features to do this?

You should take a look at "stats show-desc". You can already use it to
report a section-specific string. You can then have your upgrade script
fill it from a config template. For instance :

backend foo
        stats show-desc @@foo.version@@

Then replace @@foo.version@@ with whatever you like.

Assuming you're in a secure enough environment to consider such things,
you should also take a look at "stats show-legends" which reports much
more information (eg: mode, IPs, cookie names, etc...). This is different
>from what you asked for but will surely help troubleshoot issues if you
already feel concerned with the config version.

Cheers,
Willy


Willy,

I think you've described a per-backend description.
I enabled stats show-desc, but that's a per backend feature, right?

I'm looking for a per-server (subset of backend) field.

Use case:

backend pool foo has four servers: a,b,c,d

initial state, all four servers are running code rev 22.

I initiate a rolling upgrade, which includes a graceful shut, upgrade of
code and graceful start of each server.

The new code rev is 23.

As I upgrade the code on each server from version 22 to version 23...
It would be nice if HAProxy was able to poll a given URL to identify the
unique version of each server to monitor the progress of the upgrade and
confirm quickly/visually that all members of the same backend are in
sync at the end of an upgrade....

mid upgrade
a - version 23
b - version 23
c - down (currently be upgraded)
d - version 22


It's sort of like a special case of a healthcheck, but for a given URI
and displaying the output, not just if the check succeeded.


Something you'd consider adding?


In the meantime I've got my own little per server version table page
that has this info, but it's very similar to the haproxy page....
(pools and member servers)

OK I see better what you're looking for. Then you could already do
something like this using the health checks. Since the stats page
reports the health check response (eg: "200 OK"), the code which
handles the health check on the server could simply adjust the
response to report the version ("200 OK: version 1.12") and you'll
find it in the stats page.

Willy


Ok, so I've modified our HTTP responses to include the version.

I've noticed that it's only displayed as a tooltip (pop up box when you mouse-over the TD).

<td class=ac title="Layer7 check passed: OK: version v201">
<u> L7OK/200 in 3ms</u></td>


I'd really like it to show up in the text portion of the page.
<td class=ac title="Layer7 check passed: OK: version v201">
<u> L7OK/200 in 3ms : version v201</u></td>


Configurable option?

Cheers,

Joel

Reply via email to