From b9d4e1a5a4a60c7e1c7a5e57b0741268b7b5aa4f Mon Sep 17 00:00:00 2001 From: Sylvester Damgaard Date: Fri, 27 Jun 2025 10:40:03 +0200 Subject: [PATCH] Use the listen socket for metrics. We calculate counts based on the process list now since it's still not working as expected. https://bugs.php.net/bug.php?id=76003 --- internal/phpfpm/metrics.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/phpfpm/metrics.go b/internal/phpfpm/metrics.go index ca702e8..6f9739d 100644 --- a/internal/phpfpm/metrics.go +++ b/internal/phpfpm/metrics.go @@ -71,7 +71,7 @@ func GetMetrics(ctx context.Context, cfg *config.Config) (map[string]*Result, er Global: make(map[string]string), } - scheme, address, path, err := ParseAddress(poolCfg.Socket, poolCfg.StatusPath) + scheme, address, path, err := ParseAddress(poolCfg.StatusSocket, poolCfg.StatusPath) if err != nil { logging.L().Error("ElasticPHP-agent Invalid FPM socket address: %v", slog.Any("err", err)) continue @@ -165,7 +165,7 @@ func GetMetrics(ctx context.Context, cfg *config.Config) (map[string]*Result, er } func GetMetricsForPool(ctx context.Context, pool config.FPMPoolConfig) (*Result, error) { - scheme, address, path, err := ParseAddress(pool.Socket, pool.StatusPath) + scheme, address, path, err := ParseAddress(pool.StatusSocket, pool.StatusPath) if err != nil { return nil, fmt.Errorf("invalid FPM socket address: %w", err) }