From: Willy Tarreau Date: Wed, 12 May 2021 15:29:14 +0000 (+0200) Subject: BUG/MINOR: stats: fix lastchk metric that got accidently lost X-Git-Tag: v2.4.0~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=973a937c5f0bf479037cea60594538aa1fde5fb6;p=thirdparty%2Fhaproxy.git BUG/MINOR: stats: fix lastchk metric that got accidently lost Commit d3a9a4992 ("MEDIUM: stats: allow to select one field in `stats_fill_sv_stats`") left one occurrence of a direct assignment of stats[] instead of placing it into the variable, and it was on ST_F_CHECK_STATUS. This resulted in the field being overwritten with an empty one immediately after being set in stats_fill_sv_stats() and the field to appear empty on the stats page. No backport is needed as this was only for 2.4. --- diff --git a/src/stats.c b/src/stats.c index 1218cb53f9..1f2a684952 100644 --- a/src/stats.c +++ b/src/stats.c @@ -2299,7 +2299,7 @@ int stats_fill_sv_stats(struct proxy *px, struct server *sv, int flags, chunk_strcat(out, get_check_status_info(sv->check.status)); if (!(sv->check.state & CHK_ST_INPROGRESS)) fld_chksts += 2; // skip "* " - stats[ST_F_CHECK_STATUS] = mkf_str(FN_OUTPUT, fld_chksts); + metric = mkf_str(FN_OUTPUT, fld_chksts); } break; case ST_F_CHECK_CODE: