• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

monitor-http-server: 检测url状态,如果不是可达状态,发送邮件和微信报警 ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

monitor-http-server

开源软件地址:

https://gitee.com/yeetrack/monitor-http-server

开源软件介绍:

monitor-http-server

Simple script to monitor if servers are responding (status 200) or not.

Screenshot

Sample output

Dependencies

You need to have a mail server configured to be able to send notification.

  • mail command to send notification.
  • stylerc: bash output style ;
  • toolboxrc: some stupid utilities ;

Install

The project use two submodules, the instructions below cover an out of the box installation process:

git clone [email protected]:edouard-lopez/monitor-http-server.gitcd monitor-http-servergit submodule init && git submodule update # install the submodules

Usage

First you need to edit the file monitor-list.txt and add some servers URLs (using their FQDN).

Note that lines starting with a # (dash) are ignored.

# ignored hosts# http://wont-be.tested.com/# testhttp://my.website.com/

Then you are good to go and run your first test

bash ./monitor-servers.sh [email protected] ./monitor-list-default.txt

##微信报警

当检测到非200的请求时,会触发邮件和微信报警。微信报警需要自己维护weixin-send.sh、和weixin-heart.sh这两个文件。

这两个shell文件其实就是两条curl命令,send文件用来发送微信消息,heart文件用于向腾讯服务器发送心跳,否则时间久了,会踢掉改sid。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap