PHP Sysload is a simple monitoring Extension for PHP backends behind a reverse proxy server or for other tasks where you have a need to send a specified HTTP header on overrun.
Overview
With this Extension you have the possebility to check the loadavg values and send a specified Header to the Client or the proxy if one of the check value is overrun. You can also disable the force-exit, but I don't recommend this!
Configuration
sysload.one-minute = 1.0
sysload.five-minutes = 0.5
sysload.ten-minutes = 0.3
sysload.header = "X-Sysload: Critical"
sysload.force-exit = 1
Installation
Installing with `pecl` command-line utility
- Execute command "pecl install sysload"
- Make sure you have extension=sysload.so in your php.ini
- Add the configuration lines from above in your php.ini
Installing from sources
- Download sysload source package
- Unpack sysload source package
- Go to sysload folder and type "phpize && ./configure && make && make install"
- Make sure you have extension=sysload.so in your php.ini
- Add the configuration lines from above in your php.ini
Compiling Sysload into PHP
- Download sysload source package
- Unpack sysload source package to $PHP_SOURCE_DIR/ext/sysload
- In php source root directory run commands: "rm configure && ./buildconf --force"
- Configure PHP with command "./configure --with-sysload"
- Run make && make install
- Add the configuration lines from above in your php.ini