{"id":13562085,"url":"https://github.com/hipages/php-fpm_exporter","last_synced_at":"2026-01-14T12:40:56.609Z","repository":{"id":29441506,"uuid":"121703349","full_name":"hipages/php-fpm_exporter","owner":"hipages","description":"A prometheus exporter for PHP-FPM.","archived":false,"fork":false,"pushed_at":"2025-08-01T14:39:34.000Z","size":622,"stargazers_count":673,"open_issues_count":62,"forks_count":133,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-08-14T16:01:52.397Z","etag":null,"topics":["golang","php-fpm","prometheus","prometheus-exporter"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hipages.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["estahn"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":"hipages/php-fpm_exporter","otechie":null,"custom":null}},"created_at":"2018-02-16T01:20:31.000Z","updated_at":"2025-08-07T11:38:23.000Z","dependencies_parsed_at":"2023-10-01T16:13:48.168Z","dependency_job_id":"5aa1efab-1f26-410e-8c85-d9a4daf52d50","html_url":"https://github.com/hipages/php-fpm_exporter","commit_stats":{"total_commits":283,"total_committers":20,"mean_commits":14.15,"dds":"0.39575971731448767","last_synced_commit":"183d40ae2c226580c48c0057b6d32641da400d28"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/hipages/php-fpm_exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hipages%2Fphp-fpm_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hipages%2Fphp-fpm_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hipages%2Fphp-fpm_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hipages%2Fphp-fpm_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hipages","download_url":"https://codeload.github.com/hipages/php-fpm_exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hipages%2Fphp-fpm_exporter/sbom","scorecard":{"id":465085,"data":{"date":"2025-08-11","repo":{"name":"github.com/hipages/php-fpm_exporter","commit":"0ef3d973d5046059993d90dc32c86f36eab0929f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 30 changesets","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":4,"reason":"5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/auto-approve.yml:1","Warn: no topLevel permission defined: .github/workflows/auto-merge.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/test_pr.yml:1","Warn: no topLevel permission defined: .github/workflows/test_push.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/auto-approve.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/auto-approve.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/auto-merge.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/auto-merge.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_pr.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_pr.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_pr.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_pr.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_pr.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_pr.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_pr.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_pr.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_pr.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_pr.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_pr.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_pr.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_pr.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_pr.yml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_pr.yml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_push.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_push.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_push.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_push.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_push.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_push.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_push.yml:60: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_push.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_push.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_push.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_push.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_push.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_push.yml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_push.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_push.yml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_push.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_push.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_push.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_push.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_push.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_push.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/hipages/php-fpm_exporter/test_push.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating alpine:3.22.1 to alpine:3.22.1@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Info:   0 out of  22 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  13 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v2.2.0 not signed: https://api.github.com/repos/hipages/php-fpm_exporter/releases/67358600","Warn: release artifact v2.1.0 not signed: https://api.github.com/repos/hipages/php-fpm_exporter/releases/67352396","Warn: release artifact v2.0.4 not signed: https://api.github.com/repos/hipages/php-fpm_exporter/releases/52732742","Warn: release artifact v2.0.3 not signed: https://api.github.com/repos/hipages/php-fpm_exporter/releases/48539700","Warn: release artifact v2.0.2 not signed: https://api.github.com/repos/hipages/php-fpm_exporter/releases/42702677","Warn: release artifact v2.2.0 does not have provenance: https://api.github.com/repos/hipages/php-fpm_exporter/releases/67358600","Warn: release artifact v2.1.0 does not have provenance: https://api.github.com/repos/hipages/php-fpm_exporter/releases/67352396","Warn: release artifact v2.0.4 does not have provenance: https://api.github.com/repos/hipages/php-fpm_exporter/releases/52732742","Warn: release artifact v2.0.3 does not have provenance: https://api.github.com/repos/hipages/php-fpm_exporter/releases/48539700","Warn: release artifact v2.0.2 does not have provenance: https://api.github.com/repos/hipages/php-fpm_exporter/releases/42702677"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":9,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 25 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T12:16:15.094Z","repository_id":29441506,"created_at":"2025-08-19T12:16:15.094Z","updated_at":"2025-08-19T12:16:15.094Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","php-fpm","prometheus","prometheus-exporter"],"created_at":"2024-08-01T13:01:04.401Z","updated_at":"2026-01-14T12:40:56.586Z","avatar_url":"https://github.com/hipages.png","language":"Go","funding_links":["https://github.com/sponsors/estahn","https://issuehunt.io/r/hipages/php-fpm_exporter"],"categories":["Go","Prometheus-Exporter"],"sub_categories":[],"readme":"# php-fpm_exporter\n\n![Test](https://github.com/hipages/php-fpm_exporter/workflows/Test/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/hipages/php-fpm_exporter)](https://goreportcard.com/report/github.com/hipages/php-fpm_exporter)\n[![GoDoc](https://godoc.org/github.com/hipages/php-fpm_exporter?status.svg)](https://godoc.org/github.com/hipages/php-fpm_exporter)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=hipages_php-fpm_exporter\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=hipages_php-fpm_exporter)\n[![Docker Pulls](https://img.shields.io/docker/pulls/hipages/php-fpm_exporter.svg)](https://hub.docker.com/r/hipages/php-fpm_exporter/)\n[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/hipages/php-fpm_exporter.svg)](http://isitmaintained.com/project/hipages/php-fpm_exporter \"Average time to resolve an issue\")\n[![Percentage of issues still open](http://isitmaintained.com/badge/open/hipages/php-fpm_exporter.svg)](http://isitmaintained.com/project/hipages/php-fpm_exporter \"Percentage of issues still open\")\n[![Open Source Helpers](https://www.codetriage.com/hipages/php-fpm_exporter/badges/users.svg)](https://www.codetriage.com/hipages/php-fpm_exporter)\n[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors)\n\nA [prometheus](https://prometheus.io/) exporter for PHP-FPM.\nThe exporter connects directly to PHP-FPM and exports the metrics via HTTP.\n\nA webserver such as NGINX or Apache is **NOT** needed!\n\n## Table of Contents\n\n\u003c!-- toc --\u003e\n\n- [Features](#features)\n- [Usage](#usage)\n  * [Options and defaults](#options-and-defaults)\n  * [Why `--phpfpm.fix-process-count`?](#why---phpfpmfix-process-count)\n  * [CLI Examples](#cli-examples)\n  * [Docker Examples](#docker-examples)\n  * [Kubernetes Example](#kubernetes-example)\n- [Metrics collected](#metrics-collected)\n- [Grafana Dasbhoard for Kubernetes](#grafana-dasbhoard-for-kubernetes)\n- [FAQ](#faq)\n- [Development](#development)\n  * [E2E Tests](#e2e-tests)\n- [Contributing](#contributing)\n- [Contributors](#contributors)\n- [Alternatives](#alternatives)\n\n\u003c!-- tocstop --\u003e\n\n## Features\n\n* Export single or multiple pools\n* Export to CLI as text or JSON\n* Connects directly to PHP-FPM via TCP or Socket\n* Maps environment variables to CLI options\n* Fix for PHP-FPM metrics oddities\n* [Grafana Dashboard](https://grafana.com/dashboards/4912) for Kubernetes\n\n## Usage\n\n`php-fpm_exporter` is released as [binary](https://github.com/hipages/php-fpm_exporter/releases) and [docker](https://hub.docker.com/r/hipages/php-fpm_exporter/) image.\nIt uses sensible defaults which usually avoids the need to use command parameters or environment variables.\n\n`php-fpm_exporter` supports 2 commands, `get` and `server`.\nThe `get` command allows to retrieve information from PHP-FPM without running as a server and exposing an endpoint.\nThe `server` command runs the server required for prometheus to retrieve the statistics.\n\n### Options and defaults\n\n| Option                 | Description                                           | Environment variable         | Default value   |\n|------------------------|-------------------------------------------------------|------------------------------|-----------------|\n| `--web.listen-address` | Address on which to expose metrics and web interface. | `PHP_FPM_WEB_LISTEN_ADDRESS` | [`:9253`](https://github.com/prometheus/prometheus/wiki/Default-port-allocations)         |\n| `--web.telemetry-path` | Path under which to expose metrics.                   | `PHP_FPM_WEB_TELEMETRY_PATH` | `/metrics`      |\n| `--phpfpm.scrape-uri`  | FastCGI address, e.g. unix:///tmp/php.sock;/status or tcp://127.0.0.1:9000/status | `PHP_FPM_SCRAPE_URI` | `tcp://127.0.0.1:9000/status` |\n| `--phpfpm.fix-process-count`  | Enable to calculate process numbers via php-fpm_exporter since PHP-FPM sporadically reports wrong active/idle/total process numbers. | `PHP_FPM_FIX_PROCESS_COUNT`| `false` |\n| `--log.level`          | Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal] (default \"error\") | `PHP_FPM_LOG_LEVEL` | info |\n\n### Why `--phpfpm.fix-process-count`?\n\n`php-fpm_exporter` implements an option to \"fix\" the reported metrics based on the provided processes list by PHP-FPM.\n\nWe have seen PHP-FPM provide metrics (e.g. active processes) which don't match reality.\nSpecially `active processes` being larger than `max_children` and the actual number of running processes on the host.\nLooking briefly at the source code of PHP-FPM it appears a scoreboard is being kept and the values are increased/decreased once an action is executed.\nThe metric `active processes` is also an accumulation of multiple states (e.g. Reading headers, Getting request information, Running).\nWhich shouldn't matter and `active processes` should still be equal or lower to `max_children`.\n\n`--phpfpm.fix-process-count` will emulate PHP-FPMs implementation including the accumulation of multiple states.\n\nIf you like to have a more granular reporting please use `phpfpm_process_state`.\n\n* https://bugs.php.net/bug.php?id=76003\n* https://stackoverflow.com/questions/48961556/can-active-processes-be-larger-than-max-children-for-php-fpm\n\n### CLI Examples\n\n* Retrieve information from PHP-FPM running on `127.0.0.1:9000` with status endpoint being `/status`\n  ```\n  php-fpm_exporter get\n  ```\n\n* Retrieve information from PHP-FPM running on `127.0.0.1:9000` and `127.0.0.1:9001`\n  ```\n  php-fpm_exporter get --phpfpm.scrape-uri tcp://127.0.0.1:9000/status,tcp://127.0.0.1:9001/status\n  ```\n\n* Run as server with 2 pools:\n  ```\n  php-fpm_exporter server --phpfpm.scrape-uri tcp://127.0.0.1:9000/status,tcp://127.0.0.1:9001/status\n  ```\n\n* Run as server and enable process count fix via environment variable:\n  ```\n  PHP_FPM_FIX_PROCESS_COUNT=1 go run main.go server --web.listen-address \":12345\" --log.level=debug\n  ```\n\n### Docker Examples\n\n* Run docker manually\n  ```\n  docker pull hipages/php-fpm_exporter\n  docker run -it --rm -e PHP_FPM_SCRAPE_URI=\"tcp://127.0.0.1:9000/status,tcp://127.0.0.1:9001/status\" hipages/php-fpm_exporter\n  ```\n\n* Run the docker-compose example\n  ```\n  git clone git@github.com:hipages/php-fpm_exporter.git\n  cd php-fpm_exporter/test\n  docker-compose -p php-fpm_exporter up\n  ```\n  You can now access the following links:\n\n  * Prometheus: http://127.0.0.1:9090/\n  * php-fpm_exporter metrics: http://127.0.0.1:9253/metrics\n\n  [![asciicast](https://asciinema.org/a/1msR8nqAsFdHzROosUb7PiHvf.png)](https://asciinema.org/a/1msR8nqAsFdHzROosUb7PiHvf)\n\n### Kubernetes Example\n\nTBD\n\n## Metrics collected\n\n```\n# HELP phpfpm_accepted_connections The number of requests accepted by the pool.\n# TYPE phpfpm_accepted_connections counter\n# HELP phpfpm_active_processes The number of active processes.\n# TYPE phpfpm_active_processes gauge\n# HELP phpfpm_idle_processes The number of idle processes.\n# TYPE phpfpm_idle_processes gauge\n# HELP phpfpm_listen_queue The number of requests in the queue of pending connections.\n# TYPE phpfpm_listen_queue gauge\n# HELP phpfpm_listen_queue_length The size of the socket queue of pending connections.\n# TYPE phpfpm_listen_queue_length gauge\n# HELP phpfpm_max_active_processes The maximum number of active processes since FPM has started.\n# TYPE phpfpm_max_active_processes counter\n# HELP phpfpm_max_children_reached The number of times, the process limit has been reached, when pm tries to start more children (works only for pm 'dynamic' and 'ondemand').\n# TYPE phpfpm_max_children_reached counter\n# HELP phpfpm_max_listen_queue The maximum number of requests in the queue of pending connections since FPM has started.\n# TYPE phpfpm_max_listen_queue counter\n# HELP phpfpm_process_last_request_cpu The %cpu the last request consumed.\n# TYPE phpfpm_process_last_request_cpu gauge\n# HELP phpfpm_process_last_request_memory The max amount of memory the last request consumed.\n# TYPE phpfpm_process_last_request_memory gauge\n# HELP phpfpm_process_request_duration The duration in microseconds of the requests.\n# TYPE phpfpm_process_request_duration gauge\n# HELP phpfpm_process_requests The number of requests the process has served.\n# TYPE phpfpm_process_requests counter\n# HELP phpfpm_process_state The state of the process (Idle, Running, ...).\n# TYPE phpfpm_process_state gauge\n# HELP phpfpm_scrape_failures The number of failures scraping from PHP-FPM.\n# TYPE phpfpm_scrape_failures counter\n# HELP phpfpm_slow_requests The number of requests that exceeded your 'request_slowlog_timeout' value.\n# TYPE phpfpm_slow_requests counter\n# HELP phpfpm_start_since The number of seconds since FPM has started.\n# TYPE phpfpm_start_since counter\n# HELP phpfpm_total_processes The number of idle + active processes.\n# TYPE phpfpm_total_processes gauge\n# HELP phpfpm_up Could PHP-FPM be reached?\n# TYPE phpfpm_up gauge\n```\n\n## Grafana Dasbhoard for Kubernetes\n\nThe Grafana dashboard can be found [here](https://grafana.com/dashboards/4912).\nThere is also a more generic version [here](./grafana/kubernetes-php-fpm.json).\n\n\u003cimg src=\"https://grafana.com/api/dashboards/4912/images/3079/image\" width=\"600\"\u003e\n\n## FAQ\n\n* **How to update \"Metrics collected\"?**\n\n  Copy\u0026paste the output from:\n  ```\n  curl http://127.0.0.1:12345/metrics | grep phpfpm | grep \"#\"\n  ```\n\n## Development\n\n### E2E Tests\n\nThe E2E tests are based on docker-compose and bats-core. Install the required components, e.g. via brew on MacOS:\n\n```bash\nbrew tap kaos/shell\nbrew install docker-compose bats-core kaos/shell/bats-assert kaos/shell/bats-support\n```\n\nAfter the components are installed run the E2E tests:\n\n```bash\nmake test-e2e\n```\n\n## Contributing\n\nContributions are greatly appreciated.\nThe maintainers actively manage the issues list, and try to highlight issues suitable for newcomers.\nThe project follows the typical GitHub pull request model.\nSee \" [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/) \" for more details.\nBefore starting any work, please either comment on an existing issue, or file a new one.\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/all-contributors/all-contributors#emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://enricostahn.com\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/362174?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eEnrico Stahn\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#question-estahn\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e \u003ca href=\"https://github.com/hipages/php-fpm_exporter/commits?author=estahn\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/hipages/php-fpm_exporter/commits?author=estahn\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#maintenance-estahn\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/hipages/php-fpm_exporter/commits?author=estahn\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/XooR\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/120429?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eStanislav Antic\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hipages/php-fpm_exporter/commits?author=XooR\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://herb123456.blogspot.com/\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/1568165?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eherb\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hipages/php-fpm_exporter/commits?author=herb123456\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/Nyoroon\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/182203?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSmoked Cheese\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hipages/php-fpm_exporter/issues?q=author%3ANyoroon\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"https://github.com/hipages/php-fpm_exporter/commits?author=Nyoroon\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.old-games.ru\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/7388179?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAlexander\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hipages/php-fpm_exporter/commits?author=sas1024\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/stanxing\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/23288646?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eStan Xing\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hipages/php-fpm_exporter/commits?author=stanxing\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/itcsoft54\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/22459145?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eitcsoft54\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hipages/php-fpm_exporter/commits?author=itcsoft54\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://128.io\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/44527?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJohn S Long\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#infra-adduc\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/danielocallaghan\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/62488?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDaniel O'Callaghan\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hipages/php-fpm_exporter/commits?author=danielocallaghan\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/stchr\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/166079?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSimon Stücher\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hipages/php-fpm_exporter/issues?q=author%3Astchr\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://sterba.dev\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/48120735?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAndré Sterba\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/hipages/php-fpm_exporter/commits?author=andresterba\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/hipages/php-fpm_exporter.svg)](https://starchart.cc/hipages/php-fpm_exporter)\n\n## Alternatives\n\n* [bakins/php-fpm-exporter](https://github.com/bakins/php-fpm-exporter)\n* [peakgames/php-fpm-prometheus](https://github.com/peakgames/php-fpm-prometheus)\n* [craigmj/phpfpm_exporter](https://github.com/craigmj/phpfpm_exporter)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhipages%2Fphp-fpm_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhipages%2Fphp-fpm_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhipages%2Fphp-fpm_exporter/lists"}