Module: check_mk
Branch: master
Commit: a4980d8765b9960ecda7183253adaeda31dfefee
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a4980d8765b996…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Thu Jun 11 18:11:44 2015 +0200
#2120 datapower_cpu, datapower_mem: new checks to monitor CPU and memory and IBMs
Datapower Gateways
---
.werks/2120 | 9 ++++++++
ChangeLog | 1 +
checkman/datapower_cpu | 19 ++++++++++++++++
checkman/datapower_mem | 19 ++++++++++++++++
checks/datapower_cpu | 52 +++++++++++++++++++++++++++++++++++++++++++
checks/datapower_mem | 58 ++++++++++++++++++++++++++++++++++++++++++++++++
modules/catalog.py | 1 +
7 files changed, 159 insertions(+)
diff --git a/.werks/2120 b/.werks/2120
new file mode 100644
index 0000000..d65b095
--- /dev/null
+++ b/.werks/2120
@@ -0,0 +1,9 @@
+Title: datapower_cpu, datapower_mem: new checks to monitor CPU and memory and IBMs
Datapower Gateways
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i2
+Date: 1434039054
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 19a7dc1..a22d01f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,7 @@
* 2308 agent_vsphere, esx_vsphere_sensors: now reports additional sensor information
(cpu, storage controller, memory)...
* 2327 mbg_lantime_ng_state, mbg_lantime_state: change default parameters to 2/3 for
stratum, 10/20us for offset
* 2220 pfsense_counter: New check to monitor several global packet rates on pfSense
firewalls
+ * 2120 datapower_cpu, datapower_mem: new checks to monitor CPU and memory and 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_cpu b/checkman/datapower_cpu
new file mode 100644
index 0000000..c21542f
--- /dev/null
+++ b/checkman/datapower_cpu
@@ -0,0 +1,19 @@
+title: IBM Datapower CPU Utilization
+agents: snmp
+catalog: hw/network/ibm
+license: GPL
+distribution: check_mk
+description:
+
+ This check monitors the CPU utilization on IBMs Datapower Gateways
+ supporting the DATAPOWER-STATUS-MIB. The check reads the percentage of
+ CPU utilization.
+
+ The check will result in a WARNING/CRITICAL state when the given thresholds
+ for the CPU utilization are reached.
+
+perfdata:
+ One variable: the current CPU utilization in percent
+
+inventory:
+ On each gateway one service is created.
diff --git a/checkman/datapower_mem b/checkman/datapower_mem
new file mode 100644
index 0000000..740e376
--- /dev/null
+++ b/checkman/datapower_mem
@@ -0,0 +1,19 @@
+title: IBM Datapower Memory Usage
+agents: snmp
+catalog: hw/network/ibm
+license: GPL
+distribution: check_mk
+description:
+
+ This check monitors the memory usage of IBMs Datapower Gateways
+ supporting the DATAPOWER-STATUS-MIB. The check reads the used and total
+ amount of memory and computes the used percentage.
+
+ The check will result in a WARNING/CRITICAL state when the given thresholds
+ for the used memory in percent are reached.
+
+perfdata:
+ One variable: the current memory usage in percent
+
+inventory:
+ On each gateway one service is created.
diff --git a/checks/datapower_cpu b/checks/datapower_cpu
new file mode 100644
index 0000000..44b9599
--- /dev/null
+++ b/checks/datapower_cpu
@@ -0,0 +1,52 @@
+#!/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.
+
+factory_settings["datapower_cpu_default_levels"] = {
+ "levels" : (80, 90),
+}
+
+def inventory_datapower_cpu(info):
+ if info:
+ return [ (None, {}) ]
+
+def check_datapower_cpu(_no_item, params, info):
+ util = int(info[0][0])
+ return check_cpu_util(util, params)
+
+
+check_info['datapower_cpu'] = {
+ "inventory_function" : inventory_datapower_cpu,
+ "check_function" : check_datapower_cpu,
+ "service_description" : "CPU Utilization",
+ "snmp_info" : ( ".1.3.6.1.4.1.14685.3.1.14", [
+ "2", # dpStatusCPUUsageoneMinute
+ ]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0")
== ".1.3.6.1.4.1.14685.1.7",
+ "includes" : [ "cpu_util.include" ],
+ "group" : "cpu_utilization",
+ "default_levels_variable" : "datapower_cpu_default_levels",
+ "has_perfdata" : True,
+}
diff --git a/checks/datapower_mem b/checks/datapower_mem
new file mode 100644
index 0000000..3f27ac3
--- /dev/null
+++ b/checks/datapower_mem
@@ -0,0 +1,58 @@
+#!/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.
+
+factory_settings["datapower_mem_default_levels"] = {
+ "levels" : ("perc_used", (80.0, 90.0))
+}
+
+def inventory_datapower_mem(info):
+ if info:
+ return [ ("", {}) ]
+
+def check_datapower_mem(_no_item, params, info):
+
+ mem_total_kb = int(info[0][0])
+ mem_used_kb = int(info[0][1])
+
+ return check_memory_simple(mem_used_kb, mem_total_kb, params)
+
+
+check_info['datapower_mem'] = {
+ "inventory_function" : inventory_datapower_mem,
+ "check_function" : check_datapower_mem,
+ "service_description" : "Memory",
+ "snmp_info" : ( ".1.3.6.1.4.1.14685.3.1.5", [
+ "2", # dpStatusMemoryStatusTotalMemory
+ "3", # dpStatusMemoryStatusUsedMemory
+ ]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0")
== ".1.3.6.1.4.1.14685.1.7",
+ "includes" : [ "mem.include" ],
+ "group" : "memory_simple",
+ "default_levels_variable" : "datapower_mem_default_levels",
+ "has_perfdata" : True,
+
+
+}
diff --git a/modules/catalog.py b/modules/catalog.py
index cab60d7..f62b619 100644
--- a/modules/catalog.py
+++ b/modules/catalog.py
@@ -68,6 +68,7 @@ manpage_catalog_titles = {
"genua" : "genua",
"h3c" : "H3C Technologies (also 3Com)",
"hp" : "Hewlett-Packard (HP)",
+ "ibm" : "IBM",
"innovaphone" : "Innovaphone",
"juniper" : "Juniper Networks",
"kemp" : "KEMP",