Module: check_mk
Branch: master
Commit: dfc1bc39d772060ace4e165a5aa352d1b1516cd3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=dfc1bc39d77206…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Thu Nov 26 13:03:06 2015 +0100
new check emcvnx_writecache
---
checkman/emcvnx_writecache | 20 +++++++++++++++++
checks/emcvnx_writecache | 51 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+)
diff --git a/checkman/emcvnx_writecache b/checkman/emcvnx_writecache
new file mode 100644
index 0000000..95f5ff7
--- /dev/null
+++ b/checkman/emcvnx_writecache
@@ -0,0 +1,20 @@
+title: EMC VNX Storage: Write Cache State
+agents: emc
+catalog: hw/storagehw/emc
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the write cache state of storage processors of an
+ EMC VNX storage system.
+
+ The information is retrieved by the special agent agent_emcvnx which uses
+ EMC's command line tool naviseccli.
+
+ The state is OK, if the write cache state of a storage processor is enabled,
+ otherwise it will be CRIT.
+
+item:
+ The storage processor identifier.
+
+inventory:
+ One service per storage processor is created.
diff --git a/checks/emcvnx_writecache b/checks/emcvnx_writecache
new file mode 100644
index 0000000..99e2b8f
--- /dev/null
+++ b/checks/emcvnx_writecache
@@ -0,0 +1,51 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2015 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.
+
+# <<<emcvnx_writecache>>>
+# SPA Write Cache State Enabled
+# SPB Write Cache State Enabled
+
+
+def inventory_emcvnx_writecache(info):
+ return [ (line[0], None) for line in info ]
+
+
+def check_emcvnx_writecache(item, params, info):
+ map_state = {
+ "Enabled" : (0, "enabled"),
+ "Disabled" : (2, "disabled"),
+ }
+ for line in info:
+ if line[0] == item:
+ state, state_readable = map_state.get(line[-1], (3, "unknown"))
+ return state, "State: %s" % state_readable
+
+
+check_info['emcvnx_writecache'] = {
+ 'inventory_function' : inventory_emcvnx_writecache,
+ 'check_function' : check_emcvnx_writecache,
+ 'service_description' : 'Write Cache State %s',
+}