#ifndef _TYPES_COUNTERS_H
#define _TYPES_COUNTERS_H
-/* maybe later we might thing about having a different struct for FE and BE */
-struct pxcounters {
+/* counters used by listeners and frontends */
+struct fe_counters {
unsigned int conn_max; /* max # of active sessions */
long long cum_conn; /* cumulated number of received connections */
long long cum_sess; /* cumulated number of accepted connections */
- long long cum_lbconn; /* cumulated number of sessions processed by load balancing (BE only) */
- unsigned long last_sess; /* last session time */
unsigned int cps_max; /* maximum of new connections received per second */
unsigned int sps_max; /* maximum of new connections accepted per second (sessions) */
- unsigned int nbpend_max; /* max number of pending connections with no server assigned yet (BE only) */
long long bytes_in; /* number of bytes transferred from the client to the server */
long long bytes_out; /* number of bytes transferred from the server to the client */
long long comp_out; /* output bytes emitted by the compressor */
long long comp_byp; /* input bytes that bypassed the compressor (cpu/ram/bw limitation) */
- long long denied_req; /* blocked requests/responses because of security concerns */
- long long denied_resp; /* blocked requests/responses because of security concerns */
+ long long denied_req; /* blocked requests because of security concerns */
+ long long denied_resp; /* blocked responses because of security concerns */
long long failed_req; /* failed requests (eg: invalid or timeout) */
long long denied_conn; /* denied connection requests (tcp-req-conn rules) */
long long denied_sess; /* denied session requests (tcp-req-sess rules) */
- long long failed_conns; /* failed connect() attempts (BE only) */
- long long failed_resp; /* failed responses (BE only) */
long long cli_aborts; /* aborted responses during DATA phase caused by the client */
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 */
- unsigned int q_time, c_time, d_time, t_time; /* sums of conn_time, queue_time, data_time, total_time */
-
union {
struct {
long long cum_req; /* cumulated number of processed HTTP requests */
} p; /* protocol-specific stats */
};
-struct licounters {
- unsigned int conn_max; /* max # of active listener sessions */
-
- long long cum_conn; /* cumulated number of received connections */
- long long cum_sess; /* cumulated number of accepted sessions */
-
- long long bytes_in; /* number of bytes transferred from the client to the server */
- long long bytes_out; /* number of bytes transferred from the server to the client */
-
- long long denied_req, denied_resp; /* blocked requests/responses because of security concerns */
- long long failed_req; /* failed requests (eg: invalid or timeout) */
- long long denied_conn; /* denied connection requests (tcp-req-conn rules) */
- long long denied_sess; /* denied session requests (tcp-req-sess rules) */
-};
+/* counters used by listeners and frontends */
+struct be_counters {
+ unsigned int conn_max; /* max # of active sessions */
+ long long cum_conn; /* cumulated number of received connections */
+ long long cum_sess; /* cumulated number of accepted connections */
+ long long cum_lbconn; /* cumulated number of sessions processed by load balancing (BE only) */
+ unsigned long last_sess; /* last session time */
-struct srvcounters {
+ unsigned int cps_max; /* maximum of new connections received per second */
+ unsigned int sps_max; /* maximum of new connections accepted per second (sessions) */
+ unsigned int nbpend_max; /* max number of pending connections with no server assigned yet (BE only) */
unsigned int cur_sess_max; /* max number of currently active sessions */
- unsigned int nbpend_max; /* max number of pending connections reached */
- unsigned int sps_max; /* maximum of new sessions per second seen on this server */
- long long cum_sess; /* cumulated number of sessions really sent to this server */
- long long cum_lbconn; /* cumulated number of sessions directed by load balancing */
- unsigned long last_sess; /* last session time */
+ long long bytes_in; /* number of bytes transferred from the client to the server */
+ long long bytes_out; /* number of bytes transferred from the server to the client */
- long long bytes_in; /* number of bytes transferred from the client to the server */
- long long bytes_out; /* number of bytes transferred from the server to the client */
+ long long comp_in; /* input bytes fed to the compressor */
+ long long comp_out; /* output bytes emitted by the compressor */
+ long long comp_byp; /* input bytes that bypassed the compressor (cpu/ram/bw limitation) */
- long long failed_conns, failed_resp; /* failed connect() and responses */
- long long cli_aborts, srv_aborts; /* aborted responses during DATA phase due to client or server */
- long long retries, redispatches; /* retried and redispatched connections */
+ long long denied_req; /* blocked requests because of security concerns */
+ long long denied_resp; /* blocked responses because of security concerns */
+
+ long long failed_conns; /* failed connect() attempts (BE only) */
+ long long failed_resp; /* failed responses (BE only) */
+ long long cli_aborts; /* aborted responses during DATA phase caused by the client */
+ 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 failed_secu; /* blocked responses because of security concerns */
+ long long failed_checks, failed_hana; /* failed health checks and health analyses for servers */
+ long long down_trans; /* up->down transitions */
+
unsigned int q_time, c_time, d_time, t_time; /* sums of conn_time, queue_time, data_time, total_time */
union {
struct {
- long long rsp[6]; /* http response codes */
+ long long cum_req; /* cumulated number of processed HTTP requests */
+ long long comp_rsp; /* number of compressed responses */
+ unsigned int rps_max; /* maximum of new HTTP requests second observed */
+ long long rsp[6]; /* http response codes */
} http;
- } p;
-
- long long failed_checks, failed_hana; /* failed health checks and health analyses */
- long long down_trans; /* up->down transitions */
+ } p; /* protocol-specific stats */
};
#endif /* _TYPES_COUNTERS_H */
"<tr><th>- HTTP 4xx responses:</th><td>%s</td></tr>"
"<tr><th>- HTTP 5xx responses:</th><td>%s</td></tr>"
"<tr><th>- other responses:</th><td>%s</td></tr>"
- "<tr><th>Intercepted requests:</th><td>%s</td></tr>"
"<tr><th colspan=3>Avg over last 1024 success. conn.</th></tr>"
"",
U2H(stats[ST_F_REQ_TOT].u.u64),
U2H(stats[ST_F_HRSP_3XX].u.u64),
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(stats[ST_F_INTERCEPTED].u.u64));
+ U2H(stats[ST_F_HRSP_OTHER].u.u64));
}
chunk_appendf(out, "<tr><th>- Queue time:</th><td>%s</td><td>ms</td></tr>", U2H(stats[ST_F_QTIME].u.u32));
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);
px->fe_counters.p.http.rps_max = 0;
px->fe_counters.sps_max = 0;
px->fe_counters.cps_max = 0;
- px->fe_counters.nbpend_max = 0;
}
for (sv = px->srv; sv; sv = sv->next)