[MINOR] stats: report the number of requests intercepted by the frontend
These requests are mainly monitor requests, as well as stats requests when the stats are processed by the frontend. Having this counter helps explain the difference in number of sessions that is sometimes observed between a frontend and a backend.
This commit is contained in:
parent
9a639a13cd
commit
eabea0763b
@ -48,6 +48,7 @@ struct pxcounters {
|
||||
long long srv_aborts; /* aborted responses during DATA phase caused by the server */
|
||||
long long retries; /* retried and redispatched connections (BE only) */
|
||||
long long redispatches; /* retried and redispatched connections (BE only) */
|
||||
long long intercepted_req; /* number of monitoring or stats requests intercepted by the frontend */
|
||||
|
||||
union {
|
||||
struct {
|
||||
|
@ -2286,7 +2286,8 @@ static int stats_dump_proxy(struct stream_interface *si, struct proxy *px, struc
|
||||
for (i = 1; i < 6; i++)
|
||||
chunk_printf(&msg, " %dxx=%lld,", i, px->fe_counters.p.http.rsp[i]);
|
||||
|
||||
chunk_printf(&msg, " other=%lld\"", px->fe_counters.p.http.rsp[0]);
|
||||
chunk_printf(&msg, " other=%lld,", px->fe_counters.p.http.rsp[0]);
|
||||
chunk_printf(&msg, " intercepted=%lld\"", px->fe_counters.intercepted_req);
|
||||
}
|
||||
|
||||
chunk_printf(&msg,
|
||||
|
@ -2670,6 +2670,7 @@ int http_wait_for_request(struct session *s, struct buffer *req, int an_bit)
|
||||
struct acl_cond *cond;
|
||||
|
||||
s->flags |= SN_MONITOR;
|
||||
s->fe->fe_counters.intercepted_req++;
|
||||
|
||||
/* Check if we want to fail this monitor request or not */
|
||||
list_for_each_entry(cond, &s->fe->mon_fail_cond, list) {
|
||||
@ -3275,6 +3276,8 @@ int http_process_req_common(struct session *s, struct buffer *req, int an_bit, s
|
||||
s->rep->prod->applet.private = s;
|
||||
s->rep->prod->applet.st0 = s->rep->prod->applet.st1 = 0;
|
||||
req->analysers = 0;
|
||||
if (s->fe == s->be) /* report it if the request was intercepted by the frontend */
|
||||
s->fe->fe_counters.intercepted_req++;
|
||||
|
||||
return 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user