diff --git a/phpfpm/exporter.go b/phpfpm/exporter.go index e240f58..c4476ee 100644 --- a/phpfpm/exporter.go +++ b/phpfpm/exporter.go @@ -178,7 +178,7 @@ func (e *Exporter) Collect(ch chan<- prometheus.Metric) { continue } - pps := CalculateProcessScoreboard(pool) + pps := CountProcessState(pool) if !e.CalculateProcessScoreboard && (pps.Active() != pool.ActiveProcesses || pps.Idle != pool.IdleProcesses) { log.Error("Inconsistent active and idle processes reported. Set `--fix-process-count` to have this calculated by php-fpm_exporter instead.") } diff --git a/phpfpm/phpfpm.go b/phpfpm/phpfpm.go index 9d865e3..09a099f 100644 --- a/phpfpm/phpfpm.go +++ b/phpfpm/phpfpm.go @@ -202,8 +202,8 @@ func (pps *PoolProcessStateCounter) Total() int64 { return pps.Idle + pps.Active() } -// CalculateProcessScoreboard creates a scoreboard with the calculated process metrics. -func CalculateProcessScoreboard(p Pool) PoolProcessStateCounter { +// CountProcessState creates a scoreboard with the calculated process metrics. +func CountProcessState(p Pool) PoolProcessStateCounter { pps := PoolProcessStateCounter{} for idx := range p.Processes {