NSCA (Nagios Service Check Acceptor) Client
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();