healthcheck

package module
v0.0.0-...-1643d9d Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

README

logspout-healthcheck

adds a healtcheck endpoiunt to gliderlabs/logspout.

usage

  • add logspout-healthcheck to your modules.go. example;

    package main
    
    import (
    	_ "github.com/gliderlabs/logspout/adapters/syslog"
    	_ "github.com/gliderlabs/logspout/transports/tcp"
    	_ "github.com/briceburg/logspout-healthcheck"
      ...
    )
    
  • build logspout

  • test /healthcheck endpoint. example with logspout listening on :8888;

$ docker run --rm -d \
  -p 8888:80 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  logspout:custom

$ curl http://localhost:8888/healthcheck
OK

usage as a Dockerfile HEALTCHECK

FROM gliderlabs/logspout

HEALTHCHECK --interval=10s --timeout=3s --retries=2 \
  CMD wget -q --spider http://localhost/healthcheck

wget is included in alpine/busybox. curl is not.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthCheck

func HealthCheck() http.Handler

HealthCheck returns a http.Handler for the health check

Types

This section is empty.

Jump to

Keyboard shortcuts

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