From cc4e80bb763aa4cb4483575660f39c88a3837217 Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Wed, 28 Jan 2026 12:31:09 +0100 Subject: [PATCH 1/3] Update README --- README.rst | 38 ++++++++++++-------------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/README.rst b/README.rst index cfa9195..814a1a4 100644 --- a/README.rst +++ b/README.rst @@ -1,11 +1,8 @@ -|Build Status| |Code Climate| |Test Coverage| |Downloads| - - ============ check_docker ============ -Nagios/NRPE compatible plugins for checking docker based services. Currently there are two nagios checks +Nagios/NRPE compatible plugins for checking Docker based services. Currently there are two Nagios checks - **check_docker** which checks docker container health - **check_swarm** which checks health of swarm nodes and services @@ -15,7 +12,7 @@ With **check_docker** can use it to check and alert on - memory consumption in absolute units (bytes, kb, mb, gb) and as a percentage (0-100%) of the container limit. - CPU usages as a percentage (0-100%) of container limit. -- automatic restarts performed by the docker daemon +- automatic restarts performed by the Docker daemon - container status, i.e. is it running? - container health checks are passing? - uptime, i.e. is it able to stay running for a long enough time? @@ -25,33 +22,32 @@ With **check_docker** can use it to check and alert on With **check_swarm** you can alert -- if a node is not joined to a docker swarm -- if a service is running in a swarm - -These checks can communicate with a local docker daemon socket file (default) or with local -or remote docker daemons using secure and non-secure TCP connections. +- if a node is not joined to a Docker Swarm +- if a service is running in a Swarm -These plugins require python 3. It is tested on 3.5 and greater but may work on older -versions of 3. +These checks can communicate with a local Docker daemon socket file (default) or with local +or remote Docker daemons using secure and non-secure TCP connections. Installation ----------------- -With pip +These plugins require Python 3. + +With pip: :: pip3 install check_docker --or-- pip install check_docker -With curl +With curl: :: curl -o /usr/local/bin/check_docker https://raw.githubusercontent.com/timdaman/check_docker/master/check_docker/check_docker.py curl -o /usr/local/bin/check_swarm https://raw.githubusercontent.com/timdaman/check_docker/master/check_docker/check_swarm.py chmod a+rx /usr/local/bin/check_docker /usr/local/bin/check_swarm -With wget +With wget: :: wget -O /usr/local/bin/check_docker https://raw.githubusercontent.com/timdaman/check_docker/master/check_docker/check_docker.py @@ -75,7 +71,7 @@ check_docker Usage [--insecure-registries INSECURE_REGISTRIES [INSECURE_REGISTRIES ...]] [--restarts WARN:CRIT] [--no-ok] [--no-performance] [-V] - Check docker containers. + Check Docker containers. optional arguments: -h, --help show this help message and exit @@ -157,15 +153,5 @@ check_swarm Usage Gotchas ------- -- When using check_docker with older versions of docker (I have seen 1.4 and 1.5) –status only supports ‘running’, ‘restarting’, and ‘paused’. - When using check_docker, if no container is specified, all containers are checked. Some containers may return critcal status if the selected check(s) require a running container. - When using check_docker, --present cannot be used without --containers to indicate what to check the presence of. - -.. |Build Status| image:: https://travis-ci.org/timdaman/check_docker.svg?branch=master - :target: https://travis-ci.org/timdaman/check_docker -.. |Code Climate| image:: https://codeclimate.com/github/timdaman/check_docker/badges/gpa.svg - :target: https://codeclimate.com/github/timdaman/check_docker -.. |Test Coverage| image:: https://codeclimate.com/github/timdaman/check_docker/badges/coverage.svg - :target: https://codeclimate.com/github/timdaman/check_docker/coverage -.. |Downloads| image:: http://pepy.tech/badge/check-docker - :target: http://pepy.tech/count/check-docker From b5f50d876803d9a2c5d836e4c37f5f188205a561 Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Wed, 28 Jan 2026 12:30:58 +0100 Subject: [PATCH 2/3] Bump version to v2.3.0 --- check_docker/__init__.py | 4 ++-- check_docker/check_docker.py | 2 +- check_docker/check_swarm.py | 2 +- pyproject.toml | 7 ++----- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/check_docker/__init__.py b/check_docker/__init__.py index 58ac6b8..8978485 100644 --- a/check_docker/__init__.py +++ b/check_docker/__init__.py @@ -1,2 +1,2 @@ -"""Nagios/NRPE compatible plugins for checking docker based services""" -__version__ = "2.2.2" \ No newline at end of file +"""Nagios/NRPE compatible plugins for checking Docker based services""" +__version__ = "2.3.0" diff --git a/check_docker/check_docker.py b/check_docker/check_docker.py index 19830c2..84a6312 100755 --- a/check_docker/check_docker.py +++ b/check_docker/check_docker.py @@ -26,7 +26,7 @@ __copyright__ = "Copyright 2019" __credits__ = ['Tim Laurence'] __license__ = "GPL" -__version__ = "2.2.2" +__version__ = "2.3.0" ''' nrpe compatible check for docker containers. diff --git a/check_docker/check_swarm.py b/check_docker/check_swarm.py index 96fa9cf..07c7eb6 100755 --- a/check_docker/check_swarm.py +++ b/check_docker/check_swarm.py @@ -20,7 +20,7 @@ __copyright__ = "Copyright 2019" __credits__ = ['Tim Laurence'] __license__ = "GPL" -__version__ = "2.2.2" +__version__ = "2.3.0" ''' nrpe compatible check for docker swarm diff --git a/pyproject.toml b/pyproject.toml index fe1bcc2..ecd58c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.masonry.api" [tool.poetry] name = "check_docker" -version = "2.2.2" +version = "2.3.0" description = "Nagios/NRPE compatible plugins for checking Docker based services" license = "GPL-3.0" authors = ["Tim Laurence "] @@ -27,7 +27,4 @@ packages = [ [tool.poetry.scripts] check_docker = "check_docker.check_docker:main" -check_swarm = "check_docker.check_swarm:main" - - - +check_swarm = "check_docker.check_swarm:main" \ No newline at end of file From 03f04ab320215a2cf00841ad6d7c5afebbde7c37 Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Mon, 2 Feb 2026 16:19:37 +0100 Subject: [PATCH 3/3] Update help texts --- README.rst | 4 ++-- check_docker/check_docker.py | 2 +- check_docker/check_swarm.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 814a1a4..220147d 100644 --- a/README.rst +++ b/README.rst @@ -97,7 +97,7 @@ check_docker Usage --threads THREADS This + 1 is the maximum number of concurent threads/network connections. (default: 10) --cpu WARN:CRIT Check cpu usage percentage taking into account any - limits. Valid values are 0 - 100. + limits. --memory WARN:CRIT:UNITS Check memory usage taking into account any limits. Valid values for units are %,B,KB,MB,GB. @@ -143,7 +143,7 @@ check_swarm Usage --secure-connection [:] Where to find TLS protected docker daemon socket. --timeout TIMEOUT Connection timeout in seconds. (default: 10.0) - --swarm Check swarm status + --swarm Check whether or not this node is connected to a swarm --service SERVICE [SERVICE ...] One or more RegEx that match the names of the services(s) to check. diff --git a/check_docker/check_docker.py b/check_docker/check_docker.py index 84a6312..73fb2d0 100755 --- a/check_docker/check_docker.py +++ b/check_docker/check_docker.py @@ -824,7 +824,7 @@ def process_args(args): action='store', type=str, metavar='WARN:CRIT', - help='Check cpu usage percentage taking into account any limits. Valid values are 0 - 100.') + help='Check cpu usage percentage taking into account any limits.') # Memory parser.add_argument('--memory', diff --git a/check_docker/check_swarm.py b/check_docker/check_swarm.py index 07c7eb6..6b75987 100755 --- a/check_docker/check_swarm.py +++ b/check_docker/check_swarm.py @@ -299,7 +299,7 @@ def process_args(args): dest='swarm', default=None, action='store_true', - help='Check swarm status') + help='Check whether or not this node is connected to a swarm') # Service swarm_group.add_argument('--service',