Module: check_mk
Branch: master
Commit: 7f30f6947df6df1fd40cc02fa71c93475c6ec461
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7f30f6947df6df…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 30 15:26:42 2015 +0100
Fixed last commit
---
checks/lparstat_aix | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/checks/lparstat_aix b/checks/lparstat_aix
index 732d5ce..30927bb 100644
--- a/checks/lparstat_aix
+++ b/checks/lparstat_aix
@@ -49,7 +49,7 @@
lparstat_default_levels = (5, 10)
def inventory_lparstat(info):
- if len(info) >= 1 and len(info[2]) >= 5:
+ if len(info) >= 1 and len(info[-1]) >= 5:
return [(None, "", "lparstat_default_levels")]
def check_lparstat(item, params, info):
@@ -72,9 +72,9 @@ def check_lparstat(item, params, info):
return 3, "Invalid output from agent"
else:
# The new agent provides three lines, the title line, spacer line and the values
- cols = [ c.replace('%', '') for c in info[0] ]
- uom = [ '%' in c and '%' or '' for c in info[0] ]
- values = info[2]
+ cols = [ c.replace('%', '') for c in info[-3] ]
+ uom = [ '%' in c and '%' or '' for c in info[-3] ]
+ values = info[-1]
perfdata = [ (cols[i], val+uom[i]) for i, val in enumerate(values) ]
output = ', '.join([ cols[i].title()+': '+val+uom[i] for i, val in
enumerate(values) ])
@@ -92,14 +92,14 @@ check_info["lparstat_aix"] = {
kernel_util_default_levels = None
def inventory_lparstat_aix_cpu(info):
- if len(info) >= 1 and len(info[2]) >= 4:
+ if len(info) >= 1 and len(info[-1]) >= 4:
return [(None, "kernel_util_default_levels")]
def check_lparstat_aix_cpu(_no_item, params, info):
if len(info) == 1:
line = info[0] # old (single line) agent output
else:
- line = info[2]
+ line = info[-1]
user, system, wait, idle = map(float, line[:4])
perfdata = [
( "user", "%.3f" % user ),