Module: check_mk
Branch: master
Commit: 6e30137657dbc3db91a7fe5d4a673e1ee2e15552
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6e30137657dbc3…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Sep 10 10:58:25 2015 +0200
aix_hacmp_resource: tweaked behaviour, now always reports CRIT when first node is not
online
---
checks/aix_hacmp_resources | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/checks/aix_hacmp_resources b/checks/aix_hacmp_resources
index da125bb..61c7157 100644
--- a/checks/aix_hacmp_resources
+++ b/checks/aix_hacmp_resources
@@ -61,12 +61,10 @@ def check_aix_hacmp_resources(item, params, parsed):
resource_stats.append(resource_status)
infotext += "%s on node %s, " % (resource_status, node_name)
- if 'online' in resource_stats:
- state = 0
- else:
- state = 1
-
- if 'error' in resource_stats:
+ # The first node is always online in an OK scenario
+ # Something is wrong if an other node is online
+ state = 0
+ if resource_stats[0] != "online":
state = 2
return state, infotext[:-2]