Module: check_mk
Branch: master
Commit: 43743bd6c1fe68a9179402e1d99bcd4efb740dbb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=43743bd6c1fe68…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 3 13:22:32 2013 +0200
Make levels for SMART temperature editable via WATO
Conflicts:
checks/smart
---
ChangeLog | 1 +
checks/smart | 16 +++++++---------
web/plugins/wato/check_parameters.py | 16 ++++++++++++++++
3 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 038d495..7eeaffe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -99,6 +99,7 @@
* Added mem section to Mac OSX agent (Thanks to Brad Davis)
* FIX: mssql.vbs (agent plugin) now sets auth options for each instance
* FIX: jolokia_metrics.mem: error when missing max values
+ * Make levels for SMART temperature editable via WATO
Multisite:
* FIX: fix localization in non-OMD environment
diff --git a/checks/smart b/checks/smart
index 69bdf55..bb0329a 100644
--- a/checks/smart
+++ b/checks/smart
@@ -145,12 +145,10 @@ def check_smart_temp(item, params, info):
return (0, "Temperature is %dC" % celsius, perfdata)
return (3, "Temperature_Celsius not found in agent output for disk %s" %
item)
-check_info["smart.temp"] = {'check_function': check_smart_temp,
- 'default_levels_variable': None,
- 'group': 'hw_temperature',
- 'has_perfdata': True,
- 'inventory_function': lambda info: inventory_smart("smart.temp",
info),
- 'node_info': False,
- 'service_description': 'Temperature SMART %s',
- 'snmp_info': None,
- 'snmp_scan_function': None}
+check_info["smart.temp"] = {
+ 'check_function': check_smart_temp,
+ 'inventory_function': lambda info:
inventory_smart("smart.temp", info),
+ 'service_description': 'Temperature SMART %s',
+ 'group': 'disk_temperature',
+ 'has_perfdata': True,
+}
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index ad9caad..13c357f 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -2417,6 +2417,22 @@ register_check_parameters(
register_check_parameters(
subgroup_environment,
+ "disk_temperature",
+ _("Harddisk temperature (e.g. via SMART)"),
+ Tuple(
+ help = _("Temperature levels for hard disks, that is determined e.g. via
SMART"),
+ elements = [
+ Integer(title = _("warning at"), unit = u"°C",
default_value = 35),
+ Integer(title = _("critical at"), unit = u"°C",
default_value = 40),
+ ]),
+ TextAscii(
+ title = _("Hard disk device"),
+ help = _("The identificator of the hard disk device, e.g.
<tt>sda</tt>.")),
+ "first"
+)
+
+register_check_parameters(
+ subgroup_environment,
"eaton_enviroment",
_("Temperature and Humidity for Eaton UPS"),
Dictionary(