Skip to content

监控网站服务是否正常, 若出现异常则使用短信通知对应负责人

Notifications You must be signed in to change notification settings

MQPearth/web-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

web-monitor

通过以下三个指标判断目标网站是否正常

  1. 是否能在指定时间内正常建立连接以及返回内容

  2. HTTP Code 是否为200

  3. 网站响应内容不包含指定的字符

若出现异常会通过阿里云短信进行通知

配置如下

{
  //阿里短信配置
  "EndPoint": "http://dysmsapi.aliyuncs.com",
  //阿里短信配置
  "AccessKeyId": "*******",
  //阿里短信配置
  "AccessKeySecret": "*******",
  //阿里短信配置
  "SignName": "*******",
  //阿里短信配置
  "TemplateCode": "*******",
  //阿里短信配置
  "RegionId": "cn-shenzhen",
  //通知目标
  "PhoneNumbers": "*******",
  //关键字
  "HackedWords": [
    "ransom",
    "money"
  ],
  //连接超时时间 示例: 300ms
  "ConnectionTimeout": 300000,
  //内容读取时间 示例: 300ms
  "ReadTimeout": 300000
}

Run

./web-monitor -u http://localhost

Or

crontab -e

*/30 * * * * /web-monitor/web-monitor -u http://localhost:443 >> /web-monitor/log.txt

About

监控网站服务是否正常, 若出现异常则使用短信通知对应负责人

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published