Skip to content

Commit cf5fd6d

Browse files
committed
Update README.md with log.level details
1 parent 160d6e7 commit cf5fd6d

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

README.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,44 @@ The `server` command runs the server required for prometheus to retrieve the sta
3535
| `--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) |
3636
| `--web.telemetry-path` | Path under which to expose metrics. | `PHP_FPM_WEB_TELEMETRY_PATH` | `/metrics` |
3737
| `--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` |
38+
| `--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 |
3839

3940
### CLI Examples
4041

4142
* Retrieve information from PHP-FPM running on `127.0.0.1:9000` with status endpoint being `/status`
42-
43-
```php-fpm_exporter get```
43+
```
44+
php-fpm_exporter get
45+
```
4446

4547
* Retrieve information from PHP-FPM running on `127.0.0.1:9000` and `127.0.0.1:9001`
46-
47-
```php-fpm_exporter get --phpfpm.scrape-uri tcp://127.0.0.1:9000/status,tcp://127.0.0.1:9001/status```
48+
```
49+
php-fpm_exporter get --phpfpm.scrape-uri tcp://127.0.0.1:9000/status,tcp://127.0.0.1:9001/status
50+
```
4851

4952
* Run as server with 2 pools:
50-
51-
```php-fpm_exporter server --phpfpm.scrape-uri tcp://127.0.0.1:9000/status,tcp://127.0.0.1:9001/status```
53+
```
54+
php-fpm_exporter server --phpfpm.scrape-uri tcp://127.0.0.1:9000/status,tcp://127.0.0.1:9001/status
55+
```
5256

5357
### Docker Examples
5458

55-
* docker pull hipages/php-fpm_exporter
56-
* 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
59+
* Run docker manually
60+
```
61+
docker pull hipages/php-fpm_exporter
62+
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
63+
```
64+
65+
* Run the docker-compose example
66+
```
67+
git clone [email protected]:hipages/php-fpm_exporter.git
68+
cd php-fpm_exporter/test
69+
docker-compose -p php-fpm_exporter up
70+
```
71+
You can now access the following links:
72+
73+
* Prometheus: http://127.0.0.1:9090/
74+
* php-fpm_exporter metrics: http://127.0.0.1:9253/metrics
75+
5776

5877
## Metrics collected
5978

0 commit comments

Comments
 (0)