From: Christopher Faulet Date: Tue, 3 Jun 2025 13:06:11 +0000 (+0200) Subject: DEBUG: check: Add the healthcheck's expiration date in the trace messags X-Git-Tag: v3.3-dev1~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6786b05297d7c32cfcecbdabedef13aef149b553;p=thirdparty%2Fhaproxy.git DEBUG: check: Add the healthcheck's expiration date in the trace messags It could help to diagnose some issues about timeout processing. So let's add it ! --- diff --git a/src/check.c b/src/check.c index 33bc7074a..b528f8a02 100644 --- a/src/check.c +++ b/src/check.c @@ -194,10 +194,11 @@ static void check_trace(enum trace_level level, uint64_t mask, ((check->type == PR_O2_EXT_CHK) ? 'E' : (check->state & CHK_ST_AGENT ? 'A' : 'H')), srv->id); - chunk_appendf(&trace_buf, " status=%d/%d %s", + chunk_appendf(&trace_buf, " status=%d/%d %s exp=%d", (check->health >= check->rise) ? check->health - check->rise + 1 : check->health, (check->health >= check->rise) ? check->fall : check->rise, - (check->health >= check->rise) ? (srv->uweight ? "UP" : "DRAIN") : "DOWN"); + (check->health >= check->rise) ? (srv->uweight ? "UP" : "DRAIN") : "DOWN", + (check->task->expire ? TICKS_TO_MS(check->task->expire - now_ms) : 0)); } else chunk_appendf(&trace_buf, " : [EMAIL]");