xp-forge / nsca
此包已被放弃且不再维护。未建议替代包。
NSCA (Nagios 服务检查接受者) 客户端
v7.0.0
2020-04-11 09:23 UTC
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 服务检查接受者) 客户端
示例
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();