]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stats: output dcon
authorWilly Tarreau <w@1wt.eu>
Fri, 21 Oct 2016 16:15:32 +0000 (18:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 21 Oct 2016 16:17:56 +0000 (18:17 +0200)
These are denied conns. Strangely this wasn't emitted while it used to be
available for a while. It corresponds to the number of connections blocked
by "tcp-request connection reject".

doc/management.txt
include/proto/dumpstats.h
src/dumpstats.c

index ad55c4302156bc4d45ca146135940f95987d98ef..d9aee31e6d0ef59688b9402f12dfebf9b205a2b7 100644 (file)
@@ -1035,6 +1035,7 @@ S (Servers).
  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)
+ 81: dcon [LF..]: requests denied by "tcp-request connection" rules
 
 
 9.2) Typed output format
index eba753d2972de5d4a5e329ab6655711ce1366301..633beca1d3fd19ab179f15e4364db23b94f333bf 100644 (file)
@@ -204,6 +204,7 @@ enum stat_field {
        ST_F_CONN_RATE_MAX,
        ST_F_CONN_TOT,
        ST_F_INTERCEPTED,
+       ST_F_DCON,
 
        /* must always be the last one */
        ST_F_TOTAL_FIELDS
index de8c69e0a24b2d0ea441de699a6576b3db5fb5e7..a564ab3d09fa5a49c0d0d84ac762fa7f96a08717 100644 (file)
@@ -217,6 +217,7 @@ const char *stat_field_names[ST_F_TOTAL_FIELDS] = {
        [ST_F_CONN_RATE_MAX]  = "conn_rate_max",
        [ST_F_CONN_TOT]       = "conn_tot",
        [ST_F_INTERCEPTED]    = "intercepted",
+       [ST_F_DCON]           = "dcon",
 };
 
 /* one line of stats */
@@ -4015,6 +4016,7 @@ int stats_fill_fe_stats(struct proxy *px, struct field *stats, int len)
        stats[ST_F_DREQ]     = mkf_u64(FN_COUNTER, px->fe_counters.denied_req);
        stats[ST_F_DRESP]    = mkf_u64(FN_COUNTER, px->fe_counters.denied_resp);
        stats[ST_F_EREQ]     = mkf_u64(FN_COUNTER, px->fe_counters.failed_req);
+       stats[ST_F_DCON]     = mkf_u64(FN_COUNTER, px->fe_counters.denied_conn);
        stats[ST_F_STATUS]   = mkf_str(FO_STATUS, px->state == PR_STREADY ? "OPEN" : px->state == PR_STFULL ? "FULL" : "STOP");
        stats[ST_F_PID]      = mkf_u32(FO_KEY, relative_pid);
        stats[ST_F_IID]      = mkf_u32(FO_KEY|FS_SERVICE, px->uuid);
@@ -4106,6 +4108,7 @@ int stats_fill_li_stats(struct proxy *px, struct listener *l, int flags,
        stats[ST_F_DREQ]     = mkf_u64(FN_COUNTER, l->counters->denied_req);
        stats[ST_F_DRESP]    = mkf_u64(FN_COUNTER, l->counters->denied_resp);
        stats[ST_F_EREQ]     = mkf_u64(FN_COUNTER, l->counters->failed_req);
+       stats[ST_F_DCON]     = mkf_u64(FN_COUNTER, l->counters->denied_conn);
        stats[ST_F_STATUS]   = mkf_str(FO_STATUS, (l->nbconn < l->maxconn) ? (l->state == LI_LIMITED) ? "WAITING" : "OPEN" : "FULL");
        stats[ST_F_PID]      = mkf_u32(FO_KEY, relative_pid);
        stats[ST_F_IID]      = mkf_u32(FO_KEY|FS_SERVICE, px->uuid);