api-watcher
api-watcher copied to clipboard
API monitor
API Watcher
参考 runscope 的一个 API 监控系统.
安装
git clone [email protected]:RunnerLee/api-watcher.git
composer install
php artisan migrate
php artisan admin:install
php artisan db:seed
配置 API 分组

增加 API

为 API 添加请求参数

为 API 分组增加计划任务
计划任务的条件, 通过 json 配置星期与小时.
{
"week": [], // 周一到周日
"hour": {
"between": { // 执行的时间范围
"from": "",
"to": ""
},
"unless_between": { // 不执行的时间范围
"from": "",
"to": ""
}
}
}

配置钉钉群机器人
.env
DINGDING_ROBOT_TOKEN=xxxxxx
安装调度器
crontab -e
增加
* * * * * php /path/to/artisan schedule:run > /dev/null 2>&1 &
TODO
- 微信公众号/短信/邮件 告警
- API 文档生成