Re: Custom field addition to Statistics Report webpage?

2011-01-27 Thread Gabriel Sosa
I like this idea but I would opt for json or yamls, right now json is
being widely accepted and the overhead is really low compared to xml.

Just my two cents

Regards

On Thu, Jan 27, 2011 at 11:21 AM, John Feuerstein  wrote:
>> That's what we'd all like. Currently the CSV lacks some information
>> compared to the HTML. But we can't export everything in it without
>> breaking its simple format, and breaking it is out of questions. So
>> my goal is to have a "detailed" version of the CSV that would use
>> quotes to delimit strings, and that more advanced parsers will be
>> able to use.
>
> Just as an idea: What do you think about an additional XML stats output
> format? The CSV could stay backwards compatible with basic/technical
> information only, while the XML format could be (similar to the HTML/XHTML)
> configurable with custom fields. It would prevent breaking parsers even if
> haproxy itself adds new fields in the future. The data could be grouped
> logically, no need to store identifiers multiple times...
>
> Best,
> John
>
>



-- 
Gabriel Sosa
Si buscas resultados distintos, no hagas siempre lo mismo. - Einstein



Re: Custom field addition to Statistics Report webpage?

2011-01-27 Thread John Feuerstein

That's what we'd all like. Currently the CSV lacks some information
compared to the HTML. But we can't export everything in it without
breaking its simple format, and breaking it is out of questions. So
my goal is to have a "detailed" version of the CSV that would use
quotes to delimit strings, and that more advanced parsers will be
able to use.


Just as an idea: What do you think about an additional XML stats output 
format? The CSV could stay backwards compatible with basic/technical 
information only, while the XML format could be (similar to the 
HTML/XHTML) configurable with custom fields. It would prevent breaking 
parsers even if haproxy itself adds new fields in the future. The data 
could be grouped logically, no need to store identifiers multiple times...


Best,
John



Re: Custom field addition to Statistics Report webpage?

2011-01-26 Thread Willy Tarreau
On Wed, Jan 26, 2011 at 05:01:19PM -0800, Joel Krauska wrote:
> How about exporting that extra information in the csv?

That's what we'd all like. Currently the CSV lacks some information
compared to the HTML. But we can't export everything in it without
breaking its simple format, and breaking it is out of questions. So
my goal is to have a "detailed" version of the CSV that would use
quotes to delimit strings, and that more advanced parsers will be
able to use.

Regards,
Willy




Re: Custom field addition to Statistics Report webpage?

2011-01-26 Thread Joel Krauska

On 1/26/11 4:30 PM, Willy Tarreau wrote:

On Wed, Jan 26, 2011 at 03:00:00PM -0800, Joel Krauska wrote:

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


OK.


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


  L7OK/200 in 3ms


yes indeed.


I'd really like it to show up in the text portion of the page.

  L7OK/200 in 3ms : version v201


We should not do that simply because that enlarges columns. It's
hard to have the whole table fit on 1600x1200 screens when numbers
are big, so we cannot enlarge colums with varying response sizes.


Configurable option?


Not until the stats are fully reworked to become more configurable
at least.

Regards,
Willy



Understood.

How about exporting that extra information in the csv?

--Joel





Re: Custom field addition to Statistics Report webpage?

2011-01-26 Thread Willy Tarreau
On Wed, Jan 26, 2011 at 03:00:00PM -0800, Joel Krauska wrote:
> Ok, so I've modified our HTTP responses to include the version.

OK.

> I've noticed that it's only displayed as a tooltip (pop up box when you 
> mouse-over the TD).
> 
> 
>  L7OK/200 in 3ms

yes indeed.

> I'd really like it to show up in the text portion of the page.
> 
>  L7OK/200 in 3ms : version v201

We should not do that simply because that enlarges columns. It's
hard to have the whole table fit on 1600x1200 screens when numbers
are big, so we cannot enlarge colums with varying response sizes.

> Configurable option?

Not until the stats are fully reworked to become more configurable
at least.

Regards,
Willy




Re: Custom field addition to Statistics Report webpage?

2011-01-26 Thread Joel Krauska

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).



 L7OK/200 in 3ms


I'd really like it to show up in the text portion of the page.

 L7OK/200 in 3ms : version v201


Configurable option?

Cheers,

Joel



Re: Custom field addition to Statistics Report webpage?

2011-01-26 Thread Willy Tarreau
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




Re: Custom field addition to Statistics Report webpage?

2011-01-26 Thread Joel Krauska

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)

Cheers,

Joel





Re: Custom field addition to Statistics Report webpage?

2011-01-25 Thread Willy Tarreau
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




Custom field addition to Statistics Report webpage?

2011-01-25 Thread Joel Krauska
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?

Cheers,

--Joel