randomhost / icinga-notification
为 randomhost/icinga 包提供常用的通知命令。
0.0.5
2018-05-21 16:08 UTC
Requires
- php: >=5.3.0
- randomhost/icinga: ~0.2.1
- randomhost/notifymyandroid: ~0.0.2
Requires (Dev)
- behat/behat: ~2.0
- phpspec/phpspec: ~2.4
- phpunit/phpunit: ~4.0
README
randomhost/icinga-notification
此包为 randomhost/icinga 包提供了一套常用的通知命令。
使用方法
NotifyMyAndroid
目前是唯一可用的通知插件,但未来还将有更多。
NotifyMyAndroid
使用 NotifyMyAndroid 发送通知。
使用示例
<?php namespace randomhost\Icinga\Notification; require_once '/path/to/vendor/autoload.php'; use randomhost\NotifyMyAndroid\Client as NmaClient; $nmaClient = new NmaClient(); $notification = new NotifyMyAndroid($nmaClient); $notification->setOptions( getopt( $notification->getShortOptions(), $notification->getLongOptions() ) ); $notification->run(); echo $notification->getMessage(); exit($notification->getCode());
这将实例化 NotifyMyAndroid 通知插件,并将推送通知发送到命令行中提供的 NMA API 密钥。
命令行参数
许可证
查看 LICENSE.txt 获取完整的许可证详情。