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

@@ -1 +1 @@
1.1.117 1.1.118

View File

@@ -60,7 +60,7 @@ import (
usersvc "git.netcell-it.de/projekte/edgeguard-native/internal/services/users" usersvc "git.netcell-it.de/projekte/edgeguard-native/internal/services/users"
) )
var version = "1.1.117" var version = "1.1.118"
func main() { func main() {
addr := os.Getenv("EDGEGUARD_API_ADDR") addr := os.Getenv("EDGEGUARD_API_ADDR")

View File

@@ -11,7 +11,7 @@ import (
"git.netcell-it.de/projekte/edgeguard-native/internal/services/setup" "git.netcell-it.de/projekte/edgeguard-native/internal/services/setup"
) )
var version = "1.1.117" var version = "1.1.118"
const usage = `edgeguard-ctl — EdgeGuard CLI const usage = `edgeguard-ctl — EdgeGuard CLI

View File

@@ -41,7 +41,7 @@ import (
"git.netcell-it.de/projekte/edgeguard-native/internal/services/tlscerts" "git.netcell-it.de/projekte/edgeguard-native/internal/services/tlscerts"
) )
var version = "1.1.117" var version = "1.1.118"
const ( const (
// renewTickInterval — how often we re-evaluate expiring certs. // renewTickInterval — how often we re-evaluate expiring certs.

View File

@@ -98,8 +98,10 @@ func (h *HAProxyStatsHandler) Stats(c *gin.Context) {
svname := safeAt(fields, colIdx["svname"]) svname := safeAt(fields, colIdx["svname"])
pxname := safeAt(fields, colIdx["pxname"]) pxname := safeAt(fields, colIdx["pxname"])
// Skip our internal stats listener and the BACKEND summary row. // Skip internal infrastructure rows and the BACKEND summary row.
if pxname == "internal_stats" || svname == "BACKEND" || svname == "" { // 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 continue
} }