Module: check_mk
Branch: master
Commit: eb94fa3b07f9076d882ae47e94779280c5c117de
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=eb94fa3b07f907…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Sat Jun 13 22:49:19 2015 +0200
#2125 datapower_raid_bat: new check to monitor the battery of RAID controllers of IBM Datapower Gateways
---
.werks/2125 | 9 +++++
ChangeLog | 1 +
checkman/datapower_raid_bat | 17 +++++++++
checks/datapower_raid_bat | 80 +++++++++++++++++++++++++++++++++++++++++++
4 files changed, 107 insertions(+)
diff --git a/.werks/2125 b/.werks/2125
new file mode 100644
index 0000000..d438818
--- /dev/null
+++ b/.werks/2125
@@ -0,0 +1,9 @@
+Title: datapower_raid_bat: new check to monitor the battery of RAID controllers of IBM Datapower Gateways
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i2
+Date: 1434228519
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index c344f10..acb9d1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@
* 2122 datapower_fan: new check to monitor fan status of IBM Datapower Gateways
* 2123 datapower_fs: new check to monitor filesystems on IBMs Datapower Gateways
* 2124 datapower_pdrive, datapower_ldrive: new checks to monitor disk states of IBM Datapower Gateways
+ * 2125 datapower_raid_bat: new check to monitor the battery of RAID controllers of IBM 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_raid_bat b/checkman/datapower_raid_bat
new file mode 100644
index 0000000..7a6b113
--- /dev/null
+++ b/checkman/datapower_raid_bat
@@ -0,0 +1,17 @@
+title: IBM Datapower Raid Battery
+agents: snmp
+catalog: hw/network/ibm
+license: GPL
+distribution: check_mk
+description:
+
+ This check monitors the state of the battery of the RAID controller of IBMs
+ Datapower Gateways supporting the DATAPOWER-STATUS-MIB. The check reads
+ the battery state, its type and serial number. The state of the service is
+ derived from the battery states given by the device with a mapping.
+
+item:
+ The ID of the RAID controller.
+
+inventory:
+ On each gateway one service is created for each RAID controller.
diff --git a/checks/datapower_raid_bat b/checks/datapower_raid_bat
new file mode 100644
index 0000000..8a39adf
--- /dev/null
+++ b/checks/datapower_raid_bat
@@ -0,0 +1,80 @@
+#!/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.
+
+def inventory_datapower_raid_bat(info):
+ for controller_id, bat_type, serial, name, status in info:
+ yield controller_id, None
+
+def check_datapower_raid_bat(item, _no_params, info):
+ datapower_raid_bat_status = {
+ "1": (0, "charging"),
+ "2": (1, "discharging"),
+ "3": (2, "i2c errors detected"),
+ "4": (0, "learn cycle active"),
+ "5": (2, "learn cycle failed"),
+ "6": (0, "learn cycle requested"),
+ "7": (2, "learn cycle timeout"),
+ "8": (2, "pack missing"),
+ "9": (2, "temperature high"),
+ "10": (2, "voltage low"),
+ "11": (1, "periodic learn required"),
+ "12": (1, "remaining capacity low"),
+ "13": (2, "replace pack"),
+ "14": (0, "normal"),
+ "15": (1, "undefined"),
+ }
+ datapower_raid_bat_type = {
+ "1": "no battery present",
+ "2": "ibbu",
+ "3": "bbu",
+ "4": "zcrLegacyBBU",
+ "5": "itbbu3",
+ "6": "ibbu08",
+ "7": "unknown",
+ }
+ for controller_id, bat_type, serial, name, status in info:
+ if item == controller_id:
+ state, state_txt = datapower_raid_bat_status[status]
+ type_txt = datapower_raid_bat_type[bat_type]
+ infotext = "Status: %s, Name: %s, Type: %s, Serial: %s" \
+ % (state_txt, name, type_txt, serial)
+ return state, infotext
+
+check_info['datapower_raid_bat'] = {
+ "inventory_function" : inventory_datapower_raid_bat,
+ "check_function" : check_datapower_raid_bat,
+ "service_description" : "Raid Battery %s",
+ "snmp_info" : ( ".1.3.6.1.4.1.14685.3.1.258.1", [
+ "1", # dpStatusRaidBatteryBackUpStatusControllerID
+ "2", # dpStatusRaidBatteryBackUpStatusBatteryType
+ "3", # dpStatusRaidBatteryBackUpStatusSerial
+ "4", # dpStatusRaidBatteryBackUpStatusName
+ "5", # dpStatusRaidBatteryBackUpStatusStatus
+ ]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.14685.1.7",
+
+
+}
Module: check_mk
Branch: master
Commit: bb699a8e3c474d3e75e9eef9c2a714dcca74b269
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=bb699a8e3c474d…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Sat Jun 13 15:29:40 2015 +0200
#2124 # new file: datapower_pdrive, datapower_ldrive: new checks to monitor disk states of IBM Datapower Gateways
---
.werks/2124 | 9 ++++++
ChangeLog | 1 +
checkman/datapower_ldrive | 22 ++++++++++++++
checkman/datapower_pdrive | 23 ++++++++++++++
checks/datapower_ldrive | 73 +++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 128 insertions(+)
diff --git a/.werks/2124 b/.werks/2124
new file mode 100644
index 0000000..411cda0
--- /dev/null
+++ b/.werks/2124
@@ -0,0 +1,9 @@
+Title: # new file: datapower_pdrive, datapower_ldrive: new checks to monitor disk states of IBM Datapower Gateways
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i2
+Date: 1434202118
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index b11cd35..609aa7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,7 @@
* 2121 datapower_temp: new check to monitor temperature sensors of IBMs Datapower Gateways
* 2122 datapower_fan: new check to monitor fan status of IBM Datapower Gateways
* 2123 datapower_fs: new check to monitor filesystems on IBMs Datapower Gateways
+ * 2124 # new file: datapower_pdrive, datapower_ldrive: new checks to monitor disk states of IBM 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_ldrive b/checkman/datapower_ldrive
new file mode 100644
index 0000000..523e2d7
--- /dev/null
+++ b/checkman/datapower_ldrive
@@ -0,0 +1,22 @@
+title: IBM Datapower Logical Drives
+agents: snmp
+catalog: hw/network/ibm
+license: GPL
+distribution: check_mk
+description:
+
+ This check monitors the logical disk drives of IBMs Datapower Gateways
+ supporting the DATAPOWER-STATUS-MIB.
+
+ It reports the RAID level, the number of disks of the logical drive and
+ the state as reported by the device. The state of the service is determined
+ accordingly.
+
+ No limits can be defined for this check,
+
+inventory:
+ One service is created for each logical drive found.
+
+item:
+ The item name is derived from the ID of the disk controller and the ID
+ of the logical drive on this controller, seperated by a "-".
diff --git a/checkman/datapower_pdrive b/checkman/datapower_pdrive
new file mode 100644
index 0000000..49bb6f9
--- /dev/null
+++ b/checkman/datapower_pdrive
@@ -0,0 +1,23 @@
+title: IBM Datapower Physical Drives
+agents: snmp
+catalog: hw/network/ibm
+license: GPL
+distribution: check_mk
+description:
+
+ This check monitors the physical disk drives of IBMs Datapower Gateways
+ supporting the DATAPOWER-STATUS-MIB.
+
+ It reports the position in the drive bay, the logical drive it is member
+ of, the manufacturer and product name of the disk, the state as reported
+ by the disk controller and - if available - by the disk itself. The state
+ of the service is determined accordingly.
+
+ No limits can be defined for this check,
+
+inventory:
+ One service is created for each physical drive found.
+
+item:
+ The item name is derived from the ID of the disk controller and the ID of
+ the physical drive, seperated by a "-".
diff --git a/checks/datapower_ldrive b/checks/datapower_ldrive
new file mode 100644
index 0000000..e5f036d
--- /dev/null
+++ b/checks/datapower_ldrive
@@ -0,0 +1,73 @@
+#!/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.
+
+def inventory_datapower_ldrive(info):
+ for controller, ldrive, raid_level, num_drives, status in info:
+ item = "%s-%s" % (controller, ldrive)
+ yield item, None
+
+def check_datapower_ldrive(item, _no_params, info):
+ datapower_ldrive_status = {
+ "1": (2, "offline"),
+ "2": (2, "partially degraded"),
+ "3": (2, "degraded"),
+ "4": (0, "optimal"),
+ "5": (1, "unknown"),
+ }
+ datapower_ldrive_raid = {
+ "1": "0",
+ "2": "1",
+ "3": "1E",
+ "4": "5",
+ "5": "6",
+ "6": "10",
+ "7": "50",
+ "8": "60",
+ "9": "undefined",
+ }
+ for controller, ldrive, raid_level, num_drives, status in info:
+ if item == "%s-%s" % (controller, ldrive):
+ state, state_txt = datapower_ldrive_status[status]
+ raid_level = datapower_ldrive_raid[raid_level]
+ infotext = "Status: %s, RAID Level: %s, Number of Drives: %s"\
+ % (state_txt, raid_level, num_drives)
+ return state, infotext
+
+check_info['datapower_ldrive'] = {
+ "inventory_function" : inventory_datapower_ldrive,
+ "check_function" : check_datapower_ldrive,
+ "service_description" : "Logical Drive %s",
+ "snmp_info" : ( ".1.3.6.1.4.1.14685.3.1.259.1", [
+ "1", # dpStatusRaidLogicaldrivetatusControllerID
+ "2", # dpStatusRaidLogicaldrivetatusLogicalDriveID
+ "4", # dpStatusRaidLogicaldrivetatusRaidLevel
+ "5", # dpStatusRaidLogicaldrivetatusNumPhysicalDrives
+ "6", # dpStatusRaidLogicaldrivetatusState
+ ]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.14685.1.7",
+
+
+}
Module: check_mk
Branch: master
Commit: 2a4e537b6a5489f3ed73602791c45a9d46b7a805
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2a4e537b6a5489…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Jun 12 18:04:05 2015 +0200
#2123 datapower_fs: new check to monitor filesystems on IBMs Datapower Gateways
---
.werks/2123 | 9 ++++++
ChangeLog | 1 +
checkman/datapower_fs | 19 +++++++++++++
checks/datapower_fs | 75 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 104 insertions(+)
diff --git a/.werks/2123 b/.werks/2123
new file mode 100644
index 0000000..0bc6a40
--- /dev/null
+++ b/.werks/2123
@@ -0,0 +1,9 @@
+Title: datapower_fs: new check to monitor filesystems on IBMs Datapower Gateways
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i2
+Date: 1434125006
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 3ab1d1b..b11cd35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,7 @@
* 2120 datapower_cpu, datapower_mem: new checks to monitor CPU and memory and IBMs Datapower Gateways
* 2121 datapower_temp: new check to monitor temperature sensors of IBMs Datapower Gateways
* 2122 datapower_fan: new check to monitor fan status of IBM Datapower Gateways
+ * 2123 datapower_fs: new check to monitor filesystems on 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_fs b/checkman/datapower_fs
new file mode 100644
index 0000000..cf97088
--- /dev/null
+++ b/checkman/datapower_fs
@@ -0,0 +1,19 @@
+title: IBM Datapower Filesystems
+agents: snmp
+catalog: hw/network/ibm
+license: GPL
+distribution: check_mk
+description:
+
+ This check monitors the state of filesystems on IBMs Datapower Gateways
+ supporting the DATAPOWER-STATUS-MIB. It reports the filesystem utilization.
+
+ The usual limits for filesystem usage can be set and the state of a service
+ is determined from these limits.
+
+inventory:
+ One service is created for each of the four possible filesystems found.
+
+item:
+ There are four possible filesystems on a datapower network with the following
+ names: {Encrypted, Unencrypted, Internal, Temporary}.
diff --git a/checks/datapower_fs b/checks/datapower_fs
new file mode 100644
index 0000000..b52a42d
--- /dev/null
+++ b/checks/datapower_fs
@@ -0,0 +1,75 @@
+#!/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.
+
+def inventory_datapower_fs(info):
+ if info:
+ # only discover filesystems with a defined total size > 0
+ if saveint(info[0][0]) != 0:
+ yield "Encrypted", {}
+ if saveint(info[0][2]) != 0:
+ yield "Unencrypted", {}
+ if saveint(info[0][4]) != 0:
+ yield "Temporary", {}
+ if saveint(info[0][6]) != 0:
+ yield "Internal", {}
+
+def check_datapower_fs(item, params, info):
+ if item == "Encrypted":
+ i = 0
+ elif item == "Unencrypted":
+ i = 2
+ elif item == "Temporary":
+ i = 4
+ elif item == "Internal":
+ i = 6
+
+ avail_mb = float(info[0][i])
+ size_mb = float(info[0][i+1])
+ fslist = [(item, size_mb, avail_mb, 0)]
+
+ return df_check_filesystem_list(item, params, fslist)
+
+check_info["datapower_fs"] = {
+ "inventory_function" : inventory_datapower_fs,
+ "check_function" : check_datapower_fs,
+ "service_description" : "Filesystem %s",
+ "includes" : [ "df.include" ],
+ "group" : "filesystem",
+ "default_levels_variable" : "filesystem_default_levels",
+ "has_perfdata" : True,
+ "snmp_info" : ( ".1.3.6.1.4.1.14685.3.1.29", [
+ "1", # dpStatusFilesystemStatusFreeEncrypted
+ "2", # dpStatusFilesystemStatusTotalEncrypted
+ "3", # dpStatusFilesystemStatusFreeUnencrypted
+ "4", # dpStatusFilesystemStatusTotalUnencrypted
+ "5", # dpStatusFilesystemStatusFreeTemporary
+ "6", # dpStatusFilesystemStatusTotalTemporary
+ "7", # dpStatusFilesystemStatusFreeInternal
+ "8", # dpStatusFilesystemStatusTotalInternal
+ ]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.14685.1.7",
+}
+
Module: check_mk
Branch: master
Commit: db1d52f6ca5e501d4490bbbcef88163464228595
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=db1d52f6ca5e50…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Jun 12 17:49:46 2015 +0200
#2122 datapower_fan: new check to monitor fan status of IBM Datapower Gateways
---
.werks/2122 | 9 +++++
ChangeLog | 1 +
checkman/datapower_fan | 22 ++++++++++++
checks/datapower_fan | 89 ++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 121 insertions(+)
diff --git a/.werks/2122 b/.werks/2122
new file mode 100644
index 0000000..80e78b4
--- /dev/null
+++ b/.werks/2122
@@ -0,0 +1,9 @@
+Title: datapower_fan: new check to monitor fan status of IBM Datapower Gateways
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i2
+Date: 1434124161
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index 701baa1..3ab1d1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@
* 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
* 2121 datapower_temp: new check to monitor temperature sensors of IBMs Datapower Gateways
+ * 2122 datapower_fan: new check to monitor fan status of IBM 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_fan b/checkman/datapower_fan
new file mode 100644
index 0000000..1ae8724
--- /dev/null
+++ b/checkman/datapower_fan
@@ -0,0 +1,22 @@
+title: IBM Datapower Fans
+agents: snmp
+catalog: hw/network/ibm
+license: GPL
+distribution: check_mk
+description:
+
+ This check monitors the fans of IBMs Datapower Gateways supporting the
+ DATAPOWER-STATUS-MIB.
+
+ It reports the fan speed in rpm, and the state of the fan extracted from
+ the device. The state of the service is derived accordingly.
+
+ No limits can be defined for this check,
+
+inventory:
+ On each gateway one service is created for each fan found.
+
+item:
+ The item name is derived from the extracted ID number of the fan and
+ a mapping between IDs and fan locations hardcoded in the check and
+ taken from the DATAPOWER-STATUS-MIB.
diff --git a/checks/datapower_fan b/checks/datapower_fan
new file mode 100644
index 0000000..dc3dcf9
--- /dev/null
+++ b/checks/datapower_fan
@@ -0,0 +1,89 @@
+#!/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.
+#
+
+datapower_fan_ids = {
+ "1": "CPU 1",
+ "2": "CPU 2",
+ "3": "Chassis 1",
+ "4": "Chassis 2",
+ "5": "Chassis 3",
+ "6": "Chassis 4",
+ "7": "Chassis 5",
+ "8": "Chassis 6",
+ "9": "Chassis 7",
+ "10": "Chassis 8",
+ "11": "Tray 1 Fan 1",
+ "12": "Tray 1 Fan 2",
+ "13": "Tray 1 Fan 3",
+ "14": "Tray 1 Fan 4",
+ "15": "Tray 2 Fan 1",
+ "16": "Tray 2 Fan 2",
+ "17": "Tray 2 Fan 3",
+ "18": "Tray 2 Fan 4",
+ "19": "Tray 3 Fan 1",
+ "20": "Tray 3 Fan 2",
+ "21": "Tray 3 Fan 3",
+ "22": "Tray 3 Fan 4",
+ "23": "Hard Disk Tray Fan 1",
+ "24": "Hard Disk Tray Fan 2",
+}
+
+def inventory_datapower_fan(info):
+ for fan_id, speed, status in info:
+ yield datapower_fan_ids[fan_id], None
+
+def check_datapower_fan(item, _no_params, info):
+ datapower_fan_status = {
+ "1": (2, "reached lower non-recoverable limit: "),
+ "2": (2, "reached lower critical limit: "),
+ "3": (1, "reached lower non-critical limit: "),
+ "4": (0, ""), # OK
+ "5": (1, "reached upper non-critical limit: "),
+ "6": (2, "reached upper critical limit: "),
+ "7": (2, "reached upper non-recoverable limit: "),
+ "8": (2, "failure, "),
+ "9": (2, "no reading, "),
+ "10": (1, "invalid, "),
+ }
+ for fan_id, speed, status in info:
+ if item == datapower_fan_ids[fan_id]:
+ state, state_txt = datapower_fan_status[status]
+ infotext = "%s%s rpm" % (state_txt, speed)
+ return state, infotext
+
+
+check_info["datapower_fan"] = {
+ "inventory_function" : inventory_datapower_fan,
+ "check_function" : check_datapower_fan,
+ "service_description" : "Fan %s",
+ "snmp_info" : (".1.3.6.1.4.1.14685.3.1.97.1", [
+ 1, # dpStatusEnvironmentalFanSensorsFanID
+ 2, # dpStatusEnvironmentalFanSensorsFanSpeed
+ 4, # dpStatusEnvironmentalFanSensorsReadingStatus
+ ]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.14685.1.7"),
+}
Module: check_mk
Branch: master
Commit: d812c685831f0f89c250d5a00b2c6e10566f9784
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d812c685831f0f…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Fri Jun 12 13:55:43 2015 +0200
Some Cisco devices report the device internal temperature levels in the wrong
order. The check now handles this behaviour.
Conflicts:
.werks/2221
---
.werks/2221 | 10 ++++++++++
ChangeLog | 3 +++
checks/cisco_temperature | 9 ++++++++-
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/.werks/2221 b/.werks/2221
new file mode 100644
index 0000000..b25e723
--- /dev/null
+++ b/.werks/2221
@@ -0,0 +1,10 @@
+Title: cisco_temperature: Fixed order of device levels for some devices
+Level: 1
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i2
+Date: 1434108600
+
+Some Cisco devices report the device internal temperature levels in the wrong
+order. The check now handles this behaviour.
diff --git a/ChangeLog b/ChangeLog
index a22d01f..687d448 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,9 @@
* 2334 Logging details about loaded SNMP MIB modules during startup
* 2326 Allow relating Event Console hosts to monitoring hosts now also by alias...
+ general:
+ * 2221 FIX: cisco_temperature: Fixed order of device levels for some devices...
+
1.2.7i1:
Core & Setup:
diff --git a/checks/cisco_temperature b/checks/cisco_temperature
index 144e196..699c1fb 100644
--- a/checks/cisco_temperature
+++ b/checks/cisco_temperature
@@ -24,6 +24,11 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+
+# NOTE: Devices of type 3850 with firmware versions 3.2.0SE, 3.2.1, 3.2.2
+# have been observed to display a tenth of the actual temperature value.
+# A firmware update on the device fixes this.
+
def parse_cisco_temperature(info):
description_info, state_info, levels_info, perfstuff = info
@@ -63,7 +68,9 @@ def parse_cisco_temperature(info):
if len(thresholds[sensor_id]) in [ 2, 4 ]:
warnraw, critraw = thresholds[sensor_id][0:2]
- dev_levels = (float(warnraw)/scale, float(critraw)/scale)
+ # Some devices deliver these values in the wrong order
+ dev_levels = ( min(float(warnraw)/scale, float(critraw)/scale),
+ max(float(warnraw)/scale, float(critraw)/scale) )
else:
dev_levels = None
entity_parsed[descr]['dev_levels'] = dev_levels
Connection reset by peer" when reloading Event Console
Message-ID: <557abe46.upsJkCQgAgmNLcqL%mk(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.5 6/20/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 219de74d002d805c6f4411826b90f36d08753189
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=219de74d002d80…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jun 12 13:10:57 2015 +0200
#2328 FIX Fix sporadic error "Connection reset by peer" when reloading Event Console
The problem appeared especially when distributing changes with WATO in a
distributed setup. The reason was: the reload of the configuration closed
and reopened the UNIX socket that is used for sending commands. That way
parallel connections would be closed. Now the UNIX socket is only reopened
when the configuration parameter <i>Max. number of pending connections to
the status socket</i> has changed and a reload is thus neccessary in order
to make that change active.
---
.werks/2328 | 16 ++++++++++++++++
ChangeLog | 1 +
mkeventd/bin/mkeventd | 26 ++++++++++++++++++++++----
3 files changed, 39 insertions(+), 4 deletions(-)
diff --git a/.werks/2328 b/.werks/2328
new file mode 100644
index 0000000..1d6261b
--- /dev/null
+++ b/.werks/2328
@@ -0,0 +1,16 @@
+Title: Fix sporadic error "Connection reset by peer" when reloading Event Console
+Level: 2
+Component: ec
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i2
+Date: 1434107286
+
+The problem appeared especially when distributing changes with WATO in a
+distributed setup. The reason was: the reload of the configuration closed
+and reopened the UNIX socket that is used for sending commands. That way
+parallel connections would be closed. Now the UNIX socket is only reopened
+when the configuration parameter <i>Max. number of pending connections to
+the status socket</i> has changed and a reload is thus neccessary in order
+to make that change active.
diff --git a/ChangeLog b/ChangeLog
index 731dae9..a9e1ffa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,6 +48,7 @@
* 2333 The Event Console log level can now be configured via GUI...
* 2334 Logging details about loaded SNMP MIB modules during startup
* 2326 Allow relating Event Console hosts to monitoring hosts now also by alias...
+ * 2328 FIX: Fix sporadic error "Connection reset by peer" when reloading Event Console...
1.2.7i1:
diff --git a/mkeventd/bin/mkeventd b/mkeventd/bin/mkeventd
index 9818f71..83f09c0 100755
--- a/mkeventd/bin/mkeventd
+++ b/mkeventd/bin/mkeventd
@@ -2374,6 +2374,10 @@ class StatusServer:
self.open_sockets()
def open_sockets(self):
+ self.open_unix_socket()
+ self.open_tcp_socket()
+
+ def open_unix_socket(self):
if os.path.exists(g_socket_path):
os.remove(g_socket_path)
self._socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
@@ -2381,7 +2385,9 @@ class StatusServer:
# Make sure that socket is group writable
os.chmod(g_socket_path, 0664)
self._socket.listen(g_config['socket_queue_len'])
+ self._unix_socket_queue_len = g_config['socket_queue_len'] # detect changes in config
+ def open_tcp_socket(self):
if g_config["remote_status"]:
try:
self._tcp_port, self._tcp_allow_commands = g_config["remote_status"][:2]
@@ -2406,13 +2412,28 @@ class StatusServer:
self._tcp_access_list = None
def close_sockets(self):
+ self.close_tcp_socket()
+ self.close_unix_socket()
+
+ def close_unix_socket(self):
if self._socket:
self._socket.close()
self._socket = None
+
+ def close_tcp_socket(self):
if self._tcp_socket:
self._tcp_socket.close()
self._tcp_socket = None
+ def reopen_sockets(self):
+ if self._unix_socket_queue_len != g_config["socket_queue_len"]:
+ log("socket_queue_len has changed. Reopening UNIX socket.")
+ self.close_unix_socket()
+ self.open_unix_socket()
+
+ self.close_tcp_socket()
+ self.open_tcp_socket()
+
def reload_configuration(self):
self._reopen_sockets = True
@@ -2447,10 +2468,7 @@ class StatusServer:
addr_info = None
if self._reopen_sockets:
- if opt_debug:
- log("Reopening sockets")
- self.close_sockets()
- self.open_sockets()
+ self.reopen_sockets()
self._reopen_sockets = False
listen_list = [ self._socket ]
Module: check_mk
Branch: master
Commit: f0b176db04b61c0d725e41b7ef882d076254b9e2
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f0b176db04b61c…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Jun 12 12:53:20 2015 +0200
#2121 datapower_temp: new check to monitor temperature sensors of IBMs Datapower Gateways
---
.werks/2121 | 9 ++++++
ChangeLog | 1 +
checkman/datapower_temp | 20 +++++++++++++
checks/datapower_temp | 73 +++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 103 insertions(+)
diff --git a/.werks/2121 b/.werks/2121
new file mode 100644
index 0000000..1038d78
--- /dev/null
+++ b/.werks/2121
@@ -0,0 +1,9 @@
+Title: datapower_temp: new check to monitor temperature sensors of IBMs Datapower Gateways
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i2
+Date: 1434106349
+Class: feature
+
+
diff --git a/ChangeLog b/ChangeLog
index a22d01f..731dae9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -16,6 +16,7 @@
* 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
+ * 2121 datapower_temp: new check to monitor temperature sensors of 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_temp b/checkman/datapower_temp
new file mode 100644
index 0000000..fcc2d4f
--- /dev/null
+++ b/checkman/datapower_temp
@@ -0,0 +1,20 @@
+title: IBM Datapower Temperature Sensors
+agents: snmp
+catalog: hw/network/ibm
+license: GPL
+distribution: check_mk
+description:
+
+ This check monitors the temperatures provided by the sensors of IBMs
+ Datapower Gateways supporting the DATAPOWER-STATUS-MIB.
+
+ The check will result in a WARNING/CRITICAL state when the given
+ thresholds for the temperature are reached. Upper and lower thresholds
+ may be configured. Also, it may be configured that the upper warning and
+ critical levels are taken from the device itself.
+
+perfdata:
+ One variable: the temperature
+
+inventory:
+ On each gateway one service is created for each sensor found
diff --git a/checks/datapower_temp b/checks/datapower_temp
new file mode 100644
index 0000000..6304974
--- /dev/null
+++ b/checks/datapower_temp
@@ -0,0 +1,73 @@
+#!/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_temp_default_levels"] = {
+ "levels": (65, 70), # 70C recommended alarm level by IBM
+}
+
+def inventory_datapower_temp(info):
+ for name, temp, upper_warn, status, upper_crit in info:
+ yield name.strip("Temperature "), {}
+
+def check_datapower_temp(item, params, info):
+ datapower_temp_status = {
+ "8": (2, "failure"),
+ "9": (3, "noReading"),
+ "10": (2, "invalid"),
+ }
+ for name, temp, upper_warn, status, upper_crit in info:
+ if item == name.strip("Temperature "):
+ if int(status) >= 8:
+ dev_state, dev_state_txt = datapower_temp_status[status]
+ return dev_state, "device status: %s" % dev_state_txt
+ else:
+ state, infotext, perfdata = check_temperature(
+ float(temp),
+ params,
+ dev_levels = (float(upper_warn), float(upper_crit))
+ )
+
+ return state, infotext, perfdata
+
+
+check_info["datapower_temp"] = {
+ "inventory_function" : inventory_datapower_temp,
+ "check_function" : check_datapower_temp,
+ "service_description" : "Temperature %s",
+ "group" : "temperature",
+ "has_perfdata" : True,
+ "snmp_info" : (".1.3.6.1.4.1.14685.3.1.141.1", [
+ 1, # dpStatusEnvironmentalSensorsName
+ 2, # dpStatusEnvironmentalSensorsValue
+ 3, # dpStatusEnvironmentalSensorsUpperNonCriticalThreshold
+ 5, # dpStatusEnvironmentalSensorsReadingStatus
+ 6, # dpStatusEnvironmentalSensorsUpperCriticalThreshold
+ ]),
+ "snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.14685.1.7"),
+ "includes" : [ "temperature.include" ],
+ "default_levels_variable" : "datapower_temp_default_levels",
+}