From: Aurelien DARRAGON Date: Thu, 13 Mar 2025 15:40:25 +0000 (+0100) Subject: MINOR: stats: explicitly add frontend cap for ST_I_PX_REQ_TOT X-Git-Tag: v3.2-dev8~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2ab82124ec2390163770cd4de97dbffa54a18b83;p=thirdparty%2Fhaproxy.git MINOR: stats: explicitly add frontend cap for ST_I_PX_REQ_TOT While being a generic metric, ST_I_PX_REQ_TOT is handled specifically for the frontend case. But the frontend capability isn't set for that metric It is actually quite misleading, because the capability may be checked to see whether the metric is relevant for a given scope, yet it is relevant for frontend scope. In this patch we also add the frontend capability for the metric. --- diff --git a/src/stats-proxy.c b/src/stats-proxy.c index fbba1cc88..5da00b19c 100644 --- a/src/stats-proxy.c +++ b/src/stats-proxy.c @@ -94,7 +94,7 @@ const struct stat_col stat_cols_px[ST_I_PX_MAX] = { [ST_I_PX_REQ_RATE] = ME_NEW_FE("req_rate", FN_RATE, FF_U32, req_per_sec, STATS_PX_CAP__F__, "Number of HTTP requests processed over the last second on this object"), [ST_I_PX_REQ_RATE_MAX] = { .name = "req_rate_max", .desc = "Highest value of http requests observed since the worker process started", .cap = STATS_PX_CAP__F__ }, /* Note: ST_I_PX_REQ_TOT is also diplayed on frontend but does not uses a raw counter value, see me_generate_field() for details. */ - [ST_I_PX_REQ_TOT] = ME_NEW_BE("req_tot", FN_COUNTER, FF_U64, p.http.cum_req, STATS_PX_CAP___BS, "Total number of HTTP requests processed by this object since the worker process started"), + [ST_I_PX_REQ_TOT] = ME_NEW_BE("req_tot", FN_COUNTER, FF_U64, p.http.cum_req, STATS_PX_CAP__FBS, "Total number of HTTP requests processed by this object since the worker process started"), [ST_I_PX_CLI_ABRT] = ME_NEW_BE("cli_abrt", FN_COUNTER, FF_U64, cli_aborts, STATS_PX_CAP___BS, "Total number of requests or connections aborted by the client since the worker process started"), [ST_I_PX_SRV_ABRT] = ME_NEW_BE("srv_abrt", FN_COUNTER, FF_U64, srv_aborts, STATS_PX_CAP___BS, "Total number of requests or connections aborted by the server since the worker process started"), [ST_I_PX_COMP_IN] = ME_NEW_PX("comp_in", FN_COUNTER, FF_U64, comp_in[COMP_DIR_RES], STATS_PX_CAP__FB_, "Total number of bytes submitted to the HTTP compressor for this object since the worker process started"),