diff --git a/include/haproxy/stats-t.h b/include/haproxy/stats-t.h index d185d85ba..663641615 100644 --- a/include/haproxy/stats-t.h +++ b/include/haproxy/stats-t.h @@ -469,6 +469,7 @@ enum stat_field { ST_F_H1REQ, ST_F_H2REQ, ST_F_H3REQ, + ST_F_PROTO, /* must always be the last one */ ST_F_TOTAL_FIELDS diff --git a/src/stats.c b/src/stats.c index cc3668f55..c06fce3d3 100644 --- a/src/stats.c +++ b/src/stats.c @@ -1086,6 +1086,8 @@ static int stats_dump_fields_html(struct buffer *out, else if (*field_str(stats, ST_F_ADDR)) chunk_appendf(out, "%s, ", field_str(stats, ST_F_ADDR)); + chunk_appendf(out, "proto=%s, ", field_str(stats, ST_F_PROTO)); + /* id */ chunk_appendf(out, "id: %d", stats[ST_F_SID].u.u32); } @@ -2078,6 +2080,9 @@ int stats_fill_li_stats(struct proxy *px, struct listener *l, int flags, } } break; + case ST_F_PROTO: + metric = mkf_str(FO_STATUS, l->rx.proto->name); + break; default: /* not used for listen. If a specific metric * is requested, return an error. Otherwise continue.