-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathphp-fpm-unix
32 lines (29 loc) · 1.17 KB
/
php-fpm-unix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# -*- mode: conf; mode: flyspell-prog; mode: autopair; ispell-current-dictionary: american -*-
### Monitoring UNIX socket php-fpm: the parent process.
check process php5-fpm-unix with pidfile /var/run/php5-fpm.pid
group phpcgi-unix # phpcgi-unix group
start program = "/etc/init.d/php5-fpm start"
stop program = "/etc/init.d/php5-fpm stop"
## Test the UNIX socket. Restart if down.
if failed unixsocket /var/run/php-fpm.sock then restart
## If the restarts attempts fail then alert.
if 3 restarts within 5 cycles then timeout
depends on php5-fpm_bin
depends on php5-fpm_init
alert root@localhost only on {timeout}
## Test the php5-fpm binary.
check file php5-fpm_bin with path /usr/sbin/php5-fpm
group phpcgi-unix
if failed checksum then unmonitor
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
alert root@localhost
## Test the init scripts.
check file php5-fpm_init with path /etc/init.d/php5-fpm
group phpcgi-unix
if failed checksum then unmonitor
if failed permission 755 then unmonitor
if failed uid root then unmonitor
if failed gid root then unmonitor
alert root@localhost