fix(haproxy-stats): filter internal backends from stats response

api_backend (management API) and rl_* (rate-limit stick-tables) were
appearing in the dashboard's backend health card alongside customer
backends. Skip these internal HAProxy proxy entries in the stats parser.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Debian
2026-05-27 18:48:04 +02:00
parent 40a1b63c02
commit 123ee6e34f
5 changed files with 8 additions and 6 deletions

View File

@@ -98,8 +98,10 @@ func (h *HAProxyStatsHandler) Stats(c *gin.Context) {
svname := safeAt(fields, colIdx["svname"])
pxname := safeAt(fields, colIdx["pxname"])
// Skip our internal stats listener and the BACKEND summary row.
if pxname == "internal_stats" || svname == "BACKEND" || svname == "" {
// Skip internal infrastructure rows and the BACKEND summary row.
// api_backend = management API; rl_* = rate-limit stick-tables (no servers).
if pxname == "internal_stats" || pxname == "api_backend" ||
strings.HasPrefix(pxname, "rl_") || svname == "BACKEND" || svname == "" {
continue
}