Module: check_mk
Branch: master
Commit: 2a4e537b6a5489f3ed73602791c45a9d46b7a805
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2a4e537b6a5489…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Jun 12 18:04:05 2015 +0200
#2123 datapower_fs: new check to monitor filesystems on IBMs Datapower Gateways
---
.werks/2123 | 9 ++++++
ChangeLog | 1 +
checkman/datapower_fs | 19 +++++++++++++
checks/datapower_fs | 75 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 104 insertions(+)
diff --git a/.werks/2123 b/.werks/2123
new file mode 100644
index 0000000..0bc6a40
--- /dev/null
+++ b/.werks/2123
@@ -0,0 +1,9 @@
+Title: datapower_fs: new check to monitor filesystems on IBMs Datapower Gateways
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i2
+Date: 1434125006
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 3ab1d1b..b11cd35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,7 @@
* 2120 datapower_cpu, datapower_mem: new checks to monitor CPU and memory and IBMs
Datapower Gateways
* 2121 datapower_temp: new check to monitor temperature sensors of IBMs Datapower
Gateways
* 2122 datapower_fan: new check to monitor fan status of IBM Datapower Gateways
+ * 2123 datapower_fs: new check to monitor filesystems on IBMs Datapower Gateways
* 2323 FIX: df: Fix new graphs for all filesystem checks in case of existing inode
information
* 2305 FIX: agent_vsphere, esx_vsphere_sensors: now able to handle sensor names with
semicolon...
* 2118 FIX: aix_sap_processlist: agent plugin now is more general to deal with
various AIX versions...
diff --git a/checkman/datapower_fs b/checkman/datapower_fs
new file mode 100644
index 0000000..cf97088
--- /dev/null
+++ b/checkman/datapower_fs
@@ -0,0 +1,19 @@
+title: IBM Datapower Filesystems
+agents: snmp
+catalog: hw/network/ibm
+license: GPL
+distribution: check_mk
+description:
+
+ This check monitors the state of filesystems on IBMs Datapower Gateways
+ supporting the DATAPOWER-STATUS-MIB. It reports the filesystem utilization.
+
+ The usual limits for filesystem usage can be set and the state of a service
+ is determined from these limits.
+
+inventory:
+ One service is created for each of the four possible filesystems found.
+
+item:
+ There are four possible filesystems on a datapower network with the following
+ names: {Encrypted, Unencrypted, Internal, Temporary}.
diff --git a/checks/datapower_fs b/checks/datapower_fs
new file mode 100644
index 0000000..b52a42d
--- /dev/null
+++ b/checks/datapower_fs
@@ -0,0 +1,75 @@
+#!/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.
+
+def inventory_datapower_fs(info):
+ if info:
+ # only discover filesystems with a defined total size > 0
+ if saveint(info[0][0]) != 0:
+ yield "Encrypted", {}
+ if saveint(info[0][2]) != 0:
+ yield "Unencrypted", {}
+ if saveint(info[0][4]) != 0:
+ yield "Temporary", {}
+ if saveint(info[0][6]) != 0:
+ yield "Internal", {}
+
+def check_datapower_fs(item, params, info):
+ if item == "Encrypted":
+ i = 0
+ elif item == "Unencrypted":
+ i = 2
+ elif item == "Temporary":
+ i = 4
+ elif item == "Internal":
+ i = 6
+
+ avail_mb = float(info[0][i])
+ size_mb = float(info[0][i+1])
+ fslist = [(item, size_mb, avail_mb, 0)]
+
+ return df_check_filesystem_list(item, params, fslist)
+
+check_info["datapower_fs"] = {
+ "inventory_function" : inventory_datapower_fs,
+ "check_function" : check_datapower_fs,
+ "service_description" : "Filesystem %s",
+ "includes" : [ "df.include" ],
+ "group" : "filesystem",
+ "default_levels_variable" : "filesystem_default_levels",
+ "has_perfdata" : True,
+ "snmp_info" : ( ".1.3.6.1.4.1.14685.3.1.29", [
+ "1", #
dpStatusFilesystemStatusFreeEncrypted
+ "2", #
dpStatusFilesystemStatusTotalEncrypted
+ "3", #
dpStatusFilesystemStatusFreeUnencrypted
+ "4", #
dpStatusFilesystemStatusTotalUnencrypted
+ "5", #
dpStatusFilesystemStatusFreeTemporary
+ "6", #
dpStatusFilesystemStatusTotalTemporary
+ "7", # dpStatusFilesystemStatusFreeInternal
+ "8", #
dpStatusFilesystemStatusTotalInternal
+ ]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0")
== ".1.3.6.1.4.1.14685.1.7",
+}
+