diff --git a/include/types/stats.h b/include/types/stats.h
index 5a7aa9813..2a71ff64e 100644
--- a/include/types/stats.h
+++ b/include/types/stats.h
@@ -415,6 +415,8 @@ enum stat_field {
ST_F_REUSE,
ST_F_CACHE_LOOKUPS,
ST_F_CACHE_HITS,
+ ST_F_SRV_ICUR,
+ ST_F_SRV_ILIM,
/* must always be the last one */
ST_F_TOTAL_FIELDS
diff --git a/src/stats.c b/src/stats.c
index 01fcb4586..34efbfbbb 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -974,11 +974,23 @@ static int stats_dump_fields_html(struct buffer *out,
chunk_appendf(out,
/* sessions: current, max, limit, total */
- "
%s | %s | %s | "
+ "%s"
+ " "
+ "Current active connections: | %s | "
+ "Current idle connections: | %s | "
+ "Active connections limit: | %s | "
+ "Idle connections limit: | %s | "
+ " "
+ " | %s | %s | "
"%s"
"Cum. sessions: | %s | "
"",
- U2H(stats[ST_F_SCUR].u.u32), U2H(stats[ST_F_SMAX].u.u32), LIM2A(stats[ST_F_SLIM].u.u32, "-"),
+ U2H(stats[ST_F_SCUR].u.u32),
+ U2H(stats[ST_F_SCUR].u.u32),
+ U2H(stats[ST_F_SRV_ICUR].u.u32),
+ LIM2A(stats[ST_F_SLIM].u.u32, "-"),
+ stats[ST_F_SRV_ILIM].type ? U2H(stats[ST_F_SRV_ILIM].u.u32) : "-",
+ U2H(stats[ST_F_SMAX].u.u32), LIM2A(stats[ST_F_SLIM].u.u32, "-"),
U2H(stats[ST_F_STOT].u.u64),
U2H(stats[ST_F_STOT].u.u64));
@@ -1641,6 +1653,10 @@ int stats_fill_sv_stats(struct proxy *px, struct server *sv, int flags,
if (sv->maxconn)
stats[ST_F_SLIM] = mkf_u32(FO_CONFIG|FN_LIMIT, sv->maxconn);
+ stats[ST_F_SRV_ICUR] = mkf_u32(0, sv->curr_idle_conns);
+ if (sv->max_idle_conns != -1)
+ stats[ST_F_SRV_ILIM] = mkf_u32(FO_CONFIG|FN_LIMIT, sv->max_idle_conns);
+
stats[ST_F_STOT] = mkf_u64(FN_COUNTER, sv->counters.cum_sess);
stats[ST_F_BIN] = mkf_u64(FN_COUNTER, sv->counters.bytes_in);
stats[ST_F_BOUT] = mkf_u64(FN_COUNTER, sv->counters.bytes_out);
|