2017 © Pedro Peláez
 

library nagios-livestatus-client

An OO client to talk to MK Livestatus

image

aashley/nagios-livestatus-client

An OO client to talk to MK Livestatus

  • Friday, July 1, 2016
  • by adam.ashley
  • Repository
  • 2 Watchers
  • 14 Stars
  • 8,149 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 11 Forks
  • 2 Open issues
  • 2 Versions
  • 10 % Grown

The README.md

Nagios MK Livestatus Client

This package implements a PHP OO client for talking to the MK Livestatus Nagios Event Broker., (*1)

This implementation is based on Lars Michelsen's LivestatusSlave., (*2)

Requirements

  • PHP 5.3.1+
  • Sockets enabled
  • JSON enabled

Usage

``` php <?php, (*3)

use Nagios\Livestatus\Client;, (*4)

$options = array( 'socketType' => 'tcp', 'socketAddress' => '10.253.14.22', 'socketPort' => '6557', );, (*5)

$client = new Client($options);, (*6)

$response = $client ->get('hosts') ->column('host_name') ->column('state') ->execute();, (*7)

foreach ($response as $host) { print $host[0] . ": " . $host[1] . "\n"; }, (*8)

$response = $client ->get('hosts') ->column('host_name') ->column('state') ->executeAssoc();, (*9)

foreach ($response as $host) { print $host['host_name'] . ": " . $host['state'] . "\n"; }, (*10)

$client->command( array( 'ACKNOWLEDGE_SVC_PROBLEM', 'example.com', 'some service', 2, 0, 1, 'username', 'Example comment' ) ); ```, (*11)

Installation

In composer add a dependancy on aashley/nagios-livestatus-client, (*12)

composer require aashley/nagios-livestatus-client

The Versions

01/07 2016

dev-master

9999999-dev https://github.com/aashley/nagios-livestatus-client

An OO client to talk to MK Livestatus

  Sources   Download

MIT

The Requires

  • php >=5.3.1
  • ext-json *
  • ext-sockets *

 

The Development Requires

by Adam Ashley

01/07 2016

v1.0.0

1.0.0.0 https://github.com/aashley/nagios-livestatus-client

An OO client to talk to MK Livestatus

  Sources   Download

MIT

The Requires

  • php >=5.3.1
  • ext-json *
  • ext-sockets *

 

The Development Requires

by Adam Ashley