Module: check_mk
Branch: master
Commit: 7a15e9ad3b3ebb33d13ddcc1e5a2408a0185a957
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7a15e9ad3b3ebb…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Aug 24 12:56:36 2012 +0200
Added check netapp_cpu
---
ChangeLog | 1 +
checks/netapp_cpu | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e704d88..aa79d32 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
Checks & Agents:
* New Checks for Siemens Blades (BX600)
* New Checks for Fortigate Firewalls
+ * Netapp Checks for CPU Util an FC Port throughput
* FIX: megaraid_pdisks: handle case where no enclosure device exists
* FIX: megaraid_bbu: handle the controller's learn cycle. No errors in that period.
* mysql_capacity: cleaned up check, levels are in MB now
diff --git a/checks/netapp_cpu b/checks/netapp_cpu
new file mode 100644
index 0000000..db44042
--- /dev/null
+++ b/checks/netapp_cpu
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2012 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.
+
+netapp_cpu_default_levels = (80.0, 90.0)
+
+def check_netapp_cpu(item, params, info):
+ util = float(info[0][0])
+ infotext = " - %2.1f%% utilization" % util
+ warn, crit = params
+ perfdata = [("util", util, warn, crit, 0, 100)]
+ if util >= crit:
+ return (2, "CRIT" + infotext + " (critical at %d%%)" % crit, perfdata)
+ elif util >= warn:
+ return (1, "WARN" + infotext + " (warning at %d%%)" % warn, perfdata)
+ else:
+ return (0, "OK" + infotext, perfdata)
+
+check_info["netapp_cpu"] = {
+ "check_function" : check_netapp_cpu,
+ "inventory_function" : lambda info: [(None, "netapp_cpu_default_levels")],
+ "service_description" : "CPU utilization",
+ "has_perfdata" : True,
+ "group" : "cpu_utilization",
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.4.1.789.1.2.1.3.0"),
+ "snmp_info" : ( ".1.3.6.1.4.1.789.1.2.1", [ 3 ]),
+}
+