Module: check_mk
Branch: master
Commit: 20f2df6deafadd1d977881a516a4ea0e04954011
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=20f2df6deafadd…
Author: Bernd Stroessenreuther <bs(a)mathias-kettner.de>
Date: Mon Jun 2 16:57:02 2014 +0200
fast_lta_volumes: new check of capacity of volumes in FAST LTA Storage Systems
Thanks to Christian Dewald / Agfa HealthCare for the donation.
---
.werks/961 | 8 ++++
ChangeLog | 1 +
checkman/fast_lta_volumes | 33 +++++++++++++++
checks/fast_lta_volumes | 60 +++++++++++++++++++++++++++
pnp-templates/check_mk-fast_lta_volumes.php | 1 +
web/plugins/perfometer/check_mk.py | 1 +
6 files changed, 104 insertions(+)
diff --git a/.werks/961 b/.werks/961
new file mode 100644
index 0000000..de6a2c1
--- /dev/null
+++ b/.werks/961
@@ -0,0 +1,8 @@
+Title: fast_lta_volumes: new check of capacity of volumes in FAST LTA Storage Systems
+Level: 1
+Component: checks
+Version: 1.2.5i3
+Date: 1401720926
+Class: feature
+
+Thanks to Christian Dewald / Agfa HealthCare for the donation.
diff --git a/ChangeLog b/ChangeLog
index 67b6c80..c0898b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -68,6 +68,7 @@
* 0165 ups checks now supports also GE devices (Thanks to Andy Taylor)...
* 0928 runas: new plugin script to include and execute mrpe, local and plugin scripts
as different user...
* 0929 windows agent: now able to include and execute additional local and plugin
scripts as different user...
+ * 0961 fast_lta_volumes: new check of capacity of volumes in 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_volumes b/checkman/fast_lta_volumes
new file mode 100644
index 0000000..265f2bb
--- /dev/null
+++ b/checkman/fast_lta_volumes
@@ -0,0 +1,33 @@
+title: FAST LTA Storage Systems: Capacity of Volumes
+agents: snmp
+catalog: hw/storagehw/fastlta
+license: GPL
+distribution: check_mk
+description:
+ Displays the total / used capacity for volumes of FAST LTA Storage Systems.
+
+ Returns {WARN} or {CRIT} if usage is above given levels.
+
+ It uses the check logic of the {df} check, so for configuration
+ parameters and examples please refer to the man page of {df}.
+
+item:
+ The volumeID as returned by SNMP.
+
+perfdata:
+ Three values: The first value is the used space. Also the minimum (0 MB), maximum
+ and the warning and critical levels in MB are provided.
+ The second is the change of the usage in MB per range since the last check
+ (e.g. in MB per 24 hours) and the 3rd is the averaged change (so called
+ trend), also in MB per range. Please note, that performance data for
+ trends is enabled per default. You can globally disable that in {main.mk}
+ with {filesystem_default_levels["trend_perfdata"] = False}.
+
+inventory:
+ Finds one check for each volume on a FAST LTA Storage System.
+
+[parameters]
+parameters (dict): See man page of {df}.
+
+[configuration]
+filesystem_default_levels: And other, see man page of {df}.
diff --git a/checks/fast_lta_volumes b/checks/fast_lta_volumes
new file mode 100644
index 0000000..2291f39
--- /dev/null
+++ b/checks/fast_lta_volumes
@@ -0,0 +1,60 @@
+#!/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_fast_lta_volumes(info):
+ inventory = []
+ for volname, volquota, volused in info:
+ inventory.append((volname, {}))
+ return inventory
+
+
+def check_fast_lta_volumes(item, params, info):
+ fslist = []
+ for volname, volquota, volused in info:
+ if volname == item:
+ fslist = []
+ size_mb = int(volquota) / 1048576.0
+ avail_mb = ( int(volquota) - int(volused) ) / 1048576.0
+ fslist.append((item, size_mb, avail_mb))
+ return df_check_filesystem_list(item, params, fslist)
+
+ return 3, "Volume %s not found" % item
+
+
+check_info["fast_lta_volumes"] = {
+ "check_function" : check_fast_lta_volumes,
+ "inventory_function" : inventory_fast_lta_volumes,
+ "service_description" : "Fast LTA Volume %s",
+ "has_perfdata" : True,
+ "group" : "filesystem",
+ "includes" : [ "df.include" ],
+ "snmp_info" : (".1.3.6.1.4.1.27417.5.1.1", [2, #
Volume name
+ 9, # Volume Quota
+ 11] # Volume used space
+ ),
+ "snmp_scan_function" : lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.8072.3.2.10"),
+}
+
diff --git a/pnp-templates/check_mk-fast_lta_volumes.php
b/pnp-templates/check_mk-fast_lta_volumes.php
new file mode 120000
index 0000000..aac1010
--- /dev/null
+++ b/pnp-templates/check_mk-fast_lta_volumes.php
@@ -0,0 +1 @@
+check_mk-hitachi_hnas_volume.php
\ No newline at end of file
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index eb8885a..8a7398a 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -118,6 +118,7 @@ perfometers["check_mk-emcvnx_raidgroups.capacity"] =
perfometer_check_mk_df
perfometers["check_mk-emcvnx_raidgroups.capacity_contiguous"] =
perfometer_check_mk_df
perfometers["check_mk-ibm_svc_mdiskgrp"] = perfometer_check_mk_df
perfometers["check_mk-fast_lta_silent_cubes.capacity"] =
perfometer_check_mk_df
+perfometers["check_mk-fast_lta_volumes"] = perfometer_check_mk_df
perfometers["check_mk-libelle_business_shadow.archive_dir"] =
perfometer_check_mk_df
def perfometer_esx_vsphere_datastores(row, check_command, perf_data):