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 <metric> 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.
This commit is contained in:
Willy Tarreau 2021-05-12 17:29:14 +02:00
parent 4263f68b65
commit 973a937c5f

View File

@ -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: