mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 20:46:11 +02:00
MINOR: stats: Add stats about request and response bytes received and sent
In previous patches, these counters were added per frontend, backend, server and listener. With this patch, these counters are reported on stats, including promex. Note that the stats file minor version was incremented by one because the shm_stats_file_object struct size has changed. This patch is related to issue #1617.
This commit is contained in:
parent
0084baa6ba
commit
4991a51208
@ -15,7 +15,7 @@ enum stfile_domain {
|
||||
};
|
||||
|
||||
#define SHM_STATS_FILE_VER_MAJOR 1
|
||||
#define SHM_STATS_FILE_VER_MINOR 0
|
||||
#define SHM_STATS_FILE_VER_MINOR 1
|
||||
|
||||
#define SHM_STATS_FILE_HEARTBEAT_TIMEOUT 60 /* passed this delay (seconds) process which has not
|
||||
* sent heartbeat will be considered down
|
||||
|
||||
@ -489,7 +489,10 @@ enum stat_idx_px {
|
||||
ST_I_PX_H3REQ,
|
||||
ST_I_PX_PROTO,
|
||||
ST_I_PX_PRIV_IDLE_CUR,
|
||||
|
||||
ST_I_PX_REQ_IN,
|
||||
ST_I_PX_REQ_OUT,
|
||||
ST_I_PX_RES_IN,
|
||||
ST_I_PX_RES_OUT,
|
||||
/* must always be the last one */
|
||||
ST_I_PX_MAX
|
||||
};
|
||||
|
||||
@ -821,7 +821,7 @@ int shm_stats_file_prepare(void)
|
||||
BUG_ON(sizeof(struct shm_stats_file_hdr) != 672, "shm_stats_file_hdr struct size changed, "
|
||||
"it is part of the exported API: ensure all precautions were taken (ie: shm_stats_file "
|
||||
"version change) before adjusting this");
|
||||
BUG_ON(sizeof(struct shm_stats_file_object) != 536, "shm_stats_file_object struct size changed, "
|
||||
BUG_ON(sizeof(struct shm_stats_file_object) != 552, "shm_stats_file_object struct size changed, "
|
||||
"it is part of the exported API: ensure all precautions were taken (ie: shm_stats_file "
|
||||
"version change) before adjusting this");
|
||||
|
||||
|
||||
@ -192,6 +192,11 @@ const struct stat_col stat_cols_px[ST_I_PX_MAX] = {
|
||||
[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},
|
||||
[ST_I_PX_REQ_IN] = ME_NEW_PX_SHARED("reqin", "req_in_total", FN_COUNTER, FF_U64, req_in, STATS_PX_CAP_LFBS, "Total number of request bytes received since process started"),
|
||||
[ST_I_PX_REQ_OUT] = ME_NEW_PX_SHARED("reqout", "req_out_total", FN_COUNTER, FF_U64, req_out, STATS_PX_CAP_LFBS, "Total number of request bytes sent since process started"),
|
||||
[ST_I_PX_RES_IN] = ME_NEW_PX_SHARED("resin", "res_in_total", FN_COUNTER, FF_U64, res_in, STATS_PX_CAP_LFBS, "Total number of response bytes received since process started"),
|
||||
[ST_I_PX_RES_OUT] = ME_NEW_PX_SHARED("resout", "res_out_total", FN_COUNTER, FF_U64, res_out, STATS_PX_CAP_LFBS, "Total number of response bytes sent since process started"),
|
||||
|
||||
};
|
||||
|
||||
/* Returns true if column at <idx> should be hidden.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user