Module: check_mk
Branch: master
Commit: 796a2dcde14ea60f5f2fd921d95731107c1aa83b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=796a2dcde14ea6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Nov 3 17:00:03 2014 +0100
dell_om_* checks: better scan function, find more devices
---
checks/dell_om.include | 34 ++++++++++++++++++++++++++++++++++
checks/dell_om_disks | 3 ++-
checks/dell_om_esmlog | 3 ++-
checks/dell_om_mem | 3 ++-
checks/dell_om_processors | 3 ++-
checks/dell_om_sensors | 3 ++-
6 files changed, 44 insertions(+), 5 deletions(-)
diff --git a/checks/dell_om.include b/checks/dell_om.include
new file mode 100644
index 0000000..ea3bd08
--- /dev/null
+++ b/checks/dell_om.include
@@ -0,0 +1,34 @@
+#!/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.
+
+# The OpenManage module attaches itself to the SNMP agent of the
+# operating system. We trigger on all Windows and Linux systems.
+# This is not optimal but still enough for excluding network
+# devices and similar stuff
+def scan_dell_om(oid):
+ return "Open Manage" in oid(".1.3.6.1.2.1.1.1.0") or \
+ "Linux" in oid(".1.3.6.1.2.1.1.1.0") or \
+ "Software: Windows" in oid(".1.3.6.1.2.1.1.1.0")
diff --git a/checks/dell_om_disks b/checks/dell_om_disks
index 51d01a2..916fd23 100644
--- a/checks/dell_om_disks
+++ b/checks/dell_om_disks
@@ -116,7 +116,7 @@ check_info["dell_om_disks"] = {
"service_description" : "Physical Disk %s",
"has_perfdata" : False,
# There is no other way to find out that openmanage is present.
- "snmp_scan_function" : lambda oid:
oid('.1.3.6.1.4.1.674.10893.1.20.1.0'),
+ "snmp_scan_function" : scan_dell_om,
"snmp_info" : (
".1.3.6.1.4.1.674.10893.1.20.130.4.1", [
2, # arrayDiskName
4, # arrayDiskState
@@ -131,5 +131,6 @@ check_info["dell_om_disks"] = {
#31, #arrayDiskSmartAlertIndication
35, # arrayDiskMediaType
]),
+ "includes" : [ "dell_om.include" ],
}
diff --git a/checks/dell_om_esmlog b/checks/dell_om_esmlog
index 14df4e0..59576a3 100644
--- a/checks/dell_om_esmlog
+++ b/checks/dell_om_esmlog
@@ -50,9 +50,10 @@ check_info["dell_om_esmlog"] = {
"service_description" : "ESM Log",
"has_perfdata" : False,
# There is no other way to find out that openmanage is present.
- "snmp_scan_function" : lambda oid:
oid('.1.3.6.1.4.1.674.10893.1.20.1.0'),
+ "snmp_scan_function" : scan_dell_om,
"snmp_info" : (
".1.3.6.1.4.1.674.10892.1.200.10.1.41", [
1, # eventlogStatus
]),
+ "includes" : [ "dell_om.include" ],
}
diff --git a/checks/dell_om_mem b/checks/dell_om_mem
index 8a663dc..3ed4562 100644
--- a/checks/dell_om_mem
+++ b/checks/dell_om_mem
@@ -67,12 +67,13 @@ check_info["dell_om_mem"] = {
"service_description" : "Module %s",
"has_perfdata" : False,
# There is no other way to find out that openmanage is present.
- "snmp_scan_function" : lambda oid:
oid('.1.3.6.1.4.1.674.10893.1.20.1.0'),
+ "snmp_scan_function" : scan_dell_om,
"snmp_info" : ( ".1.3.6.1.4.1.674.10892.1.1100.50.1",
[
"8.1", #Location
"5.1", #Status
"14.1", #Size
"20.1", #FailureMode
]),
+ "includes" : [ "dell_om.include" ],
}
diff --git a/checks/dell_om_processors b/checks/dell_om_processors
index 6ae3e30..ebf1cc7 100644
--- a/checks/dell_om_processors
+++ b/checks/dell_om_processors
@@ -72,7 +72,7 @@ check_info["dell_om_processors"] = {
"service_description" : "Processor %s",
"has_perfdata" : False,
# There is no other way to find out that openmanage is present.
- "snmp_scan_function" : lambda oid:
oid('.1.3.6.1.4.1.674.10893.1.20.1.0'),
+ "snmp_scan_function" : scan_dell_om,
"snmp_info" : ( ".1.3.6.1.4.1.674.10892.1.1100", [
"30.1.2", # Index
"30.1.5", # Device Status
@@ -80,5 +80,6 @@ check_info["dell_om_processors"] = {
"30.1.9", # DeviceStatus State
"32.1.6", # Deive Status reading
]),
+ "includes" : [ "dell_om.include" ],
}
diff --git a/checks/dell_om_sensors b/checks/dell_om_sensors
index 77509a9..643a8af 100644
--- a/checks/dell_om_sensors
+++ b/checks/dell_om_sensors
@@ -53,7 +53,7 @@ check_info["dell_om_sensors"] = {
"service_description" : "Sensor %s",
"has_perfdata" : True,
# There is no other way to find out that openmanage is present.
- "snmp_scan_function" : lambda oid:
oid('.1.3.6.1.4.1.674.10893.1.20.1.0'),
+ "snmp_scan_function" : scan_dell_om,
"snmp_info" : ( ".1.3.6.1.4.1.674.10892.1.700.20.1",
[
'2', #ProbeIndex
'5', #ProbeStatus
@@ -66,5 +66,6 @@ check_info["dell_om_sensors"] = {
#'13.1',
#ProbeLowerCriticalThreshold',
#'16.1', #ProbeDiscreteReading',
]),
+ "includes" : [ "dell_om.include",
"temperature.include" ],
}