2023-01-25 01:16:01 +00:00
|
|
|
.\" Automatically generated by Pandoc 2.19.2
|
|
|
|
.\"
|
|
|
|
.\" Define V font for inline verbatim, using C font in formats
|
|
|
|
.\" that render this, and otherwise B font.
|
|
|
|
.ie "\f[CB]x\f[]"x" \{\
|
|
|
|
. ftr V B
|
|
|
|
. ftr VI BI
|
|
|
|
. ftr VB B
|
|
|
|
. ftr VBI BI
|
|
|
|
.\}
|
|
|
|
.el \{\
|
|
|
|
. ftr V CR
|
|
|
|
. ftr VI CI
|
|
|
|
. ftr VB CB
|
|
|
|
. ftr VBI CBI
|
|
|
|
.\}
|
|
|
|
.TH "docker_check" "1" "January 2023" "docker_check" ""
|
|
|
|
.hy
|
|
|
|
.SH NAME
|
|
|
|
.PP
|
|
|
|
docker_check - Checks a set of docker containers and notifies if their
|
|
|
|
state is not up and running.
|
|
|
|
Configuration is done in environment files.
|
|
|
|
.PD 0
|
|
|
|
.P
|
|
|
|
.PD
|
|
|
|
It\[cq]s part of \f[B]system-helpers\f[R].
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.PP
|
2023-01-25 22:27:38 +00:00
|
|
|
\f[B]docker_check\f[R]
|
2023-01-25 01:16:01 +00:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.PP
|
|
|
|
\f[B]docker_check\f[R] checks a list of docker containers and notifies
|
|
|
|
if their state is not up and running.
|
|
|
|
It comes with systemd services.
|
|
|
|
.PP
|
2023-01-25 22:27:38 +00:00
|
|
|
By default, \f[B]docker_check\f[R] tries to read from
|
|
|
|
\f[I]$HOME/.docker_check.conf\f[R] and \f[I]/etc/docker_check.conf\f[R]
|
|
|
|
for configuration.
|
|
|
|
It will exit with a non-zero exit code if it cannot find a proper
|
2023-01-25 01:16:01 +00:00
|
|
|
configuration file.
|
|
|
|
.PP
|
2023-01-25 23:21:49 +00:00
|
|
|
The following can be customized:
|
2023-01-25 01:16:01 +00:00
|
|
|
.PD 0
|
|
|
|
.P
|
|
|
|
.PD
|
|
|
|
- \f[B]DOCKER_CHECK_LIST_FILE=\[lq]$HOME/.docker_check.list\[rq]\f[R]
|
|
|
|
which lists to be checked docker containers separated by lines.
|
|
|
|
Provide their container name, e.g.\ output of current running docker
|
|
|
|
containers piped into the file: \f[I]docker ps \[en]format `{{.Names}}'
|
|
|
|
>> $HOME/.docker_check.list\f[R]).
|
|
|
|
.PD 0
|
|
|
|
.P
|
|
|
|
.PD
|
|
|
|
- \f[B]DOCKER_CHECK_NOTIFY_LEVELS=(\[lq]UNKNOWN\[rq] \[lq]WARNING\[rq]
|
2023-01-25 23:21:49 +00:00
|
|
|
\[lq]CRITICAL\[rq])\f[R] determines when to notify/output.
|
2023-01-25 01:16:01 +00:00
|
|
|
Possible: \f[I]\[lq]UNKNOWN\[rq]\f[R] \f[I]\[lq]WARNING\[rq]\f[R]
|
|
|
|
\f[I]\[lq]CRITICAL\[rq]\f[R] \f[I]\[lq]INFO\[rq]\f[R].
|
|
|
|
.PD 0
|
|
|
|
.P
|
|
|
|
.PD
|
|
|
|
.PP
|
|
|
|
You can copy this script to \f[I]/usr/local/bin\f[R] and use create a
|
|
|
|
custom \f[B]CONFIG_FILE\f[R] as user.
|
|
|
|
.SH EXAMPLE
|
|
|
|
.PP
|
|
|
|
Create a \f[I]$HOME/.docker_check.conf\f[R] and add
|
2023-01-25 23:21:49 +00:00
|
|
|
\f[I]DOCKER_CHECK_NOTIFY_LEVELS=\[lq](WARNING)\[rq]\f[R].
|
|
|
|
Notifications will be delivered via \f[B]notifier\f[R].
|
2023-01-25 01:16:01 +00:00
|
|
|
Examples can be found in \f[I]/usr/share/doc/docker_check\f[R].
|
|
|
|
.SH EXIT VALUES
|
|
|
|
.TP
|
|
|
|
\f[B]0\f[R]
|
|
|
|
Success
|
|
|
|
.TP
|
|
|
|
\f[B]1\f[R]
|
|
|
|
Error
|
2023-01-25 23:21:49 +00:00
|
|
|
.SH SEE ALSO
|
|
|
|
.PP
|
|
|
|
\f[B]notifier\f[R] - used as notification application
|
2023-01-25 01:16:01 +00:00
|
|
|
.SH AUTHORS
|
|
|
|
Alexander Sch\[:a]ferdiek.
|