Module: check_mk
Branch: master
Commit: 31f923b3b18214caac8a02238af239d6f3054987
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=31f923b3b18214…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon May 2 18:43:55 2016 +0200
3431 netextreme_cpu_util: new check which monitors the CPU utilization of a Extreme
Networks Switch which supports the EXTREME-MIB
---
.werks/3431 | 9 +++++++
ChangeLog | 1 +
checkman/netextreme_cpu_util | 16 ++++++++++++
checks/netextreme_cpu_util | 55 ++++++++++++++++++++++++++++++++++++++++++
4 files changed, 81 insertions(+)
diff --git a/.werks/3431 b/.werks/3431
new file mode 100644
index 0000000..d61fc65
--- /dev/null
+++ b/.werks/3431
@@ -0,0 +1,9 @@
+Title: netextreme_cpu_util: new check which monitors the CPU utilization of a Extreme
Networks Switch which supports the EXTREME-MIB
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.9i1
+Date: 1462207393
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 3c8e1d0..1a85e67 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -74,6 +74,7 @@
* 3445 mssql_versions: With up-to-date agent plugin it is now writing out the used
edition
* 3446 mssql_version: Outputs info about cluster state and cluster name
* 3128 mem.win: graphs now display the available memory
+ * 3431 netextreme_cpu_util: new check which monitors the CPU utilization of a Extreme
Networks Switch which supports the EXTREME-MIB
* 3073 FIX: windows agent: relative paths to mrpe scripts are now treated as relative
to the agent installation directory...
* 3061 FIX: mk_jolokia: Fixed debugging of the agent plugin
* 3074 FIX: windows agent: fixed incorrect values for 32-bit performance counters
diff --git a/checkman/netextreme_cpu_util b/checkman/netextreme_cpu_util
new file mode 100644
index 0000000..8f52237
--- /dev/null
+++ b/checkman/netextreme_cpu_util
@@ -0,0 +1,16 @@
+title: Extreme Networks Switch: CPU utilization
+agents: snmp
+catalog: hw/other
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the CPU utilization of a Extreme Networks Switch
+ which supports the EXTREME-MIB.
+
+ Default levels are 80, 90 percent. These are configurable.
+
+perfdata:
+ The CPU utilization.
+
+inventory:
+ One service is created.
diff --git a/checks/netextreme_cpu_util b/checks/netextreme_cpu_util
new file mode 100644
index 0000000..1655acc
--- /dev/null
+++ b/checks/netextreme_cpu_util
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+# -*- encoding: utf-8; py-indent-offset: 4 -*-
+# +------------------------------------------------------------------+
+# | ____ _ _ __ __ _ __ |
+# | / ___| |__ ___ ___| | __ | \/ | |/ / |
+# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
+# | | |___| | | | __/ (__| < | | | | . \ |
+# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
+# | |
+# | Copyright Mathias Kettner 2016 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-
+# tails. 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.
+
+
+# .1.3.6.1.4.1.1916.1.32.1.2.0 59 -->
EXTREME-SOFTWARE-MONITOR-MIB::extremeCpuMonitorTotalUtilization.0$
+
+
+# As in some other checks
+netextreme_cpu_util_default_levels = (80.0, 90.0)
+
+
+def inventory_netextreme_cpu_util(info):
+ if info:
+ return [ (None, "netextreme_cpu_util_default_levels") ]
+
+
+def check_netextreme_cpu_util(_no_item, params, info):
+ return check_cpu_util(float(info[0][0]), params)
+
+
+check_info['netextreme_cpu_util'] = {
+ 'inventory_function' : inventory_netextreme_cpu_util,
+ 'check_function' : check_netextreme_cpu_util,
+ 'service_description' : 'CPU utilization',
+ 'snmp_info' : (".1.3.6.1.4.1.1916.1.32.1.2", [
+ "0", #
EXTREME-SOFTWARE-MONITOR-MIB::extremeCpuMonitorTotalUtilization
+ ]),
+ 'snmp_scan_function' : lambda oid:
oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.1916.2"),
+ 'has_perfdata' : True,
+ 'includes' : [ 'cpu_util.include' ],
+ 'group' : 'cpu_utilization',
+}