1.4 KiB
1.4 KiB
核云IDC服务商VPS自动监测重启程序
API接口信息
- 获取登录Token
https://www.heyunidc.cn/v1/login_api?account={phone number/email acc}&password={API KEY}备注:POST方法 - 获取VPS列表
https://www.heyunidc.cn/v1/hosts?page=1&limit=100备注:GET方法,使用"Authorization: JWT {Token}"进行认证 注意:若您的VPS数量超过100,需要更改limit数量 - 获取VPS状态
https://www.heyunidc.cn/v1/hosts/{id}/module/status?type=host备注:GET方法,使用"Authorization: JWT {Token}"进行认证 - 操作VPS
PUT https://www.heyunidc.cn/v1/hosts/:id/module/hard_reboot备注:PUT方法,使用"Authorization: JWT {Token}"进行认证 操作类型:hard_reboot - 硬重启,on - 开机,off - 关机,reboot - 重启
使用方法
获取API_KEY
Web端
部署到服务器上,分配域名或直接IP访问即可
首次使用会进入配置页,依次输入API_PASS,ACCOUNT,API_KEY(其中API_PASS是您自定义的网站访问密码,支持大小写字母以及数字)
随后访问http://example.com/?pass=API_PASS即可
监控端
- 安装:
- chmod +x ./install.sh
- ./install.sh
系统将自动注册名为idc-monitor的system服务
- 安装:
- chmod +x ./uninstall.sh
- ./uninstall.sh
