Module: check_mk
Branch: master
Commit: 465875a80b3adea1616c2736424eb6b7c14f4124
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=465875a80b3adeā¦
Author: Moritz Kiemer <mo(a)mathias-kettner.de>
Date: Mon Feb 11 13:54:38 2019 +0100
docker_node_disk_usage: minor cleanup
Change-Id: Icdda9952819c71b56709e9be60157b143d029cad
---
checks/docker_node_disk_usage | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/checks/docker_node_disk_usage b/checks/docker_node_disk_usage
index 0234bc9..14c7792 100644
--- a/checks/docker_node_disk_usage
+++ b/checks/docker_node_disk_usage
@@ -25,15 +25,8 @@
# Boston, MA 02110-1301 USA.
-def inventory_docker_node_disk_usage(parsed):
- for item in parsed:
- yield item, {}
-
-
-def check_docker_node_disk_usage(item, params, parsed):
- data = parsed.get(item)
- if data is None:
- return
+@get_parsed_item_data
+def check_docker_node_disk_usage(_no_item, params, data):
for key, param, conversion_func in (
('Size', 'size', get_filesize_human_readable),
@@ -59,7 +52,7 @@ def check_docker_node_disk_usage(item, params, parsed):
check_info["docker_node_disk_usage"] = {
"parse_function": parse_legacy_docker_system_df,
- "inventory_function": inventory_docker_node_disk_usage,
+ "inventory_function": discover(),
"check_function": check_docker_node_disk_usage,
"service_description": "Docker disk usage - %s",
"includes": ["legacy_docker.include"],