-
-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README.md with log.level details
- Loading branch information
Showing
1 changed file
with
27 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,25 +35,44 @@ The `server` command runs the server required for prometheus to retrieve the sta | |
| `--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) | | ||
| `--web.telemetry-path` | Path under which to expose metrics. | `PHP_FPM_WEB_TELEMETRY_PATH` | `/metrics` | | ||
| `--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` | | ||
| `--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 | | ||
|
||
### CLI Examples | ||
|
||
* Retrieve information from PHP-FPM running on `127.0.0.1:9000` with status endpoint being `/status` | ||
|
||
```php-fpm_exporter get``` | ||
``` | ||
php-fpm_exporter get | ||
``` | ||
|
||
* Retrieve information from PHP-FPM running on `127.0.0.1:9000` and `127.0.0.1:9001` | ||
|
||
```php-fpm_exporter get --phpfpm.scrape-uri tcp://127.0.0.1:9000/status,tcp://127.0.0.1:9001/status``` | ||
``` | ||
php-fpm_exporter get --phpfpm.scrape-uri tcp://127.0.0.1:9000/status,tcp://127.0.0.1:9001/status | ||
``` | ||
|
||
* Run as server with 2 pools: | ||
|
||
```php-fpm_exporter server --phpfpm.scrape-uri tcp://127.0.0.1:9000/status,tcp://127.0.0.1:9001/status``` | ||
``` | ||
php-fpm_exporter server --phpfpm.scrape-uri tcp://127.0.0.1:9000/status,tcp://127.0.0.1:9001/status | ||
``` | ||
|
||
### Docker Examples | ||
|
||
* docker pull hipages/php-fpm_exporter | ||
* 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 | ||
* Run docker manually | ||
``` | ||
docker pull hipages/php-fpm_exporter | ||
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 | ||
``` | ||
|
||
* Run the docker-compose example | ||
``` | ||
git clone [email protected]:hipages/php-fpm_exporter.git | ||
cd php-fpm_exporter/test | ||
docker-compose -p php-fpm_exporter up | ||
``` | ||
You can now access the following links: | ||
|
||
* Prometheus: http://127.0.0.1:9090/ | ||
* php-fpm_exporter metrics: http://127.0.0.1:9253/metrics | ||
|
||
|
||
## Metrics collected | ||
|
||
|