[checkmk-commits] Check_MK Git: check_mk: FIX zypper: check is always registered as soon as mk_zypper plugin detects zypper tool

Götz Golla gg at mathias-kettner.de
Tue Feb 4 10:52:10 CET 2014


Module: check_mk
Branch: master
Commit: 99c6695d9d5a534e5860fb5c3c023159112c09c1
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=99c6695d9d5a534e5860fb5c3c023159112c09c1

Author: Götz Golla <gg at mathias-kettner.de>
Date:   Tue Feb  4 10:51:30 2014 +0100

FIX zypper: check is always registered as soon as mk_zypper plugin detects zypper tool

There is also a WATO section "Zypper Updates" now so that the check can be configured
as a manual check.

---

 .werks/578                           |    9 +++++++++
 ChangeLog                            |    1 +
 checks/zypper                        |    7 +++++--
 web/plugins/wato/check_parameters.py |    7 +++++++
 4 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/.werks/578 b/.werks/578
new file mode 100644
index 0000000..616ce92
--- /dev/null
+++ b/.werks/578
@@ -0,0 +1,9 @@
+Title: zypper: check is always registered as soon as mk_zypper plugin detects zypper tool
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1391505179
+Class: fix
+
+There is also a WATO section "Zypper Updates" now so that the check can be configured
+as a manual check.
diff --git a/ChangeLog b/ChangeLog
index 977a936..817e1c0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -152,6 +152,7 @@
     * 0575 FIX: cmciii_lcp_airin, cmciii_lcp_airout, cmciii_lcp_waterin, cmciii_lcp_waterout: improved handling of warning state...
     * 0272 FIX: if checks: port type 56 (fibrechannel) is no longer inventorized per default...
     * 0577 FIX: fileinfo.groups: new date pattern is now available for inventory check as well
+    * 0578 FIX: zypper: check is always registered as soon as mk_zypper plugin detects zypper tool...
 
     Multisite:
     * 0371 Added log class filter to hostsvcevents view
diff --git a/checks/zypper b/checks/zypper
index 8722dc9..291b44b 100644
--- a/checks/zypper
+++ b/checks/zypper
@@ -37,8 +37,10 @@
 
 
 def inventory_zypper(info):
-    if len(info) > 0:
-        return [(None,{})]
+    # the agent section is only present when the agent has
+    # detected that zypper is installed, therefore the check
+    # can always register
+    return [(None,{})]
 
 def check_zypper(_no_item, _no_params, info):
     patch_types = {}
@@ -83,4 +85,5 @@ check_info['zypper'] = {
     "check_function"          : check_zypper,
     "inventory_function"      : inventory_zypper,
     "service_description"     : "Zypper Updates",
+    "group"                   : "zypper",
 }
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 6973b05..d0219a9 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -4618,3 +4618,10 @@ register_check_parameters(
     "first", False
 )
 
+register_check_parameters(
+    subgroup_os,
+    "zypper",
+    _("Zypper Updates"),
+    None,
+    None, None,
+)



More information about the checkmk-commits mailing list