Download the PHP package cytopia/check_php without Composer
On this page you can find all versions of the php package cytopia/check_php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cytopia/check_php
More information about cytopia/check_php
Files in cytopia/check_php
Package check_php
Short Description Nagios or Icinga plugin to check for php startup errors.
License MIT
Homepage https://github.com/cytopia/check_php
Informations about the package check_php
check_php
check_php is a POSIX compliant nagios plugin that will check for PHP startup errors (-s
), missing PHP modules (-m
), misconfigured directives in php.ini (-c
) and for available PHP updates (-u
). This plugin supports performance data (error and warning counts over time) and long output (exact detail about all problems).
Nagios Configuration | Icinga2 Configuration | Usage | Examples | License | Contributors | Awesome
Find more plugins at Awesome Nagios | |
---|---|
Find more plugins at Icinga Exchange | |
Find more plugins at Nagios Exchange |
Requirements
Program | Required | Description |
---|---|---|
bourne shell (sh) | yes | The whole script is written in pure bourne shell (sh) and is 100% Posix compliant |
check_by_ssh | yes | This nagios plugin is used as a wrapper to check on remote hosts |
wget, curl or fetch | Optional | Either one of them is required if you want to check against PHP updates. (-u ) |
Features
- Check for PHP startup errors
- Check for PHP updates (inside minor versions and patch levels)
- Check for missing PHP modules
- Check for blacklisted PHP modules and throw err/warn if they are compiled in
- Check for expected php.ini config directives (e.g.: date.timezone must be "Europe/Berlin", etc)
- Each check can specify its own severity (warning or error)
Motivation
If you have to take care about many servers which have PHP installed you can use this plugin to make sure that all servers or all groups of server use the same configuration with the same compiled modules and are always up to date.
1. Nagios Configuration
1.1 Command definition
In order to check php on remote servers you will need to make use of check_by_ssh
.
1.2 Service definition
In the above command definition there is only one argument variable assigned to check_php
: $ARG1
. So you can easily assign all required arguments to this single variable in the service definition:
2. Icinga2 Configuration
2.1 Command definition
2.2 Service definition example (using apply)
2.3 Host object definition
3. Usage
Each argument allows you to specify which severity should be triggered (<w|e>
), where w
triggers a warning and e
triggers an error.
Arguments that can be used multiple times (-m
and -c
) can of course use different severities each time. All severities will be aggregated and the highest severity (error > warning) will determine the final state.
4. Examples
Checking against prefered timezone and compiled module mysql
Checking for PHP startup errors
Combine multiple module checks
Checking for PHP Updates (OK)
Checking for PHP Updates (Updates available)
Checking for PHP Updates (Able to differentiate between PHP 5.4, 5.5 and 5.6)
A lot of options combined