1 Star 5 Fork 7

Ulric Qin / dinp-hm

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

HM

HM(Health Monitor)用于APP rs (docker container) 的7层健康检查。 如要开启APP rs的7层健康检查,在DashBoard的APP页面的health栏填写健康检查的URL (如/health)。

HM每隔check_interval (单位s)

  • 从Server模块的DB中查询需要健康检查的APP列表 (即health字段不为空的APP),
  • 从Server模块的HTTP接口中查询APP及相应的rs列表, 然后curl相应的rs,如果在response_timeout (单位s) 内返回内容包括health_sign,则视该rs为健康;否则将杀掉该rs (docker container),由Server模块进行调度创建新的rs。

配置项说明

  • debug: true/false 只影响打印的log
  • check_interval: 健康检查的周期,单位s
  • dockerPort: Docker Daemon的侦听端口
  • response_timeout: APP health接口的响应超时时间,单位s
  • health_sign: APP health接口的返回内容,如'''ok'''
  • server_http_api: DINP Server模块的http api接口
  • db: DINP Server模块数据库的地址,以及超时时间

install

mkdir -p $GOPATH/src/github.com/dinp
cd $GOPATH/src/github.com/dinp; git clone https://github.com/dinp/hm.git
cd hm
go get ./...

# check cfg.json, depend docker daemon and server
hm -c cfg.json

About

DINP中的Health Monitor,对APP的rs进行7层健康检查 expand collapse
Go
Cancel

Releases

No release

dinp-hm

Contributors

All

Activities

Load More
can not load any more
Go
1
https://gitee.com/cnperl/dinp-hm.git
git@gitee.com:cnperl/dinp-hm.git
cnperl
dinp-hm
dinp-hm
master

Search

E71a60c3 8189591 Df7b7c6b 8189591