MINOR: frontend: add client timeout sample fetch
Add a sample fetch named fe_client_timeout to return the configuration value for the client timeout on a frontend.
This commit is contained in:
parent
8d22823ade
commit
da184d5306
@ -16978,6 +16978,10 @@ fe_name : string
|
||||
backends to check from which frontend it was called, or to stick all users
|
||||
coming via a same frontend to the same server.
|
||||
|
||||
fe_client_timeout : integer
|
||||
Returns the configuration value in millisecond for the client timeout of the
|
||||
current frontend.
|
||||
|
||||
sc_bytes_in_rate(<ctr>[,<table>]) : integer
|
||||
sc0_bytes_in_rate([<table>]) : integer
|
||||
sc1_bytes_in_rate([<table>]) : integer
|
||||
|
@ -254,17 +254,27 @@ smp_fetch_fe_conn(const struct arg *args, struct sample *smp, const char *kw, vo
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
smp_fetch_fe_client_timeout(const struct arg *args, struct sample *smp, const char *km, void *private)
|
||||
{
|
||||
smp->flags = SMP_F_VOL_TXN;
|
||||
smp->data.type = SMP_T_SINT;
|
||||
smp->data.u.sint = TICKS_TO_MS(smp->sess->fe->timeout.client);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* Note: must not be declared <const> as its list will be overwritten.
|
||||
* Please take care of keeping this list alphabetically sorted.
|
||||
*/
|
||||
static struct sample_fetch_kw_list smp_kws = {ILH, {
|
||||
{ "fe_conn", smp_fetch_fe_conn, ARG1(1,FE), NULL, SMP_T_SINT, SMP_USE_INTRN, },
|
||||
{ "fe_defbe", smp_fetch_fe_defbe, 0, NULL, SMP_T_STR, SMP_USE_FTEND, },
|
||||
{ "fe_id", smp_fetch_fe_id, 0, NULL, SMP_T_SINT, SMP_USE_FTEND, },
|
||||
{ "fe_name", smp_fetch_fe_name, 0, NULL, SMP_T_STR, SMP_USE_FTEND, },
|
||||
{ "fe_req_rate", smp_fetch_fe_req_rate, ARG1(1,FE), NULL, SMP_T_SINT, SMP_USE_INTRN, },
|
||||
{ "fe_sess_rate", smp_fetch_fe_sess_rate, ARG1(1,FE), NULL, SMP_T_SINT, SMP_USE_INTRN, },
|
||||
{ "fe_client_timeout", smp_fetch_fe_client_timeout, 0, NULL, SMP_T_SINT, SMP_USE_FTEND, },
|
||||
{ "fe_conn", smp_fetch_fe_conn, ARG1(1,FE), NULL, SMP_T_SINT, SMP_USE_INTRN, },
|
||||
{ "fe_defbe", smp_fetch_fe_defbe, 0, NULL, SMP_T_STR, SMP_USE_FTEND, },
|
||||
{ "fe_id", smp_fetch_fe_id, 0, NULL, SMP_T_SINT, SMP_USE_FTEND, },
|
||||
{ "fe_name", smp_fetch_fe_name, 0, NULL, SMP_T_STR, SMP_USE_FTEND, },
|
||||
{ "fe_req_rate", smp_fetch_fe_req_rate, ARG1(1,FE), NULL, SMP_T_SINT, SMP_USE_INTRN, },
|
||||
{ "fe_sess_rate", smp_fetch_fe_sess_rate, ARG1(1,FE), NULL, SMP_T_SINT, SMP_USE_INTRN, },
|
||||
{ /* END */ },
|
||||
}};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user