Module: check_mk
Branch: master
Commit: daa1d512c0f309fca3ef48080476d833a0d642a1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=daa1d512c0f309…
Author: Götz Golla <gg(a)mathias-kettner.de>
Date: Mon Jan 27 11:23:25 2014 +0100
FIX cmciii_lcp_airin, cmciii_lcp_airout, cmciii_lcp_waterin, cmciii_lcp_waterout: improved
handling of warning state
A unit state of warning no longer leads to a critical state of the check itself
---
.werks/575 | 8 ++++++++
ChangeLog | 1 +
checks/cmciii_lcp_airin | 10 ++++++----
checks/cmciii_lcp_airout | 10 ++++++----
checks/cmciii_lcp_waterin | 10 ++++++----
checks/cmciii_lcp_waterout | 10 ++++++----
6 files changed, 33 insertions(+), 16 deletions(-)
diff --git a/.werks/575 b/.werks/575
new file mode 100644
index 0000000..43fd5dc
--- /dev/null
+++ b/.werks/575
@@ -0,0 +1,8 @@
+Title: cmciii_lcp_airin, cmciii_lcp_airout, cmciii_lcp_waterin, cmciii_lcp_waterout:
improved handling of warning state
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1390818045
+Class: fix
+
+A unit state of warning no longer leads to a critical state of the check itself
diff --git a/ChangeLog b/ChangeLog
index 4277172..1838d2e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -145,6 +145,7 @@
* 0261 FIX: df_netapp32 / df_netapp: Fixed bug with negative size in check output...
* 0262 FIX: ps: Now able to skip disabled "Process Inventory" rules...
* 0264 FIX: printer_supply_ricoh: now reports correct filling levels...
+ * 0575 FIX: cmciii_lcp_airin, cmciii_lcp_airout, cmciii_lcp_waterin,
cmciii_lcp_waterout: improved handling of warning state...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/cmciii_lcp_airin b/checks/cmciii_lcp_airin
index 1f98955..e904885 100644
--- a/checks/cmciii_lcp_airin
+++ b/checks/cmciii_lcp_airin
@@ -39,10 +39,13 @@ def check_cmciii_lcp_airin(item, params, info):
temps = extract_temps(info[0][4:])
state = 0
+ sym = ""
if status.lower() != "ok" or unit_status.lower() != "ok":
- state = 2
- sym = ""
-
+ if status.lower() in ( "ok", "warning" ) and \
+ unit_status.lower() in ( "ok", "warning" ):
+ state = 1
+ else:
+ state = 2
if temps[4] < temps[0] or temps[4] > temps[3] :
state = 2
sym = "(!!)"
@@ -51,7 +54,6 @@ def check_cmciii_lcp_airin(item, params, info):
sym = "(!)"
else:
state = max(state, 0)
- sym = ""
info_text = "%s %s %s %s, Temp.Average: %.1f°C%s, Top/Mid/Bottom:
%.1f/%.1f/%.1f" % \
(unit_desc, unit_status, desc, status, temps[4], sym, temps[5],
temps[6], temps[7])
diff --git a/checks/cmciii_lcp_airout b/checks/cmciii_lcp_airout
index 041c16d..b657f15 100644
--- a/checks/cmciii_lcp_airout
+++ b/checks/cmciii_lcp_airout
@@ -39,10 +39,13 @@ def check_cmciii_lcp_airout(item, params, info):
temps = extract_temps(info[0][4:])
state = 0
+ sym = ""
if status.lower() != "ok" or unit_status.lower() != "ok":
- state = 2
- sym = ""
-
+ if status.lower() in ( "ok", "warning" ) and \
+ unit_status.lower() in ( "ok", "warning" ):
+ state = 1
+ else:
+ state = 2
if temps[4] < temps[0] or temps[4] > temps[3] :
state = 2
sym = "(!!)"
@@ -51,7 +54,6 @@ def check_cmciii_lcp_airout(item, params, info):
sym = "(!)"
else:
state = max(state, 0)
- sym = ""
info_text = "%s %s %s %s, Temp.Average: %.1f°C%s, Top/Mid/Bottom:
%.1f/%.1f/%.1f" % \
(unit_desc, unit_status, desc, status, temps[4], sym, temps[5],
temps[6], temps[7])
diff --git a/checks/cmciii_lcp_waterin b/checks/cmciii_lcp_waterin
index 009ef5d..632e933 100644
--- a/checks/cmciii_lcp_waterin
+++ b/checks/cmciii_lcp_waterin
@@ -42,10 +42,13 @@ def check_cmciii_lcp_waterin(item, params, info):
status = info[0][9]
state = 0
+ sym = ""
if status.lower() != "ok" or unit_status.lower() != "ok":
- state = 2
- sym = ""
-
+ if status.lower() in ( "ok", "warning" ) and \
+ unit_status.lower() in ( "ok", "warning" ):
+ state = 1
+ else:
+ state = 2
if temp < limits[3] or temp > limits[0] :
state = 2
sym = "(!!)"
@@ -54,7 +57,6 @@ def check_cmciii_lcp_waterin(item, params, info):
sym = "(!)"
else:
state = max(state, 0)
- sym = ""
info_text = "%s %s, %s %s, Temperature: %.1f°C%s" \
% (unit_desc, unit_status, desc, status, temp, sym)
diff --git a/checks/cmciii_lcp_waterout b/checks/cmciii_lcp_waterout
index fa3ef91..4f3b213 100644
--- a/checks/cmciii_lcp_waterout
+++ b/checks/cmciii_lcp_waterout
@@ -42,10 +42,13 @@ def check_cmciii_lcp_waterout(item, params, info):
status = info[0][9]
state = 0
+ sym = ""
if status.lower() != "ok" or unit_status.lower() != "ok":
- state = 2
- sym = ""
-
+ if status.lower() in ( "ok", "warning" ) and \
+ unit_status.lower() in ( "ok", "warning" ):
+ state = 1
+ else:
+ state = 2
if temp < limits[3] or temp > limits[0] :
state = 2
sym = "(!!)"
@@ -54,7 +57,6 @@ def check_cmciii_lcp_waterout(item, params, info):
sym = "(!)"
else:
state = max(state, 0)
- sym = ""
info_text = "%s %s, %s %s, Temperature: %.1f°C%s" \
% (unit_desc, unit_status, desc, status, temp, sym)