MINOR: stats: report number of intercepted requests for frontend and backends
This was reported in HTML dumps already but not CSV. It reports the
number of monitor and stats requests. Ideally use-service and redirs
should be accounted for as well.
diff --git a/doc/management.txt b/doc/management.txt
index 5e1fa3c..a17cde0 100644
--- a/doc/management.txt
+++ b/doc/management.txt
@@ -1029,6 +1029,7 @@
77: conn_rate [.F..]: number of connections over the last elapsed second
78: conn_rate_max [.F..]: highest known conn_rate
79: conn_tot [.F..]: cumulative number of connections
+ 80: intercepted [.FB.]: cum. number of intercepted requests (monitor, stats)
9.2. Unix Socket commands
diff --git a/src/dumpstats.c b/src/dumpstats.c
index e61bf0e..6d088ce 100644
--- a/src/dumpstats.c
+++ b/src/dumpstats.c
@@ -340,6 +340,7 @@
ST_F_CONN_RATE,
ST_F_CONN_RATE_MAX,
ST_F_CONN_TOT,
+ ST_F_INTERCEPTED,
/* must always be the last one */
ST_F_TOTAL_FIELDS
@@ -430,6 +431,7 @@
[ST_F_CONN_RATE] = "conn_rate",
[ST_F_CONN_RATE_MAX] = "conn_rate_max",
[ST_F_CONN_TOT] = "conn_tot",
+ [ST_F_INTERCEPTED] = "intercepted",
};
/* one line of stats */
@@ -3356,7 +3358,7 @@
U2H(stats[ST_F_HRSP_4XX].u.u64),
U2H(stats[ST_F_HRSP_5XX].u.u64),
U2H(stats[ST_F_HRSP_OTHER].u.u64),
- U2H(px->fe_counters.intercepted_req));
+ U2H(stats[ST_F_INTERCEPTED].u.u64));
}
chunk_appendf(&trash,
@@ -3816,7 +3818,7 @@
U2H(stats[ST_F_HRSP_4XX].u.u64),
U2H(stats[ST_F_HRSP_5XX].u.u64),
U2H(stats[ST_F_HRSP_OTHER].u.u64),
- U2H(px->be_counters.intercepted_req));
+ U2H(stats[ST_F_INTERCEPTED].u.u64));
}
chunk_appendf(&trash, "<tr><th>- Queue time:</th><td>%s</td><td>ms</td></tr>", U2H(stats[ST_F_QTIME].u.u32));
@@ -3940,6 +3942,7 @@
stats[ST_F_HRSP_4XX] = mkf_u64(FN_COUNTER, px->fe_counters.p.http.rsp[4]);
stats[ST_F_HRSP_5XX] = mkf_u64(FN_COUNTER, px->fe_counters.p.http.rsp[5]);
stats[ST_F_HRSP_OTHER] = mkf_u64(FN_COUNTER, px->fe_counters.p.http.rsp[0]);
+ stats[ST_F_INTERCEPTED] = mkf_u64(FN_COUNTER, px->fe_counters.intercepted_req);
}
/* requests : req_rate, req_rate_max, req_tot, */
@@ -4375,6 +4378,7 @@
stats[ST_F_HRSP_4XX] = mkf_u64(FN_COUNTER, px->be_counters.p.http.rsp[4]);
stats[ST_F_HRSP_5XX] = mkf_u64(FN_COUNTER, px->be_counters.p.http.rsp[5]);
stats[ST_F_HRSP_OTHER] = mkf_u64(FN_COUNTER, px->be_counters.p.http.rsp[0]);
+ stats[ST_F_INTERCEPTED] = mkf_u64(FN_COUNTER, px->be_counters.intercepted_req);
}
stats[ST_F_CLI_ABRT] = mkf_u64(FN_COUNTER, px->be_counters.cli_aborts);