NAME

Monitoring::Sneck::Checks::containers - checks Docker or Podman containers

VERSION

Version 0.0.1

SYNOPSIS

containers|perl:containers
web_containers|perl:containers -n web -n db -x '^buildkit'
podman|perl:containers -r podman -n app

DESCRIPTION

Lists the containers through docker ps -a, or podman. A container given with --name that is not running, or any running one whose health check says it is unhealthy, is CRITICAL. One stuck restarting is WARNING.

This needs access to the runtime, which for Docker means root or the docker group. Not having it, or the runtime not being there, is UNKNOWN.

OPTIONS

- -n, --name :: A container that must be running. May be given more than once.

- -x, --exclude :: A regex for containers to leave out of the health and restarting checks. May be given more than once.

- -r, --runtime :: docker or podman. Default :: docker if it is there, else podman

METHODS

check

Does the check.