2017 © Pedro Peláez
 

project nagios

Execute nagios checks and parse the output with PHP classes

image

devophp/nagios

Execute nagios checks and parse the output with PHP classes

  • Tuesday, June 10, 2014
  • by joostfaassen
  • Repository
  • 1 Watchers
  • 1 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Nagios check component

This library lets you run Nagios checks and parse the output from your PHP application., (*1)

Example:

$nagioschecker = new \Devophp\Component\Nagios\Checker();
$nagioschecker->autoDetectPluginPath();

$response = $nagioschecker->check('users', '-w 3 -c 5');

echo "Statuscode: " . $response->getStatusCode() . ' (' . $response->getStatusText() . ')' . "\n";
echo "ServiceOutput: " . $response->getServiceOutput() . "\n";
echo "ServicePerfData: " . $response->getServicePerfData() . "\n";

Included console tool

This library comes with a simple command line tool that you can use to run tests through this library., (*2)

Some example commands:, (*3)

bin/console nagios:check users --arguments="-w 3 -c 5"

This will output:, (*4)

Running check 'users' with arguments: '-w 3 -c 5'
Pluginpath: /usr/local/Cellar/nagios-plugins/2.0/sbin/
Statuscode: 0 (OK)
ServiceOutput: USERS OK - 2 users currently logged in
ServicePerfData: users=2;3;5;0

The Versions

10/06 2014

dev-master

9999999-dev

Execute nagios checks and parse the output with PHP classes

  Sources   Download

MIT

The Requires