gigasavvy / uptime
v0.1.3
2017-06-19 02:18 UTC
Requires
- php: >=7.0
- guzzlehttp/guzzle: ^6.2
- monolog/monolog: ^1.22
- symfony/console: ~3.2
Requires (Dev)
- phpunit/phpunit: ^6.2
This package is not auto-updated.
Last update: 2022-02-01 13:07:51 UTC
README
Uptyme是一个PHP CLI脚本来验证网站的运行时间。
为什么拼写为Uptyme,你代码潮人吗?
uptime
是Linux命令,用于检查系统运行时间。显然,我们不可能使用这个名字!
安装
composer global require gigasavvy/uptyme
使用
Uptyme应从命令行运行,可以使用多种方式。
基本检查
要检查单个网站是否运行,使用以下命令
$ uptyme run https://gigasavvy.com
Checking HTTPS integrity of the given domains...
Checker completed with 0 failed domains.
要检查多个网站是否运行,只需将额外的域名作为参数传递
$ uptyme run https://gigasavvy.com https://google.com https://php.ac.cn
Checking HTTPS integrity of the given domains...
Checker completed with 0 failed domains.
日志记录
要启用日志(适用于基于cron的运行),将日志文件传递给--log
选项
$ uptyme run https://gigasavvy.com --log /var/log/uptyme.log
Checking HTTPS integrity of the given domains...
Checker completed with 0 failed domains.
Check logs for more info (/var/log/uptyme.log)
Slack集成
对于任何失败的网站,您可以通过传递您的Slack webhook url到--slack
选项通过Slack提醒
$ uptyme run https://foo.bar --slack https://hooks.slack.com/services/123/456
Checking HTTPS integrity of the given domains...
Checker completed with 1 failed domains.
Failed domains:
https://foo.bar
正如我们所见,网站https://foo.bar
未能连接。通过传递--slack
选项,您的Slack频道也将被通知。