Changed default thresholds to WARN on the first broken disk, CRIT on 50%
Message-ID: <5512a1fb.eDGTW+6a0KC3+qmY%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: d83e023eeabb4a73f199d58123c85231517f0a67
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d83e023eeabb4a…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Mar 25 12:54:30 2015 +0100
#2159 FIX netapp_api_disk.summary: Changed default thresholds to WARN on the first broken
disk, CRIT on 50%
The thresholds are configured using percentage levels on the broken to spare disk ratio.
Previous versions of the check simply did not apply levels on the number of broken disks
except you configured the ratio. We have added a default ratio of 1% for WARN and 50% for
CRIT.
---
.werks/2159 | 13 +++++++++++++
ChangeLog | 1 +
checks/netapp_api_disk | 6 +++---
web/plugins/wato/check_parameters.py | 4 ++--
4 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/.werks/2159 b/.werks/2159
new file mode 100644
index 0000000..8bab418
--- /dev/null
+++ b/.werks/2159
@@ -0,0 +1,13 @@
+Title: netapp_api_disk.summary: Changed default thresholds to WARN on the first broken
disk, CRIT on 50%
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1427284350
+
+The thresholds are configured using percentage levels on the broken to spare disk ratio.
+Previous versions of the check simply did not apply levels on the number of broken disks
+except you configured the ratio. We have added a default ratio of 1% for WARN and 50%
for
+CRIT.
diff --git a/ChangeLog b/ChangeLog
index d3db00f..d661268 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -280,6 +280,7 @@
* 1896 FIX: ups_socomec_capacity: Now no longer critical when device reports -1
minutes left on battery...
* 1238 FIX: check_mk_agent.linux: Do not execute the multipath section if no
/etc/multipath.conf exsist.
* 1240 FIX: multipath: improved detection for not installed multipath
+ * 2159 FIX: netapp_api_disk.summary: Changed default thresholds to WARN on the first
broken disk, CRIT on 50%...
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request,
added mailto link for error report...
diff --git a/checks/netapp_api_disk b/checks/netapp_api_disk
index 19b154a..a7001e5 100644
--- a/checks/netapp_api_disk
+++ b/checks/netapp_api_disk
@@ -113,8 +113,8 @@ def check_netapp_api_disk_summary(_no_item, params, info):
else:
yield 0, "%s: %s" % (text, len(disks))
- if params.get("broken_spare_ratio") and len(broken_disks):
- warn, crit = params["broken_spare_ratio"]
+ if broken_disks:
+ warn, crit = params.get("broken_spare_ratio", (1.0, 50.0))
ratio = float(len(broken_disks)) / (len(broken_disks) + spare_count) * 100
state = 0
if ratio >= crit:
@@ -122,7 +122,7 @@ def check_netapp_api_disk_summary(_no_item, params, info):
elif ratio >= warn:
state = 1
if state:
- yield state, "Too much broken disks (levels at %.1f%%/%.1f%%)" %
(warn, crit)
+ yield state, "Too many broken disks (levels at %.1f%%/%.1f%%)" %
(warn, crit)
check_info["netapp_api_disk.summary"] = {
'check_function' : check_netapp_api_disk_summary,
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 1da968f..1c3afa8 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -5592,8 +5592,8 @@ register_check_parameters(
Tuple(
title = _("Broken to spare ratio"),
elements = [
- Percentage(title = _("Warning at or above")),
- Percentage(title = _("Critical at or above")),
+ Percentage(title = _("Warning at or above"), default_value
= 1.0),
+ Percentage(title = _("Critical at or above"), default_value
= 50.0),
]
)),
],