Module: check_mk
Branch: master
Commit: 120af204bc0e40a48739cb233a98f87e1e057ab5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=120af204bc0e40…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Mon Dec 22 12:31:27 2014 +0100
#1460 df_netscaler: new check to monitor filesystem usage on Citrix Netscaler devices
---
.werks/1460 | 9 +++++++
ChangeLog | 3 ++-
checkman/df_netscaler | 26 +++++++++++++++++++
checks/df_netscaler | 67 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 104 insertions(+), 1 deletion(-)
diff --git a/.werks/1460 b/.werks/1460
new file mode 100644
index 0000000..779ebfb
--- /dev/null
+++ b/.werks/1460
@@ -0,0 +1,9 @@
+Title: df_netscaler: new check to monitor filesystem usage on Citrix Netscaler devices
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i1
+Date: 1419247854
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index d68dd15..8c0ae11 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,13 +10,14 @@
* 1207 services: Check can now be configured with additional names for matching...
* 1786 casa_cpu_mem, casa_cpu_temp, casa_cpu_util, casa_fan, casa_power: support more
devices, also C100G
* 1787 docsis_channels_upstream, docsis_channels_downstream: now also support CASA
100G
- * 1459 netscaler_cpu: new check to monitor the CPUs of Citrix Netscaler Appliances
* 1519 etherbox.temp: Now supports lower levels, output configurable to Celsius,
Fahrenheit or Kelvin...
NOTE: Please refer to the migration notes!
* 1520 hwg_temp: Now uses new temperature ruleset, allows lower levels and alternate
output units....
NOTE: Please refer to the migration notes!
* 1521 carel_sensors: Now uses new Temperature WATO-Rule...
NOTE: Please refer to the migration notes!
+ * 1459 netscaler_cpu: new check to monitor the CPUs of Citrix Netscaler Appliances
+ * 1460 df_netscaler: new check to monitor filesystem usage on Citrix Netscaler
devices
* 1457 FIX: logins: new check renamed from "users" check...
NOTE: Please refer to the migration notes!
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
diff --git a/checkman/df_netscaler b/checkman/df_netscaler
new file mode 100644
index 0000000..7925d2e
--- /dev/null
+++ b/checkman/df_netscaler
@@ -0,0 +1,26 @@
+title: Citrix Netscaler: Used Space in Filesystems
+agents: snmp
+catalog: app/netscaler
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the filesystem usage on Citrix Netscaler appliances.
+ It uses the {NS-ROOT-MIB} to access the filesystem data.
+
+ The check makes use of the general check framework of the {df} check. Please
+ refer to the man page of the {df} check for the detailed description of
+ the check and its numerous features.
+
+inventory:
+ All filesystems found will be inventorized except mount points listed
+ in {inventory_df_exclude_mountpoints} and filesystems with zero size.
+
+item:
+ The mount point of the filesystem on the netscaler device.
+
+perfdata:
+ See the man page of the {df} check
+
+[parameters]
+parameters (dict): See the man page of the {df} check
+
diff --git a/checks/df_netscaler b/checks/df_netscaler
new file mode 100644
index 0000000..14b3d5b
--- /dev/null
+++ b/checks/df_netscaler
@@ -0,0 +1,67 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2014 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:
+# .1.3.6.1.4.1.5951.4.1.1.41.8.1.1.4.47.118.97.114 "/var"
+# .1.3.6.1.4.1.5951.4.1.1.41.8.1.1.6.47.102.108.97.115.104 "/flash"
+# .1.3.6.1.4.1.5951.4.1.1.41.8.1.2.4.47.118.97.114 96133
+# .1.3.6.1.4.1.5951.4.1.1.41.8.1.2.6.47.102.108.97.115.104 7976
+# .1.3.6.1.4.1.5951.4.1.1.41.8.1.3.4.47.118.97.114 87418
+# .1.3.6.1.4.1.5951.4.1.1.41.8.1.3.6.47.102.108.97.115.104 7256
+
+factory_settings["filesystem_default_levels"] = {
+ "levels" : (90.0, 95.0)
+}
+
+def inventory_df_netscaler(info):
+ mplist = []
+ for mp, size_mb, avail_mb in info:
+ if int(size_mb) > 0 and mp not in inventory_df_exclude_mountpoints:
+ mplist.append(mp)
+ return df_inventory(mplist)
+
+def check_df_netscaler(item, params, info):
+ fslist = []
+ for mp, size_mb, avail_mb in info:
+ if "patterns" in params or item == mp:
+ fslist.append((mp, int(size_mb), int(avail_mb)))
+ return df_check_filesystem_list(item, params, fslist)
+
+check_info["df_netscaler"] = {
+ "check_function" : check_df_netscaler,
+ "inventory_function" : inventory_df_netscaler,
+ "default_levels_variable" : "filesystem_default_levels",
+ "service_description" : "Filesystem %s",
+ "has_perfdata" : True,
+ "group" : "filesystem",
+ "includes" : [ "df.include" ],
+ "snmp_info" : (".1.3.6.1.4.1.5951.4.1.1.41.8.1", [
+ 1, # sysHealthDiskName
+ 2, # sysHealthDiskSize
+ 3, # sysHealthDiskAvail
+ ]),
+ "snmp_scan_function" : lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.5951.1"),
+}