Download the PHP package dubture/nagios-php without Composer
On this page you can find all versions of the php package dubture/nagios-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dubture/nagios-php
More information about dubture/nagios-php
Files in dubture/nagios-php
Package nagios-php
Short Description Nagios php plugin
License
Informations about the package nagios-php
nagios-php
Simple utility to help writing nagios plugins in PHP inspired by the Silex microframework.
Usage:
Example - check_hello :
Running the above plugin using check_hello pulse00 will result in an
nagios service state OK and the multiline output:
The Dubture\Nagios\Plugin::run() method expects a Closure whose
method signature determines the nagios plugin arguments. A parameter
without a default value represents a mandatory argument, a parameter with
a default value represents an optional argument.
The plugin in the above example has one mandatory argument name and
an optional argument foo with the default value bar.
The Closure should return an array with the status code as the first
element and the output as the second argument, which will be formatted
after the following rules:
- If the second array element is a string, the output is a single-line message
- If the second array element is an array, the output is a multi-line message.
- Every element of the multiline message can either be a simple message (literal value), or a message / performance output if the array paramater is a key/value pair.
Installation
Download and include the nagios.phar file. That's all.
All versions of nagios-php with dependencies
pimple/pimple Version ~3.0
symfony/console Version ~2.6
symfony/class-loader Version ~2.6
symfony/finder Version ~2.6
symfony/process Version ~2.6
symfony/event-dispatcher Version ~2.6
