You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can always of course manually [download](https://raw.githubusercontent.com/renatomefi/php-fpm-healthcheck/master/php-fpm-healthcheck) and maintain the file, as long as you follow the [MIT License](./LICENSE)
26
28
29
+
## Usage
30
+
31
+
### Ping mode
32
+
33
+
If you're aiming only to make sure php-fpm is alive and answering to requests you can:
34
+
35
+
```console
36
+
$ php-fpm-healthcheck
37
+
$ echo$?
38
+
0
39
+
```
40
+
41
+
Or with `verbose` to see php-fpm status output:
42
+
43
+
```console
44
+
$ php-fpm-healthcheck -v
45
+
Trying to connect to php-fpm via: localhost:9000
46
+
php-fpm status output:
47
+
pool: www
48
+
process manager: dynamic
49
+
start time: 11/Sep/2018:10:47:06 +0000
50
+
start since: 436
51
+
accepted conn: 1
52
+
listen queue: 0
53
+
max listen queue: 0
54
+
listen queue len: 0
55
+
idle processes: 1
56
+
active processes: 1
57
+
total processes: 2
58
+
max active processes: 1
59
+
max children reached: 0
60
+
slow requests: 0
61
+
$ echo$?
62
+
0
63
+
```
64
+
65
+
### Metric mode
66
+
67
+
Let's say you want to fail our healthcheck after your fpm has handled more than `3000` requests:
68
+
69
+
```console
70
+
$ php-fpm-healthcheck --accepted-conn=3000
71
+
$ echo$?
72
+
0
73
+
```
74
+
75
+
And you can also check if you have more than `10` processes in the queue:
0 commit comments