1 Star 0 Fork 77

githubgreatnew / monitor-http-server

forked from kongkong / monitor-http-server 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

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 git@github.com:edouard-lopez/monitor-http-server.git
cd monitor-http-server
git 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/
# test
http://my.website.com/

Then you are good to go and run your first test

bash ./monitor-servers.sh me@host.com ./monitor-list-default.txt

##微信报警

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

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

Copyright (c) 2013 @edouard_lopez Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

检测url状态,如果不是可达状态,发送邮件和微信报警 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/zmzmzm/monitor-http-server.git
git@gitee.com:zmzmzm/monitor-http-server.git
zmzmzm
monitor-http-server
monitor-http-server
master

搜索帮助

14c37bed 8189591 565d56ea 8189591