Module: check_mk
Branch: master
Commit: c915874b4f763e9086f52b7663918b33c3a4eb50
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c915874b4f763e…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Mon Feb 3 12:26:56 2014 +0100
emc_isilon_iops: New check for Disk Operations per Second (IOPS) in EMC Isilon Storage
---
.werks/699 | 8 +++++
ChangeLog | 3 +-
checkman/emc_isilon_iops | 20 +++++++++++
checks/emc_isilon_iops | 52 ++++++++++++++++++++++++++++
pnp-templates/check_mk-emc_isilon_iops.php | 48 +++++++++++++++++++++++++
web/plugins/perfometer/check_mk.py | 6 ++++
6 files changed, 136 insertions(+), 1 deletion(-)
diff --git a/.werks/699 b/.werks/699
new file mode 100644
index 0000000..c114b5a
--- /dev/null
+++ b/.werks/699
@@ -0,0 +1,8 @@
+Title: emc_isilon_iops: New check for Disk Operations per Second (IOPS) in EMC Isilon Storage
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1391426800
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 82d997e..5e0ecc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -78,6 +78,7 @@
* 0576 fileinfo.groups: new feature to include current date in file pattern
* 0130 Support of new Firmware version of various Fujitsu Sotarge Systems
* 0698 emc_isilon.nodehealth: new check for EMC Isilon Storage systems: NodeHealth
+ * 0699 emc_isilon_iops: New check for Disk Operations per Second (IOPS) in EMC Isilon Storage
* 0103 FIX: services: Fixed bug with service inventory defined in main.mk...
* 0299 FIX: borcade_mlx_fan: Prettified output, handling "other" state now
* 0300 FIX: cisco_fru_power: Trying not to inventorize not plugged in FRUs...
@@ -149,8 +150,8 @@
* 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...
- * 0577 FIX: fileinfo.groups: new date pattern is now available for inventory check as well
* 0272 FIX: if checks: port type 56 (fibrechannel) is no longer inventorized per default...
+ * 0577 FIX: fileinfo.groups: new date pattern is now available for inventory check as well
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checkman/emc_isilon_iops b/checkman/emc_isilon_iops
new file mode 100644
index 0000000..894bdc6
--- /dev/null
+++ b/checkman/emc_isilon_iops
@@ -0,0 +1,20 @@
+title: EMC Isilon: Disk Operations per Second (IOPS)
+agents: snmp
+catalog: hw/storagehw/emc
+license: GPL
+distribution: check_mk
+description:
+ Reports the Disk Operations per Second (IOPS) of Disks in EMC Isilon
+ Storage Systems.
+
+ This check always returns {OK}
+
+item:
+ The diskPerfDeviceName as reported by SNMP, e. g. "bay 4"
+
+perfdata:
+ One value: The number of IOPS.
+
+inventory:
+ Finds exactly one service per disk in an EMC Isilon Storage.
+
diff --git a/checks/emc_isilon_iops b/checks/emc_isilon_iops
new file mode 100644
index 0000000..e6d7906
--- /dev/null
+++ b/checks/emc_isilon_iops
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+def inventory_emc_isilon_iops(info):
+ inventory = []
+ for name, iops in info:
+ inventory.append( (name, None) )
+ return inventory
+
+def check_emc_isilon_iops(item, _no_params, info):
+ for name, iops in info:
+ if name == item:
+ perfdata = [ ("iops", iops) ]
+ message = "%s disk operations per second" % int(iops)
+ return 0, message, perfdata
+ return 3, "Disk not found"
+
+check_info["emc_isilon_iops"] = {
+ "check_function" : check_emc_isilon_iops,
+ "inventory_function" : inventory_emc_isilon_iops,
+ "service_description" : "Disk %s IO",
+ "has_perfdata" : True,
+ "snmp_info" : (".1.3.6.1.4.1.12124.2.2.52.1",
+ [ 2, # diskPerfDeviceName
+ 3, # diskPerfOpsPerSecond
+ ]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.12124.1")
+}
+
diff --git a/pnp-templates/check_mk-emc_isilon_iops.php b/pnp-templates/check_mk-emc_isilon_iops.php
new file mode 100644
index 0000000..0b838e6
--- /dev/null
+++ b/pnp-templates/check_mk-emc_isilon_iops.php
@@ -0,0 +1,48 @@
+<?php
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2013 mk(a)mathias-kettner.de |
+# +------------------------------------------------------------------+
+#
+# This file is part of Check_MK.
+# The official homepage is at http://mathias-kettner.de/check_mk.
+#
+# check_mk is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation in version 2. check_mk is distributed
+# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
+# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more de-
+# ails. You should have received a copy of the GNU General Public
+# License along with GNU Make; see the file COPYING. If not, write
+# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+# Boston, MA 02110-1301 USA.
+
+// Make data sources available via names
+$RRD = array();
+foreach ($NAME as $i => $n) {
+ $RRD[$n] = "$RRDFILE[$i]:$DS[$i]:MAX";
+ $WARN[$n] = $WARN[$i];
+ $CRIT[$n] = $CRIT[$i];
+ $MIN[$n] = $MIN[$i];
+ $MAX[$n] = $MAX[$i];
+}
+
+$servicedesc = str_replace("_", " ", $servicedesc);
+
+$opt[1] = "--vertical-label 'operations/s' -X0 --title \"$hostname / $servicedesc\" ";
+
+$def[1] =
+ "HRULE:0#a0a0a0 ".
+ "DEF:read_blocks=$RRD[iops] ".
+ "AREA:read_blocks#40c080:\"operations per second \" ".
+ "GPRINT:read_blocks:LAST:\"%8.0lf last\" ".
+ "GPRINT:read_blocks:AVERAGE:\"%6.0lf avg\" ".
+ "GPRINT:read_blocks:MAX:\"%6.0lf max\\n\" ";
+?>
+
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 55cc931..320fcb2 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -528,6 +528,12 @@ def perfometer_check_mk_hba(row, check_command, perf_data):
read_blocks, "#30d050", write_blocks, "#0060c0", 100000, 2)
perfometers["check_mk-emcvnx_hba"] = perfometer_check_mk_hba
+def perfometer_check_mk_iops(row, check_command, perf_data):
+ iops = int(perf_data[0][1])
+ text = "%d/s" % iops
+
+ return text, perfometer_logarithmic(iops, 100000, 2, "#30d050")
+perfometers["check_mk-emc_isilon_iops"] = perfometer_check_mk_iops
def perfometer_check_mk_printer_supply(row, check_command, perf_data):
left = savefloat(perf_data[0][1])