health-check-monitor

command module
v0.0.0-...-c4326c0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2018 License: MIT Imports: 10 Imported by: 0

README

Gopher

Status Check API

What is this?

This program will constantly check for one or more http endpoints and notify you whenever something goes down and also when it goes up again!

It will additionally expose an api with the current statuses of every endpoint configured.

Configuration

This health check needs a config.json file with this minimal structure

{
  "urlMonitors": [
    {
      "name": "Google",
      "url": "https://www.google.com"
    }
  ]
}

You can also specify the config file path with the -config flag. For example:

health-check-monitor -config my/custom/dir/my_config.json

Check more configuration options in the conf.json distribution file

Run locally

go get gitlab.com/skyvet/health-check-monitor
cd $GOPATH/src/gitlab.com/skyvet/health-check-monitor
go install
curl https://gitlab.com/skyvet/health-check-monitor/raw/master/config.json.dist -o config.json
health-check-monitor

Run with docker

Download a basic config file
curl https://gitlab.com/skyvet/health-check-monitor/raw/master/config.json.dist -o config.json
Look up latest version and run it

You can do this with jq and gitlab tags api

LATEST_TAG=$(curl -s https://gitlab.com/api/v4/projects/10061516/repository/tags |jq -r '.[0].name')
docker run -d \
-v "$(pwd)/config.json:/config.json" \
-p "8001:8001" \
registry.gitlab.com/skyvet/health-check-monitor:$LATEST_TAG -config /config.json

Or just go check manually the list and then run docker

docker run -d \
-v "$(pwd)/config.json:/config.json" \
-p "8001:8001" \
registry.gitlab.com/skyvet/health-check-monitor:<insert here latest tag> -config /config.json

Ping it!

curl http://localhost:8001/status

Licensing

Check LICENSE.md

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL