项目作者: shurshun

项目描述 :
This util checks containers health status and sends it to Sensu Api
高级语言: Go
项目地址: git://github.com/shurshun/docker-health-bridge.git
创建时间: 2017-04-29T00:16:09Z
项目社区:https://github.com/shurshun/docker-health-bridge

开源协议:Apache License 2.0

下载


Docker Health Bridge

Go Report Card Docker Automated buil Join the chat at https://gitter.im/shurshun/Lobby

This util checks containers health status and sends it to sensu api

Configuration

  • --sensu-api, -s - Sensu API host (default: “sensu-api:4567”) [env SENSU_API]
  • --hostname, -n - Hostname to use for events [env HOSTNAME]
  • --retries, r - Set occurrences for sensu check before triggering an alert notification. Using Docker healthcheck param --retries (default: 3) [env RETRIES]
  • --log-level, -l - Set logging level: info, warning, error, fatal, debug, panic (default: warning) [env LOG_LEVEL]

Docker client initiliazing by env params DOCKER_HOST, DOCKER_TLS and other.
See cli/#environment-variables for more details.

Installation

docker pull shurshun/docker-health-bridge

Running

  1. docker run -d \
  2. -h $HOSTNAME \
  3. --name="docker-health-bridge" \
  4. -v /var/run/docker.sock:/var/run/docker.sock \
  5. -e SENSU_API=<...> \
  6. shurshun/docker-health-bridge

Building

make compile

By default Linux and Mac OS builds are made.

You will need a local docker instance running that supports mounting in your host volume path into the container. If you are on OSX, this can be achieved using docker-machine (with virtualbox or vmware fusion). If you are on linux, and running a local docker daemon this is already supported.