[checkmk-commits] Check_MK Git: check_mk: #1994 FIX lparstat: Support new AIX version with two new columns nsp and utctc

Mathias Kettner mk at mathias-kettner.de
Wed Feb 18 16:23:39 CET 2015


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

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Wed Feb 18 16:23:36 2015 +0100

#1994 FIX lparstat: Support new AIX version with two new columns nsp and utctc

---

 .werks/1994         |   10 ++++++++++
 ChangeLog           |    1 +
 checks/lparstat_aix |   10 +++++++---
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/.werks/1994 b/.werks/1994
new file mode 100644
index 0000000..6bff394
--- /dev/null
+++ b/.werks/1994
@@ -0,0 +1,10 @@
+Title: lparstat: Support new AIX version with two new columns nsp and utctc
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1424272988
+
+
diff --git a/ChangeLog b/ChangeLog
index e733719..cb3cc0f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -160,6 +160,7 @@
     * 1942 FIX: netapp_api_volumes: fixed exception when performance data generation was enabled
     * 1993 FIX: solaris_multipath: Fix detection of expected number of paths
     * 1944 FIX: hr_mem: no longer reports incorrect memory values when cached memory values are broken...
+    * 1994 FIX: lparstat: Support new AIX version with two new columns nsp and utctc
 
     Multisite:
     * 1758 Improved exception hander: Shows details without additional debug request, added mailto link for error report...
diff --git a/checks/lparstat_aix b/checks/lparstat_aix
index 30927bb..9bcf6ca 100644
--- a/checks/lparstat_aix
+++ b/checks/lparstat_aix
@@ -56,7 +56,11 @@ def check_lparstat(item, params, info):
     if len(info) == 1:
         # Old agent provided only the values in a single line
         line = info[0]
-        if len(line) == 10:
+        if len(line) == 12:
+            cols   = [ 'physc', 'entc', 'lbusy', 'app', 'vcsw', 'phint', 'nsp', 'utcyc' ]
+            uom    = [ '',      '%',    '',      '',    '',     '',       '%',  '%' ]
+            values = line[-8:]
+        elif len(line) == 10:
             cols   = [ 'physc', 'entc', 'lbusy', 'app', 'vcsw', 'phint' ]
             uom    = [ '',      '%',    '',      '',    '',     '' ]
             values = line[-6:]
@@ -68,8 +72,8 @@ def check_lparstat(item, params, info):
             cols   = [ 'nsp', 'utcyc' ]
             uom    = [ '%',   '%' ]
             values = line[-2:]
-        else:
-            return 3, "Invalid output from agent"
+        # else:
+            # Invalid output, let exception happen
     else:
         # The new agent provides three lines, the title line, spacer line and the values
         cols   = [ c.replace('%', '') for c in info[-3] ]



More information about the checkmk-commits mailing list