Module: check_mk
Branch: master
Commit: efea3bda30ae6a44b95eda6a68c6ca9ec74a95bb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=efea3bda30ae6a…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Tue May 20 15:44:53 2014 +0200
fast_lta_headunit.status, fast_lta_headunit.replication: New checks for FAST LTA Storage
Systems
---
.werks/956 | 8 ++
ChangeLog | 1 +
checkman/fast_lta_headunit.replication | 14 ++++
checkman/fast_lta_headunit.status | 11 +++
checks/fast_lta_headunit | 131 ++++++++++++++++++++++++++++++++
modules/catalog.py | 1 +
6 files changed, 166 insertions(+)
diff --git a/.werks/956 b/.werks/956
new file mode 100644
index 0000000..d7b41b1
--- /dev/null
+++ b/.werks/956
@@ -0,0 +1,8 @@
+Title: fast_lta_headunit.status, fast_lta_headunit.replication: New checks for FAST LTA
Storage Systems
+Level: 2
+Component: checks
+Version: 1.2.5i3
+Date: 1400593435
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 0a95a0c..ee50dda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -50,6 +50,7 @@
* 0955 zfs_arc_cache, zfs_arc_cache.l2: New Checks for Hit Ratios and Sizes of ZFS
arc Cache
* 0162 if_brocade: New if64 Check version for Brocade VDX Switches...
NOTE: Please refer to the migration notes!
+ * 0956 fast_lta_headunit.status, fast_lta_headunit.replication: New checks for FAST
LTA Storage Systems
* 0777 FIX: special agent emcvnx: did not work with security file authentication...
* 0786 FIX: zfsget: fixed compatibility with older Solaris agents...
* 0809 FIX: brocade_fcport: Fixed recently introduced problem with port speed
detection
diff --git a/checkman/fast_lta_headunit.replication
b/checkman/fast_lta_headunit.replication
new file mode 100644
index 0000000..da14a96
--- /dev/null
+++ b/checkman/fast_lta_headunit.replication
@@ -0,0 +1,14 @@
+title: FAST LTA Storage Systems: Replication Status and Mode
+agents: snmp
+catalog: hw/storagehw/fastlta
+license: GPL
+distribution: check_mk
+description:
+ Checks if the Replication between Head Units is running on FAST LTA Storage
+ System. Returns {OK} if running and {CRIT} if not.
+
+ The replication mode (master, slave or standalone) is displayed only.
+ It does not trigger a status change of the check.
+
+inventory:
+ Finds exactly one check on every system (head unit).
diff --git a/checkman/fast_lta_headunit.status b/checkman/fast_lta_headunit.status
new file mode 100644
index 0000000..da52791
--- /dev/null
+++ b/checkman/fast_lta_headunit.status
@@ -0,0 +1,11 @@
+title: FAST LTA Storage Systems: Head Unit Status
+agents: snmp
+catalog: hw/storagehw/fastlta
+license: GPL
+distribution: check_mk
+description:
+ Checks the Head Unit Status of a FAST LTA Storage System.
+ Returns {OK} on status {appReady} and {CRIT} on every other.
+
+inventory:
+ Finds exactly one check on every system (head unit).
diff --git a/checks/fast_lta_headunit b/checks/fast_lta_headunit
new file mode 100644
index 0000000..2e44e81
--- /dev/null
+++ b/checks/fast_lta_headunit
@@ -0,0 +1,131 @@
+#!/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.
+
+fast_lta_headunit_info = [(".1.3.6.1.4.1.27417.2", [1, # headUnitStatus
+ 2, # replicationMode
+ 5] # replicationRunning
+ )]
+
+def fast_lta_headunit_scan(oid):
+ return
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.8072.3.2.10")
+
+# .--status--------------------------------------------------------------.
+# | _ _ |
+# | ___| |_ __ _| |_ _ _ ___ |
+# | / __| __/ _` | __| | | / __| |
+# | \__ \ || (_| | |_| |_| \__ \ |
+# | |___/\__\__,_|\__|\__,_|___/ |
+# | |
+# '----------------------------------------------------------------------'
+
+def inventory_fast_lta_headunit_status(info):
+ return [ (None, None) ]
+
+def check_fast_lta_headunit_status(item, _no_params, info):
+ head_unit_status_map = {
+ "-1": "workerDefect",
+ "-2": "workerNotStarted",
+ "2" : "workerBooting",
+ "3" : "workerRfRRunning",
+ "10": "appBooting",
+ "20": "appNoCubes",
+ "30": "appVirginCubes",
+ "40": "appRfrPossible",
+ "45": "appRfrMixedCubes",
+ "50": "appRfrActive",
+ "60": "appReady",
+ "65": "appMixedCubes",
+ "70": "appReadOnly",
+ "75": "appEnterpriseCubes",
+ "80": "appEnterpriseMixedCubes",
+ }
+
+ if info[0][0][0] == "60":
+ status = 0
+ else:
+ status = 2
+
+ if info[0][0][0] in head_unit_status_map.keys():
+ message = "Head Unit status is %s." %
head_unit_status_map[info[0][0][0]]
+ else:
+ message = "Head Unit status is %s." % info[0][0][0]
+
+ return status, message
+
+check_info["fast_lta_headunit.status"] = {
+ "check_function" : check_fast_lta_headunit_status,
+ "inventory_function" : inventory_fast_lta_headunit_status,
+ "service_description" : "Fast LTA Headunit Status",
+ "has_perfdata" : False,
+ "snmp_info" : fast_lta_headunit_info,
+ "snmp_scan_function" : fast_lta_headunit_scan
+}
+
+#.
+# .--replication---------------------------------------------------------.
+# | _ _ _ _ |
+# | _ __ ___ _ __ | (_) ___ __ _| |_(_) ___ _ __ |
+# | | '__/ _ \ '_ \| | |/ __/ _` | __| |/ _ \| '_ \ |
+# | | | | __/ |_) | | | (_| (_| | |_| | (_) | | | | |
+# | |_| \___| .__/|_|_|\___\__,_|\__|_|\___/|_| |_| |
+# | |_| |
+# '----------------------------------------------------------------------'
+
+def inventory_fast_lta_headunit_replication(info):
+ return [ (None, None) ]
+
+def check_fast_lta_headunit_replication(item, _no_params, info):
+ head_unit_replication_map = {
+ "0" : "Slave",
+ "1" : "Master",
+ "255" : "standalone",
+ }
+
+ if info[0][0][2] == "1":
+ message = "Replication is running."
+ status = 0
+ else:
+ message = "Replication is not running (!!)."
+ status = 2
+
+ if info[0][0][1] in head_unit_replication_map.keys():
+ message += " This node is %s." \
+ % head_unit_replication_map[info[0][0][1]]
+ else:
+ message += " Replication mode of this node is %s." % info[0][0][1]
+
+ return status, message
+
+check_info["fast_lta_headunit.replication"] = {
+ "check_function" : check_fast_lta_headunit_replication,
+ "inventory_function" : inventory_fast_lta_headunit_replication,
+ "service_description" : "Fast LTA Replication",
+ "has_perfdata" : False,
+ "snmp_info" : fast_lta_headunit_info,
+ "snmp_scan_function" : fast_lta_headunit_scan
+}
+
+#.
diff --git a/modules/catalog.py b/modules/catalog.py
index d6b23e7..c1231b7 100644
--- a/modules/catalog.py
+++ b/modules/catalog.py
@@ -46,6 +46,7 @@ manpage_catalog_titles = {
"ibm" : "IBM",
"storagehw" : "Storage (filers, SAN, tape libs)",
"brocade" : "Brocade",
+ "fastlta" : "FAST LTA",
"fujitsu" : "Fujitsu",
"mcdata" : "McDATA",
"netapp" : "NetApp",