mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-20 21:31:28 +02:00
MINOR: stats: display new curr_sess_idle_conns server counter
Add a new stats column in proxy stats to display server counter for private idle connections. This counter has been introduced recently. The value is displayed on CSV output on the last column before modules. It is also displayed on HTLM page alongside other idle server counters.
This commit is contained in:
parent
fb43343f6f
commit
fac1de935a
@ -1356,6 +1356,7 @@ Here is the list of static fields using the proxy statistics domain:
|
||||
111. h3req [.F..]: total number of HTTP/3 sessions processed by this object
|
||||
since the worker process started
|
||||
112. proto [L...]: protocol
|
||||
113. priv_idle_cur [...S]: current number of private idle connections
|
||||
|
||||
For all other statistics domains, the presence or the order of the fields are
|
||||
not guaranteed. In this case, the header line should always be used to parse
|
||||
|
@ -887,6 +887,7 @@ int stats_dump_fields_html(struct buffer *out,
|
||||
"<tr><th>- unsafe:</th><td>%s</td></tr>"
|
||||
"<tr><th>- safe:</th><td>%s</td></tr>"
|
||||
"<tr><th>Estimated need of connections:</th><td>%s</td></tr>"
|
||||
"<tr><th>Private idle connections:</th><td>%s</td></tr>"
|
||||
"<tr><th>Active connections limit:</th><td>%s</td></tr>"
|
||||
"<tr><th>Idle connections limit:</th><td>%s</td></tr>"
|
||||
"</table></div></u>"
|
||||
@ -901,6 +902,7 @@ int stats_dump_fields_html(struct buffer *out,
|
||||
U2H(stats[ST_I_PX_IDLE_CONN_CUR].u.u32),
|
||||
U2H(stats[ST_I_PX_SAFE_CONN_CUR].u.u32),
|
||||
U2H(stats[ST_I_PX_NEED_CONN_EST].u.u32),
|
||||
U2H(stats[ST_I_PX_PRIV_IDLE_CUR].u.u32),
|
||||
|
||||
LIM2A(stats[ST_I_PX_SLIM].u.u32, "-"),
|
||||
stats[ST_I_PX_SRV_ILIM].type ? U2H(stats[ST_I_PX_SRV_ILIM].u.u32) : "-",
|
||||
|
@ -191,6 +191,7 @@ const struct stat_col stat_cols_px[ST_I_PX_MAX] = {
|
||||
[ST_I_PX_H2REQ] = ME_NEW_FE_SHARED("h2req", NULL, FN_COUNTER, FF_U64, p.http.cum_req[2], STATS_PX_CAP__F__, "Total number of hTTP/2 sessions processed by this object since the worker process started"),
|
||||
[ST_I_PX_H3REQ] = ME_NEW_FE_SHARED("h3req", NULL, FN_COUNTER, FF_U64, p.http.cum_req[3], STATS_PX_CAP__F__, "Total number of HTTP/3 sessions processed by this object since the worker process started"),
|
||||
[ST_I_PX_PROTO] = { .name = "proto", .alt_name = NULL, .desc = "Protocol" },
|
||||
[ST_I_PX_PRIV_IDLE_CUR] = { .name = "priv_idle_cur", .alt_name = "private_idle_connections_current",.desc = "Current number of private idle connections", .cap = STATS_PX_CAP____S},
|
||||
};
|
||||
|
||||
/* Returns true if column at <idx> should be hidden.
|
||||
@ -1089,6 +1090,9 @@ int stats_fill_sv_line(struct proxy *px, struct server *sv, int flags,
|
||||
if (flags & STAT_F_SHLGNDS && sv->cookie)
|
||||
field = mkf_str(FO_CONFIG|FN_NAME|FS_SERVICE, sv->cookie);
|
||||
break;
|
||||
case ST_I_PX_PRIV_IDLE_CUR:
|
||||
field = mkf_u32(0, sv->curr_sess_idle_conns);
|
||||
break;
|
||||
default:
|
||||
/* not used for servers. If a specific field
|
||||
* is requested, return an error. Otherwise continue.
|
||||
|
Loading…
x
Reference in New Issue
Block a user