Module: check_mk
Branch: master
Commit: a53166977722a162eeacb53b173ac0382c27969a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a53166977722a1…
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Wed Feb 13 09:16:31 2019 +0100
mk_docker.py: Add a few sentences to docstring / example configs
CMK-1660
Change-Id: Ic5b3e07246fdde9c90841bf6034c3557bd610fdc
---
agents/cfg_examples/docker.cfg | 5 +++++
agents/cfg_examples/docker.minimal.cfg | 4 +++-
.../{docker.perf_tradeof.cfg => docker.perf_tradeoff.cfg} | 4 ++--
agents/plugins/mk_docker.py | 2 ++
tests/unit/plugins/test_mk_docker.py | 2 +-
5 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/agents/cfg_examples/docker.cfg b/agents/cfg_examples/docker.cfg
index 74125e7..a874c94 100644
--- a/agents/cfg_examples/docker.cfg
+++ b/agents/cfg_examples/docker.cfg
@@ -2,6 +2,11 @@
#
# mk_docker.py
#
+# It is designed to give you an impression of available
+# options. The specific choice in this file is a valid setup,
+# but probably not suitable for your use case.
+# If you intend to run the plugin with the default options,
+# you do not need any configuration file at all.
# You must specify one section of the name DOCKER (additional sections are ignored).
[DOCKER]
diff --git a/agents/cfg_examples/docker.minimal.cfg
b/agents/cfg_examples/docker.minimal.cfg
index b267e03..27e43bb 100644
--- a/agents/cfg_examples/docker.minimal.cfg
+++ b/agents/cfg_examples/docker.minimal.cfg
@@ -3,6 +3,8 @@
# mk_docker.py
#
# This will configure the plugin to produce minimal output:
-# Only the section <<<docker_node_info>>> is created:
+# Only the section <<<docker_node_info>>> is created.
+# It will be assumed the docker daemon is listening on the
+# local UNIX domain socket.
[DOCKER]
skip_sections:
docker_node_disk_usage,docker_node_images,docker_node_network,docker_container_client,docker_container_agent
diff --git a/agents/cfg_examples/docker.perf_tradeof.cfg
b/agents/cfg_examples/docker.perf_tradeoff.cfg
similarity index 66%
rename from agents/cfg_examples/docker.perf_tradeof.cfg
rename to agents/cfg_examples/docker.perf_tradeoff.cfg
index a6e224d..09f45ca 100644
--- a/agents/cfg_examples/docker.perf_tradeof.cfg
+++ b/agents/cfg_examples/docker.perf_tradeoff.cfg
@@ -2,9 +2,9 @@
#
# mk_docker.py
#
-# This example is designed to configure a trade-of between
+# This example is designed to configure a trade-off between
# information depth and execution time:
-# skip the exensive tasks of determining the disk usage
+# Skip the extensive tasks of determining the disk usage
# and running the agents inside the containers.
[DOCKER]
skip_sections: docker_node_disk_usage,docker_container_agent
diff --git a/agents/plugins/mk_docker.py b/agents/plugins/mk_docker.py
index c5113aa..5b0110a 100755
--- a/agents/plugins/mk_docker.py
+++ b/agents/plugins/mk_docker.py
@@ -31,6 +31,8 @@ At 'agents/cfg_examples/mk_docker.cfg' (relative to the
check_mk
source code directory ) you should find some example configuration
files. For more information on possible configurations refer to the
file docker.cfg in said directory.
+The docker-py library must be installed on the system executing the
+plugin ("pip install docker").
This plugin it will be called by the agent without any arguments.
"""
diff --git a/tests/unit/plugins/test_mk_docker.py b/tests/unit/plugins/test_mk_docker.py
index e71fb56..685de73 100644
--- a/tests/unit/plugins/test_mk_docker.py
+++ b/tests/unit/plugins/test_mk_docker.py
@@ -11,7 +11,7 @@ sys.path.insert(0, os.path.join(cmk_path(), 'agents',
'plugins'))
import mk_docker # pylint: disable=import-error,wrong-import-position
PLUGIN_CHECKSUMS = {
- '0.1': 'd83056096210caba2068f9849c4811dd',
+ '0.1': '7e456e69affbebf7b2f070a6d6548e23',
}