]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: stats: make it possible to report the WAITING state for listeners
authorWilly Tarreau <w@1wt.eu>
Fri, 8 Jan 2016 16:05:19 +0000 (17:05 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 11 Mar 2016 16:08:05 +0000 (17:08 +0100)
HTML output used to have it but not the CSV output. It indicates that the
listener is not full but was forced to wait because the max connection
rate was reached.

src/dumpstats.c

index bf044a119d67a1177294b5bc7350db17ac048735..2a445c02120b37f8deb711e94cc70d5b1cb825d8 100644 (file)
@@ -3474,7 +3474,7 @@ static int stats_dump_li_stats(struct stream_interface *si, struct proxy *px, st
        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_STATUS]   = mkf_str(FO_STATUS, (l->nbconn < l->maxconn) ? "OPEN" : "FULL");
+       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);
        stats[ST_F_SID]      = mkf_u32(FO_KEY|FS_SERVICE, l->luid);
@@ -3564,7 +3564,7 @@ static int stats_dump_li_stats(struct stream_interface *si, struct proxy *px, st
                              "",
                              U2H(stats[ST_F_DREQ].u.u64), U2H(stats[ST_F_DRESP].u.u64),
                              U2H(stats[ST_F_EREQ].u.u64),
-                             (stats[ST_F_SCUR].u.u32 < stats[ST_F_SLIM].u.u32) ? (l->state == LI_LIMITED) ? "WAITING" : "OPEN" : "FULL");
+                             field_str(stats, ST_F_STATUS));
        }
        else { /* CSV mode */
                /* dump everything */