Module: check_mk
Branch: master
Commit: b38b33e6ee9f70a598f0b2ccd7111f3c6c256af1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b38b33e6ee9f70…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Oct 21 13:54:32 2016 +0200
3830 netapp_api_luns: new check to monitor the filesystem usage of LUNs
---
.werks/3830 | 9 ++++
ChangeLog | 1 +
agents/special/agent_netapp | 16 +++++++
checkman/netapp_api_luns | 16 +++++++
web/plugins/wato/check_parameters.py | 81 ++++++++++++++++++++++++++++++++++++
5 files changed, 123 insertions(+)
diff --git a/.werks/3830 b/.werks/3830
new file mode 100644
index 0000000..3dec926
--- /dev/null
+++ b/.werks/3830
@@ -0,0 +1,9 @@
+Title: netapp_api_luns: new check to monitor the filesystem usage of LUNs
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.4.0i2
+Date: 1477050849
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 4fd63f8..e337c41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@
* 3945 fortigate_node: Memory on fortigate clusters are now configurable by WATO...
* 3956 fileinfo.groups: now allows regular expressions within include and exclude
patterns each beginning with a tilde
* 3947 mssql_blocked_sessions: thresholds for wait time can be set now...
+ * 3830 netapp_api_luns: new check to monitor the filesystem usage of LUNs
* 3894 FIX: mkeventd_status: Fixed bug in case Event Console is not running
* 3907 FIX: oracle_tablespaces: simplyfied free space calculation depending on
version...
* 3819 FIX: windows agent: fixed 2 bugs related to mrpe...
diff --git a/agents/special/agent_netapp b/agents/special/agent_netapp
index 23e0d1d..a615eff 100755
--- a/agents/special/agent_netapp
+++ b/agents/special/agent_netapp
@@ -926,6 +926,22 @@ try:
"aggr-space-attributes.size-total" : "size-total"})
+ # LUNs
+ luns = query("lun-get-iter")
+ if luns:
+ print "<<<netapp_api_luns:sep(9)>>>"
+ print format_config(luns, "lun", "path",
+ config_report = [
+ "size",
+ "size-used",
+ "path",
+ "online",
+ "read-only",
+ "vserver",
+ "volume"
+ ])
+
+
# Diagnosis status
diag_status = query("diagnosis-status-get")
if diag_status:
diff --git a/checkman/netapp_api_luns b/checkman/netapp_api_luns
new file mode 100644
index 0000000..fb0281a
--- /dev/null
+++ b/checkman/netapp_api_luns
@@ -0,0 +1,16 @@
+title: NetApp Filers: Used space of LUNs
+agents: netapp
+catalog: hw/storagehw/netapp
+license: GPL
+distribution: check_mk
+description:
+ This check measures the usage of LUNs of Netapp filers running in clustermode.
+ A WATO rule allows you to configure levels for each LUN. You can also configure that no
levels
+ should get checked, since some LUNs reported incorrect usage values
+
+item:
+ Name of the LUN as defined in the system
+
+inventory:
+ All LUNs are automatically inventorized.
+
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 44ba5e2..ca7c462 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -9973,6 +9973,87 @@ register_check_parameters(
)
register_check_parameters(
+ subgroup_storage,
+ "netapp_luns",
+ _("NetApp LUNs"),
+ Alternative(
+ elements = [
+ FixedValue(
+ title = _("Ignore used space"),
+ help = _("Some luns, e.g. jfs formatted, tend to report
incorrect used space values"),
+ label = _("Ignore used space"),
+ value = True,
+ totext = "",
+ ),
+ Dictionary(
+ title = _("Configure levels for used space"),
+ elements = [
+ ("levels",
+ Alternative(
+ title = _("Levels for LUN"),
+ show_alternative_title = True,
+ default_value = (80.0, 90.0),
+ match = match_dual_level_type,
+ elements = [
+ get_free_used_dynamic_valuespec("free",
"LUN"),
+ Transform(
+
get_free_used_dynamic_valuespec("used", "LUN", default_value = (20.0,
10.0)),
+ allow_empty = False,
+ forth = transform_filesystem_free,
+ back = transform_filesystem_free,
+ )
+ ]
+ )
+ ),
+ ( "trend_range",
+ Optional(
+ Integer(
+ title = _("Time Range for lun filesystem trend
computation"),
+ default_value = 24,
+ minvalue = 1,
+ unit= _("hours")),
+ title = _("Trend computation"),
+ label = _("Enable trend computation"))),
+ ( "trend_mb",
+ Tuple(
+ title = _("Levels on trends in MB per time range"),
+ elements = [
+ Integer(title = _("Warning at"), unit =
_("MB / range"), default_value = 100),
+ Integer(title = _("Critical at"), unit =
_("MB / range"), default_value = 200)
+ ])),
+ ( "trend_perc",
+ Tuple(
+ title = _("Levels for the percentual growth per time
range"),
+ elements = [
+ Percentage(title = _("Warning at"), unit =
_("% / range"), default_value = 5,),
+ Percentage(title = _("Critical at"), unit =
_("% / range"), default_value = 10,),
+ ])),
+ ( "trend_timeleft",
+ Tuple(
+ title = _("Levels on the time left until the lun
filesystem gets full"),
+ elements = [
+ Integer(title = _("Warning if below"), unit =
_("hours"), default_value = 12,),
+ Integer(title = _("Critical if below"), unit =
_("hours"), default_value = 6, ),
+ ])),
+ ( "trend_showtimeleft",
+ Checkbox( title = _("Display time left in check
output"), label = _("Enable"),
+ help = _("Normally, the time left until the
lun filesystem is full is only displayed when "
+ "the configured levels have been
breached. If you set this option "
+ "the check always reports this
information"))
+ ),
+ ( "trend_perfdata",
+ Checkbox(
+ title = _("Trend performance data"),
+ label = _("Enable generation of performance data from
trends"))),
+ ]
+ )
+ ]
+ ),
+ TextAscii(title = _("LUN name")),
+ match_type = "dict",
+)
+
+register_check_parameters(
subgroup_applications,
"services",
_("Windows Services"),