Module: check_mk
Branch: master
Commit: 97f3ea3acca6c09831fe6e1e64a2e3351621449d
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=97f3ea3acca6c0…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Mon Feb 3 14:59:25 2014 +0100
emcvnx_info: now reports information about Model an Revision correctly. It retrieves this information by an additional call of naviseccli with getagent option
---
agents/special/agent_emcvnx | 29 +++++++++++++++++++++++------
checkman/emcvnx_info | 8 ++++++++
web/plugins/wato/datasource_programs.py | 1 +
3 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/agents/special/agent_emcvnx b/agents/special/agent_emcvnx
index 887ba29..35e5e89 100755
--- a/agents/special/agent_emcvnx
+++ b/agents/special/agent_emcvnx
@@ -65,9 +65,9 @@ OPTIONS:
-i MODULES, --modules MODULES Modules to query. This is a comma separated list of
which may contain the keywords "disks", "hba", "hwstatus",
- "raidgroups" or "all" to define which information should
- be queried from the SP. You can define to use only view of
- them to optimize performance. The default is "all".
+ "raidgroups", "agent" or "all" to define which information
+ should be queried from the SP. You can define to use only
+ view of them to optimize performance. The default is "all".
""")
@@ -93,6 +93,7 @@ host_address = None
user = None
password = None
mortypes = [ 'all' ]
+fetch_agent_info = False
naviseccli_options = {
"disks" : {"cmd_option" : "-disk", "active" : False},
@@ -135,6 +136,7 @@ for module in naviseccli_options.keys():
try:
if mortypes.index("all") >= 0:
naviseccli_options[module]["active"] = True
+ fetch_agent_info = True
except ValueError:
pass
@@ -144,19 +146,24 @@ for module in naviseccli_options.keys():
except ValueError:
pass
+try:
+ if mortypes.index("agent") >= 0:
+ fetch_agent_info = True
+except ValueError:
+ pass
#############################################################################
# fetch information by calling naviseccli
#############################################################################
-basecmd="naviseccli -h %s -User %s -Password '%s' -Scope 0 getall " % (host_address, user, password)
+basecmd="naviseccli -h %s -User %s -Password '%s' -Scope 0 " % (host_address, user, password)
#
# check_mk section of agent output
#
print "<<<check_mk>>>"
-cmd=basecmd + "-sp"
+cmd=basecmd + "getall -sp"
if opt_debug:
sys.stderr.write("executing external command: %s\n" % cmd)
@@ -179,13 +186,23 @@ print "<<<emcvnx_info>>>"
for line in cmdout:
print line
+# if module "agent" was requested, fetch additional information about the
+# agent, e. g. Model and Revision
+if fetch_agent_info:
+ cmd=basecmd + "getagent"
+ if opt_debug:
+ sys.stderr.write("executing external command: %s\n" % cmd)
+
+ for line in os.popen(cmd).readlines():
+ print line,
+
#
# all other sections of agent output
#
for module in naviseccli_options.keys():
if naviseccli_options[module]["active"] == True:
print "<<<emcvnx_%s>>>" % module
- cmd=basecmd + naviseccli_options[module]["cmd_option"]
+ cmd=basecmd + "getall " + naviseccli_options[module]["cmd_option"]
if opt_debug:
sys.stderr.write("executing external command: %s\n" % cmd)
for line in os.popen(cmd).readlines():
diff --git a/checkman/emcvnx_info b/checkman/emcvnx_info
index d37855e..a85329c 100644
--- a/checkman/emcvnx_info
+++ b/checkman/emcvnx_info
@@ -12,5 +12,13 @@ description:
The information is retriefed by the special agent agent_emcvnx which uses
EMC's command line tool naviseccli.
+ The full information is only available if you did switch on the "Model and
+ Revsion" switch in the WATO rule "Check state of EMC VNX storage systems" or
+ did call the special agent (as datasource program) with --modules option
+ including "agent" module. If you are not interested in Model and Revision of
+ your Storage device you can switch this off and save one call of naviseccli in
+ every check interval. In this case the Check reports only the serial number
+ of the SP.
+
inventory:
Finds exactly one check on every EMC VNX storage system called EMC VNX Info
diff --git a/web/plugins/wato/datasource_programs.py b/web/plugins/wato/datasource_programs.py
index 60f39f5..9989cbc 100644
--- a/web/plugins/wato/datasource_programs.py
+++ b/web/plugins/wato/datasource_programs.py
@@ -193,6 +193,7 @@ register_rule(group,
( "hba", _("iSCSI HBAs") ),
( "hwstatus", _("Hardware Status") ),
( "raidgroups", _("RAID Groups") ),
+ ( "agent", _("Model and Revsion") ),
],
default_value = [ "disks", "hba", "hwstatus", ],
allow_empty = False,
Module: check_mk
Branch: master
Commit: 91fb977c212575e3e65b9a8108b1a1ad83855528
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=91fb977c212575…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Mon Feb 3 13:51:01 2014 +0100
emcvnx_raidgroups: did fail on very first check with an index out of range exception
---
checks/emcvnx_raidgroups | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/checks/emcvnx_raidgroups b/checks/emcvnx_raidgroups
index dffb854..6b559a9 100644
--- a/checks/emcvnx_raidgroups
+++ b/checks/emcvnx_raidgroups
@@ -201,7 +201,9 @@ def check_emcvnx_raidgroups_capacity(item, params, info):
# variable name in perfdata is not allowed to be just a number
# especially 0 does not work, so prefix it generally with "rg"
rc, message, perfdata = df_check_filesystem_list(item, params, fslist)
- perfdata[0] = ("rg" + perfdata[0][0], perfdata[0][1], perfdata[0][2], perfdata[0][3], perfdata[0][4], perfdata[0][5])
+ # note: on very first run perfdata is empty
+ if len(perfdata) > 0:
+ perfdata[0] = ("rg" + perfdata[0][0], perfdata[0][1], perfdata[0][2], perfdata[0][3], perfdata[0][4], perfdata[0][5])
return rc, message, perfdata
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])
Module: check_mk
Branch: master
Commit: fd5061788dac5c81451157133c0495d3623ba855
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fd5061788dac5c…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Jan 31 17:39:53 2014 +0100
Updated bug entries #0840
---
.bugs/840 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/.bugs/840 b/.bugs/840
new file mode 100644
index 0000000..de116e7
--- /dev/null
+++ b/.bugs/840
@@ -0,0 +1,9 @@
+Title: Wato condition show only the name of a tag but not the group
+Component: wato
+State: open
+Date: 2014-01-31 17:38:22
+Targetversion: 1.2.5i1
+Class: nastiness
+
+If you have multiple tags with the same title but in diffrent groups you cant see it in the
+condition colums from which tag group this tag is