diff --git a/addons/promex/service-prometheus.c b/addons/promex/service-prometheus.c index e02e8c0c78..6885d202e5 100644 --- a/addons/promex/service-prometheus.c +++ b/addons/promex/service-prometheus.c @@ -863,8 +863,10 @@ static int promex_dump_back_metrics(struct appctx *appctx, struct htx *htx) goto next_px; sv = px->srv; while (sv) { - srv_check_status = sv->check.status; - srv_check_count[srv_check_status] += 1; + if ((sv->check.state & (CHK_ST_ENABLED|CHK_ST_PAUSED)) == CHK_ST_ENABLED) { + srv_check_status = sv->check.status; + srv_check_count[srv_check_status] += 1; + } sv = sv->next; } for (; ctx->obj_state < HCHK_STATUS_SIZE; ctx->obj_state++) {