$ docker run -itp 8080:80 grandmaster/check_golang_dep
- Open http://localhost:8080 and navigate to any service
The plug-and-play binaries take two positional CLI arguments and no environment variables:
$ ./check_golang_dep GO_PACKAGE CACHE_DIR
GO_PACKAGE is the Golang package to monitor the dependencies of.
CACHE_DIR is a directory a check_golang_dep service uses exclusively (per host and service!) for caching. It either...
- already exists and is read- and writable by check_golang_dep or
- could be created by check_golang_dep via e.g.
mkdir -p CACHE_DIRwithout sudo(8) or similar.
To print the legal info, execute the plugin in a terminal:
In this case the program will always terminate with exit status 3 ("unknown") without actually checking anything.
If you want to actually execute a check inside a terminal, you have to connect the standard output of the plugin to anything other than a terminal – e.g. the standard input of another process:
$ ./check_golang_dep github.com/Al2Klimov/check_golang_dep "$(mktemp -d)" |cat
In this case the exit code is likely to be the cat's one. This can be worked around like this:
bash $ set -o pipefail bash $ ./check_golang_dep github.com/Al2Klimov/check_golang_dep "$(mktemp -d)" |cat
Just integrate the plugin into the monitoring tool of your choice like any other check plugin. (Consult that tool's manual on how to do that.) It should work with any monitoring tool supporting the Nagio$ check plugin API.