Re: Getting JSON encoded data from the stats socket.

2016-07-26 Thread ge...@riseup.net
Hi, On 16-07-26 21:47:55, Willy Tarreau wrote: > I'd like to wait for other people to have the time to participate to > this discussion, I know that some people are very careful about the > relevance and accuracy of the stats, some people may want to report > other suggestions. I can't add that m

Re: Getting JSON encoded data from the stats socket.

2016-07-26 Thread Willy Tarreau
On Tue, Jul 26, 2016 at 09:06:05PM +0200, Pavlos Parissis wrote: > > You probably have not looked at the output of "show stats typed", it > > gives you the nature of each value letting you know how to aggregate > > them (min, max, avg, sum, pick any, etc). > > > > I have seen it but it isn't avai

Re: Getting JSON encoded data from the stats socket.

2016-07-26 Thread Pavlos Parissis
On 26/07/2016 06:56 μμ, Willy Tarreau wrote: > On Tue, Jul 26, 2016 at 05:51:08PM +0200, Pavlos Parissis wrote: >> In all my setups I have nbproc > 1 and after a lot of changes and on how I >> aggregate HAProxy >> stats and what most people want to see on graphs, I came up that with >> something

Re: Getting JSON encoded data from the stats socket.

2016-07-26 Thread Willy Tarreau
On Tue, Jul 26, 2016 at 05:51:08PM +0200, Pavlos Parissis wrote: > In all my setups I have nbproc > 1 and after a lot of changes and on how I > aggregate HAProxy > stats and what most people want to see on graphs, I came up that with > something like the following: > > { > "frontend": { >

Re: Getting JSON encoded data from the stats socket.

2016-07-26 Thread Pavlos Parissis
On 26/07/2016 03:30 μμ, Willy Tarreau wrote: > Hi Pavlos! > > On Tue, Jul 26, 2016 at 03:23:01PM +0200, Pavlos Parissis wrote: >> Here is a suggestion { "frontend": { "www.haproxy.org": { "bin": >> "", "lbtot": >> "55", ... }, "www.haproxy.com": { "bin": "", "lbtot":

Re: Getting JSON encoded data from the stats socket.

2016-07-26 Thread Willy Tarreau
On Tue, Jul 26, 2016 at 03:06:35PM +0100, Mark Brookes wrote: > Could we perhaps group by the node then process_num then? > {nodename:value: > {pid: pid1: { > haproxy: { > Uptime_sec:100, > PoolFailed:1 > } > stats: { "frontend": { > "ww

Re: Getting JSON encoded data from the stats socket.

2016-07-26 Thread Mark Brookes
Could we perhaps group by the node then process_num then? {nodename:value: {pid: pid1: { haproxy: { Uptime_sec:100, PoolFailed:1 } stats: { "frontend": { "www.haproxy.org": { "bin": "", "lbtot": "5

Re: Getting JSON encoded data from the stats socket.

2016-07-26 Thread Willy Tarreau
Hi Pavlos! On Tue, Jul 26, 2016 at 03:23:01PM +0200, Pavlos Parissis wrote: > Here is a suggestion > { > "frontend": { > "www.haproxy.org": { > "bin": "", > "lbtot": "55", > ... > }, > "www.haproxy.com": { >

Re: Getting JSON encoded data from the stats socket.

2016-07-26 Thread Pavlos Parissis
On 26/07/2016 03:08 μμ, Willy Tarreau wrote: > On Tue, Jul 26, 2016 at 02:05:56PM +0100, Mark Brookes wrote: >>> So for sure I definitely support this proposal :-) >> >> Thats great news. Do you have a JSON structure in mind? >> Or would you like me to come up with something? > > I'm probably the

Re: counters for specific http status code

2016-07-26 Thread Ruoshan Huang
> > > Yes you're right. For me this one fixes it (both with http-request and > multiple http-response), is that OK for you ? > > Yes, looks good to me. -- Good day! ruoshan

Re: Getting JSON encoded data from the stats socket.

2016-07-26 Thread Willy Tarreau
On Tue, Jul 26, 2016 at 02:05:56PM +0100, Mark Brookes wrote: > >So for sure I definitely support this proposal :-) > > Thats great news. Do you have a JSON structure in mind? > Or would you like me to come up with something? I'm probably the worst ever person to suggest a JSON structure. If you

Re: Getting JSON encoded data from the stats socket.

2016-07-26 Thread Mark Brookes
>So for sure I definitely support this proposal :-) Thats great news. Do you have a JSON structure in mind? Or would you like me to come up with something? On 5 July 2016 at 18:04, Willy Tarreau wrote: > Hi Mark, > > On Tue, Jul 05, 2016 at 10:05:13AM +0100, Mark Brookes wrote: >> Hi Willy/All >

Re: counters for specific http status code

2016-07-26 Thread Willy Tarreau
On Tue, Jul 26, 2016 at 08:44:59PM +0800, Ruoshan Huang wrote: > Ah, I just find a problem in this snip > > ``` > + if ((unsigned)(txn->status - 400) < > 100) > + stream_inc_http_err_ctr(s); > ``` > calling `stream

Re: counters for specific http status code

2016-07-26 Thread Ruoshan Huang
I'm afraid I have to duplicate some logic here, like: ``` if((unsigned)(txn->status - 400) < 100) { ptr = stktable_data_ptr(t, ts, STKTABLE_DT_HTTP_ERR_CNT); if (ptr) stktable_data_cast(ptr, http_err_cnt

Re: counters for specific http status code

2016-07-26 Thread Ruoshan Huang
Ah, I just find a problem in this snip ``` + if ((unsigned)(txn->status - 400) < 100) + stream_inc_http_err_ctr(s); ``` calling `stream_inc_http_err_ctr` may cause the http_err_cnt be increased twice for other stic

Re: counters for specific http status code

2016-07-26 Thread Willy Tarreau
On Tue, Jul 26, 2016 at 06:24:50PM +0800, Ruoshan Huang wrote: > > > > If you're fine with this, I'll simply merge them with the change above, > > it's clean enough, no need to respin. Please just confirm that it's fine > > for you as well. > > > > > Yes, please ship it. > Thank you so much. OK no

Re: counters for specific http status code

2016-07-26 Thread Ruoshan Huang
> > If you're fine with this, I'll simply merge them with the change above, > it's clean enough, no need to respin. Please just confirm that it's fine > for you as well. > > Yes, please ship it. Thank you so much. -- Good day! ruoshan

Re: counters for specific http status code

2016-07-26 Thread Willy Tarreau
Hi Ruoshan, On Thu, Jul 14, 2016 at 03:24:42PM +0800, Ruoshan Huang wrote: > hi, > here is my (final?) patch for implementing `http-response track-sc*` > directive. mainly I have: > - duplicate config parsing (`parse_http_res_cond`) and validation > (`check_config_validity`) code for track-s

[no subject]

2016-07-26 Thread promotion
Hi Customer, If you can not see the description below, please click here. 如無法閱讀以下的內容,請按此.To learn more, please visit www.hk-printing.com.hk. 想了解多D請到www.hk-printing.com.hk 印刷 | 設計 | 製作 | 安裝一站式服務