xp-forge/nsca

This package is abandoned and no longer maintained. No replacement package was suggested.

NSCA (Nagios Service Check Acceptor) Client

v7.0.0 2020-04-11 09:23 UTC

This package is auto-updated.

Last update: 2021-11-04 20:25:57 UTC


README

Build Status on TravisCI XP Framework Module BSD Licence Requires PHP 7.0+ Latest Stable Version

NSCA (Nagios Service Check Acceptor) Client

Example

use org\nagios\nsca\{NscaClient, NscaMessage, NscaProtocol};

$c= new NscaClient('nagios.example.com');
$c->connect();

$c->send(new NscaMessage(
  'ws.example.com', 
  'queue_check', 
  NscaProtocol::OK,
  'Up and running'
));
$c->send(new NscaMessage(
  'ws.example.com', 
  'queue_check', 
  NscaProtocol::ERROR,
  'No answer on port 80 after 2 seconds'
));

$c->close();