Module: check_mk
Branch: master
Commit: 50c0c532a767001bfaced6e11554a8233105beb9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=50c0c532a76700…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Jul 31 12:03:24 2013 +0200
Added Skeleton for first EMC check
---
checks/emcvnx_hwstatus | 65 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/checks/emcvnx_hwstatus b/checks/emcvnx_hwstatus
new file mode 100644
index 0000000..7fcd13a
--- /dev/null
+++ b/checks/emcvnx_hwstatus
@@ -0,0 +1,65 @@
+#!/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.
+
+# Example output from agent:
+# <<<emcvnx_hwstatus>>>
+# DAE6S Bus 0 Enclosure 1
+# Enclosure Drive Type: SAS, NL SAS
+# Current Speed: 6Gbps
+# Maximum Speed: 6Gbps
+# Bus 0 Enclosure 1 Power A State: Present
+# Bus 0 Enclosure 1 Power B State: Present
+# Bus 0 Enclosure 1 LCC A State: Present
+# Bus 0 Enclosure 1 LCC B State: Present
+# Bus 0 Enclosure 1 LCC A Revision: 1.33
+# Bus 0 Enclosure 1 LCC B Revision: 1.33
+# Bus 0 Enclosure 1 LCC A Serial #: US1V2120601546
+# Bus 0 Enclosure 1 LCC B Serial #: US1V2120602428
+# Bus 0 Enclosure 1 LCC A Current Speed: 6Gbps
+# Bus 0 Enclosure 1 LCC B Current Speed: 6Gbps
+# Bus 0 Enclosure 1 LCC A Maximum Speed: 6Gbps
+# Bus 0 Enclosure 1 LCC B Maximum Speed: 6Gbps
+#
+# DAE6S Bus 1 Enclosure 0
+# Enclosure Drive Type: SAS, NL SAS
+# Current Speed: 6Gbps
+# Maximum Speed: 6Gbps
+# Bus 1 Enclosure 0 Power A State: Present
+
+
+
+
+def inventory_emcvnx_hwstatus(info):
+ return []
+
+def check_emcvnx_hwstatus(item, _no_params, info):
+ return 3, "Pech"
+
+check_info['emcvnx_hwstatus'] = {
+ "inventory_function" : inventory_emcvnx_hwstatus,
+ "check_function" : check_emcvnx_hwstatus,
+ "service_description" : "Enclosure %s", # Example for Item:
"0/1 Power A"
+}