]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: stats: fix missing comma in stats on agent drain
authorRaghu Udiyar <raghusiddarth@gmail.com>
Fri, 5 Feb 2016 17:00:11 +0000 (22:30 +0530)
committerWilly Tarreau <w@1wt.eu>
Tue, 9 Feb 2016 08:06:13 +0000 (09:06 +0100)
The csv stats format breaks when agent changes server state to drain.
Tools like hatop, metric or check agents will fail due to this. This
should be backported to 1.6.

src/dumpstats.c

index f43a5cc83fa6295f23bfda4125738a1e9e8cd960..b868ef56e9caf365b226d05b6167731044a0e8fb 100644 (file)
@@ -3584,7 +3584,7 @@ static int stats_dump_sv_stats(struct stream_interface *si, struct proxy *px, in
                        [SRV_STATS_STATE_NOLB]                  = "NOLB,",
                        [SRV_STATS_STATE_DRAIN_GOING_DOWN]      = "DRAIN %d/%d,",
                        [SRV_STATS_STATE_DRAIN]                 = "DRAIN,",
-                       [SRV_STATS_STATE_DRAIN_AGENT]           = "DRAIN (agent)",
+                       [SRV_STATS_STATE_DRAIN_AGENT]           = "DRAIN (agent),",
                        [SRV_STATS_STATE_NO_CHECK]              = "no check,"
                };