# HeartBeat **Repository Path**: rocketdemo/HeartBeat ## Basic Information - **Project Name**: HeartBeat - **Description**: No description available - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2016-01-06 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #HeartBeat
心跳检测各类应用服务器(如Tomcat,Jetty),WEB服务器(如 Apache,Nginx) 的JAVA WEB应用程序.
如何实现?
使用HttpClient对指定的服务器(application-instance) URL 按频率(10秒,20秒...) 发起请求并记录响应的信息(连接耗时,是否连接成功,是否有异常,响应数据包大小),
若检测到不正常(响应码不是200,抛出异常...)时则发送邮件给指定的地址,当检测恢复正常时也发送提醒邮件.
将来会添加更多的实时提醒方式接口,如微信,短信
HeartBeat项目使用的邮件服务器使用SSL连接, 所以在配置邮件(javaMailSender, HeartBeat.xml文件)时, 使用了SSL连接配置,包括mail.smtp.auth
与mail.smtp.socketFactory.class
;
若在使用中配置邮件后不工作, 请检查配置(如使用的邮件服务器是否支持SSL)并编写单元测试来测试邮件发送能正常工作(项目的邮件单元测试在 MailTransmitterTest.java 文件中,
记得将测试的emailAddress设置为自己邮箱).
另: 强烈建议使用SSL连接邮件服务器
在项目的配置文件HeartBeat.properties
中, 可配置邮件为开发环境或生产环境,具体参数为mail.develop.environment
与mail.develop.address
, 若将mail.develop.environment
= true为生产环境, false为开发环境; 开发环境时的邮件只为
发给mail.develop.address
配置的邮箱,不会发给真正的邮件接收者; 生产环境时mail.develop.address
配置不启作用.
从 0.5版本开始将项目的所有计划的开发内容列出来, 方便大家跟进, 也欢迎你加入.
项目的开发管理使用开源项目 andaily-developer.
Version: 0.5 [planning]
Date: ------
(70) - Why set archived = 1 in mysql application_instance table(Fix issue #6)
(83) - 对于注册的用户, 登录后只能管理自己 创建的instances
(112) - #12 请求参数BUG(设置Url参数时未进行非空验证)
(104) - 添加发送短信提醒
(105) - 添加发送微信提醒
......
2014-10-17 ---- Initial project
2015-02-13 ---- Move development to coding.net
2015-03-01 ---- Back to OSC and update documents; Add 0.1 branch
2015-03-14 ---- Monitoring log add response data size;Add list of monitoring reminder logs; Update page styles; Add 0.2 branch
2015-03-15 ---- 0.3 branch is developing
2015-04-02 ---- Add 0.3 branch and publish it
2015-04-06 ---- 0.4 branch is developing
2015-05-01 ---- Publish 0.4 version
2016-01-09 ---- Deploy war to Test-Server(https://andaily.com/hb/)
Monitoring
Instance - Monitoring details
Instance - Overview
Instance - Create
Monitoring-Log
Monitoring-Reminder-Log
Search
捐助
支付宝: monkeyking1987@126.com (**钊)