xp-forge / nsca
NSCA (Nagios Service Check Acceptor) Client
Installs: 46 637
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 7
Forks: 1
Open Issues: 0
Requires
- php: >=7.0.0
- xp-framework/core: ^10.0 | ^9.0 | ^8.0 | ^7.0
- xp-framework/networking: ^10.0 | ^9.0 | ^8.0 | ^7.0
Requires (Dev)
- xp-framework/unittest: ^11.0 | ^10.0 | ^9.0 | ^8.0 | ^7.0
README
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();