Module: check_mk
Branch: master
Commit: 1ef673985fc395e31adcdfba253d5624128a6e04
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1ef673985fc395…
Author: Sven Rueß <sr(a)mathias-kettner.de>
Date: Mon May 22 14:44:28 2017 +0200
8289 FIX wagner_titanus_topsense.smoke: Adapted levels to be more user friendly
Adapted levels to be more user friendly:
<ul>
<li>ok: <= 3%</li>
<li>warn: > 3% and <= 5%</li>
<li>crit: > 5%</li>
</ul>
Change-Id: I878729592c10960f96a30bb41bbdb3f35d82cf47
---
.werks/8289 | 16 ++++++++++++++++
checkman/wagner_titanus_topsense.smoke | 2 +-
checks/wagner_titanus_topsense | 4 +++-
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/.werks/8289 b/.werks/8289
new file mode 100644
index 0000000..f87c514
--- /dev/null
+++ b/.werks/8289
@@ -0,0 +1,16 @@
+Title: wagner_titanus_topsense.smoke: Adapted levels to be more user friendly
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1495456395
+
+Adapted levels to be more user friendly:
+<ul>
+ <li>ok: <= 3%</li>
+ <li>warn: > 3% and <= 5%</li>
+ <li>crit: > 5%</li>
+</ul>
diff --git a/checkman/wagner_titanus_topsense.smoke
b/checkman/wagner_titanus_topsense.smoke
index 88e1adb..f23951a 100644
--- a/checkman/wagner_titanus_topsense.smoke
+++ b/checkman/wagner_titanus_topsense.smoke
@@ -6,7 +6,7 @@ distribution: check_mk
description:
Checks the Levels reported by Smoke Detectors of Wagner Titanus Top Sens devices.
- The check returns {OK} if the level is 0.000000 % and {CRIT} otherwise.
+ The check returns {CRIT} if the level is above 5.000000 %, {WARN} if the level is blow
5.000000 % and above 3.000000 %, {OK} otherwise.
inventory:
Creates two checks, one for every Smoke Detector.
diff --git a/checks/wagner_titanus_topsense b/checks/wagner_titanus_topsense
index c1b93cc..e835005 100644
--- a/checks/wagner_titanus_topsense
+++ b/checks/wagner_titanus_topsense
@@ -237,8 +237,10 @@ def check_wagner_titanus_topsense_smoke(item, _no_params, info):
return 3, "Smoke Detector %s not found in SNMP" % item
perfdata = [("smoke_perc", smoke_perc)]
- if smoke_perc > 0:
+ if smoke_perc > 5:
status = 2
+ elif smoke_perc > 3:
+ status = 1
else:
status = 0