From ea97b5fdafb85830582cbb247c5474216ee49748 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Mon, 22 Jan 2024 15:02:33 +0100
Subject: [PATCH] update docs

---
 docs/20_Checks/check_docker_info.md | 36 ++++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/docs/20_Checks/check_docker_info.md b/docs/20_Checks/check_docker_info.md
index 2bf02f6..e10d9b9 100644
--- a/docs/20_Checks/check_docker_info.md
+++ b/docs/20_Checks/check_docker_info.md
@@ -9,6 +9,11 @@ This check sends performance data.
 ## Requirements
 
 * `docker` Docker must be installed
+* sudo permissions on docker command
+
+```txt
+icingaclient ALL=(ALL) NOPASSWD:SETENV: /usr/bin/docker
+```
 
 ## Syntax
 
@@ -16,7 +21,7 @@ This check sends performance data.
 ______________________________________________________________________
 
 CHECK_DOCKER_INFO
-v1.0
+v1.1
 
 (c) Institute for Medical Education - University of Bern
 Licence: GNU GPL 3
@@ -26,14 +31,29 @@ ______________________________________________________________________
 
 Show docker version and count of containers total and by its status.
 
+It returns 
+  CRITICAL if a created container is not running.
+  OK if no container was created yet or all conmtainers are running
+  UNKNOWM if
+    - docker or jq were not found
+    - docker data were not fetched
+    - docker cannot be connected
+
+This check provides performance data.
+
 USAGE:
   check_docker_info [OPTIONS]
 
 OPTIONS:
   -h  this help
+  -d  Debug; Flag: show all docker system infos
 
 EXAMPLES:
   check_docker_info
+    Show Status of all containers
+
+  check_docker_info -d
+    Show Status of all containers and json with all docker system infos
 
 ```
 
@@ -50,3 +70,17 @@ OK: Docker 20.10.14 (Community Engine) .. containers: 2 running: 2 paused: 0 sto
 All containers are running
  |containers-running=2;;;0;2 containers-paused=0;;;0;2 containers-stopped=0;;;0;2 images=33;;
 ```
+
+## Troubleshooting
+
+### Missing environment
+
+```txt
+sudo: sorry, you are not allowed to preserve the environment
+UNKNOWN: No data. Unable to fetch Docker information.
+```
+
+Solution: you did not set SETENV in the sudoers config file
+
+icingaclient ALL=(ALL) NOPASSWD:**SETENV:** /usr/bin/docker
+
-- 
GitLab