Module: check_mk
Branch: master
Commit: 0a58a0afe13d9afee4d111bfd1d0c16ddce65066
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0a58a0afe13d9a…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Oct 7 12:41:59 2015 +0200
#2637 etherbox2_temp: new check for the etherbox 2 (from firmware version 1.21 on) / MessPC
To run this check you have to configure the WATO rule <i>Hosts without system description OID</i>.
---
.werks/2637 | 9 +++++++++
ChangeLog | 1 +
checkman/etherbox2_temp | 21 +++++++++++++++++++++
checks/etherbox2_temp | 2 +-
4 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/.werks/2637 b/.werks/2637
new file mode 100644
index 0000000..2799f23
--- /dev/null
+++ b/.werks/2637
@@ -0,0 +1,9 @@
+Title: etherbox2_temp: new check for the etherbox 2 (from firmware version 1.21 on) / MessPC
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.7i3
+Date: 1444214094
+Class: feature
+
+To run this check you have to configure the WATO rule <i>Hosts without system description OID</i>.
diff --git a/ChangeLog b/ChangeLog
index 0b167f2..fa0126d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -99,6 +99,7 @@
* 2636 ucd_mem, ucd_processes, ucd_disk: new checks for systems using UCD SNMP Daemon...
* 2655 Windows Agent can now read additional settings from an optional check_mk_local.ini file...
* 2656 windows agent can now optionally output the full command line in the ps section...
+ * 2637 etherbox2_temp: new check for the etherbox 2 (from firmware version 1.21 on) / MessPC...
* 2315 FIX: windows agent: BOM replacement, fixed incorrect byte offset...
* 2316 FIX: windows agent: fix garbled output of cached agent plugins...
* 2358 FIX: check_mk_agent.solaris: more correct computation of zfs used space...
diff --git a/checkman/etherbox2_temp b/checkman/etherbox2_temp
new file mode 100644
index 0000000..e925e85
--- /dev/null
+++ b/checkman/etherbox2_temp
@@ -0,0 +1,21 @@
+title: Etherbox 2 / MessPC: Sensor Temperature
+catalog: hw/environment/betternet
+agents: snmp
+license: GPL
+distribution: check_mk
+description:
+ This check monitors the temperature sensors connected to
+ the etherbox 2, firmware version 1.21, from MessPC.
+
+ Default upper levels are 30, 35 celsius.
+
+ Lower and upper levels are configurable.
+
+item:
+ The sensor number.
+
+perfdata:
+ The temperature and its upper warn/crit levels.
+
+inventory:
+ One service for each temperature sensor is created.
diff --git a/checks/etherbox2_temp b/checks/etherbox2_temp
index 4e2465e..d1f1fbc 100644
--- a/checks/etherbox2_temp
+++ b/checks/etherbox2_temp
@@ -41,7 +41,7 @@
# suggested by customer
factory_settings['etherbox_temp_default_levels'] = {
- 'levels' : (25, 30),
+ 'levels' : (30, 35),
}
Module: check_mk
Branch: master
Commit: a272404b1a19194b97db24710dc14ff892aa4d75
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a272404b1a1919…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Oct 7 11:54:57 2015 +0200
preliminary version of check etherbox2_temp
---
checks/etherbox2_temp | 95 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 95 insertions(+)
diff --git a/checks/etherbox2_temp b/checks/etherbox2_temp
new file mode 100644
index 0000000..5d0983d
--- /dev/null
+++ b/checks/etherbox2_temp
@@ -0,0 +1,95 @@
+#!/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.
+
+# .1.3.6.1.4.1.14848.2.1.7.1.2.1 -0.0008 Volt --> BETTER-NETWORKS-ETHERNETBOX-MIB::ethernetboxObjects.7.1.2.1
+# .1.3.6.1.4.1.14848.2.1.7.1.2.2 -0.0008 Volt --> BETTER-NETWORKS-ETHERNETBOX-MIB::ethernetboxObjects.7.1.2.2
+# .1.3.6.1.4.1.14848.2.1.7.1.2.3 5.0015 Volt --> BETTER-NETWORKS-ETHERNETBOX-MIB::ethernetboxObjects.7.1.2.3
+# .1.3.6.1.4.1.14848.2.1.7.1.2.4 2.0031 Volt --> BETTER-NETWORKS-ETHERNETBOX-MIB::ethernetboxObjects.7.1.2.4
+# .1.3.6.1.4.1.14848.2.1.7.1.2.5 -0.0005 Volt --> BETTER-NETWORKS-ETHERNETBOX-MIB::ethernetboxObjects.7.1.2.5
+# .1.3.6.1.4.1.14848.2.1.7.1.2.6 -0.0004 Volt --> BETTER-NETWORKS-ETHERNETBOX-MIB::ethernetboxObjects.7.1.2.6
+# .1.3.6.1.4.1.14848.2.1.7.1.2.7 5.0002 Volt --> BETTER-NETWORKS-ETHERNETBOX-MIB::ethernetboxObjects.7.1.2.7
+# .1.3.6.1.4.1.14848.2.1.7.1.2.8 2.0010 Volt --> BETTER-NETWORKS-ETHERNETBOX-MIB::ethernetboxObjects.7.1.2.8
+
+# .1.3.6.1.4.1.14848.2.1.9.1.2.1 -2472 --> BETTER-NETWORKS-ETHERNETBOX-MIB::ethernetboxObjects.9.1.2.1
+# .1.3.6.1.4.1.14848.2.1.9.1.2.2 252 --> BETTER-NETWORKS-ETHERNETBOX-MIB::ethernetboxObjects.9.1.2.2
+# .1.3.6.1.4.1.14848.2.1.9.1.2.3 0 --> BETTER-NETWORKS-ETHERNETBOX-MIB::ethernetboxObjects.9.1.2.3
+# .1.3.6.1.4.1.14848.2.1.9.1.2.4 248 --> BETTER-NETWORKS-ETHERNETBOX-MIB::ethernetboxObjects.9.1.2.4
+
+
+# suggested by customer
+factory_settings['etherbox_temp_default_levels'] = {
+ 'levels' : (25, 30),
+ 'levels_lower' : (10, 15),
+}
+
+
+def parse_etherbox_temp(info):
+ # We have to use xxx.7.1.2.a to know if a temperature sensor
+ # is connected:
+ # - if oid(xxx.7.1.2.{a}) == 5.fff and oid(xxx.7.1.2.{a+1}) == 2.fff
+ # then a temperature sensor is connected to oid(xxx.9.1.2.{(a+1)/2})
+ # (a = 1, 3, 5, ...)
+ # - otherwise there's no sensor connected.
+ # Furthermore we cannot only use xxx.9.1.2.{a} < 0 (or something like that)
+ # because the temperature can drop below 0.
+ parsed = {}
+ sensor_indicators, sensors = info
+ for sensor_index in range(0, len(sensors)):
+ indicator_index_1, indicator_index_2 = (lambda x: (2*x, 2*x+1))(sensor_index)
+ if float(sensor_indicators[indicator_index_1][0].split(" ")[0]) > 4 and \
+ float(sensor_indicators[indicator_index_2][0].split(" ")[0]) > 1:
+ parsed["Sensor %s" % sensors[sensor_index][0]] = float(sensors[sensor_index][1]) / 10
+
+ return parsed
+
+
+def inventory_etherbox_temp(parsed):
+ return [ (sensor, {}) for sensor in parsed ]
+
+
+def check_etherbox_temp(item, params, parsed):
+ if item in parsed:
+ return check_temperature(parsed[item], params)
+
+
+check_info['etherbox_temp'] = {
+ 'parse_function' : parse_etherbox_temp,
+ 'inventory_function' : inventory_etherbox_temp,
+ 'check_function' : check_etherbox_temp,
+ 'service_description' : 'Temperature %s',
+ 'has_perfdata' : True,
+ 'snmp_info' : [(".1.3.6.1.4.1.14848.2.1.7.1.2", [ "" ]),
+ (".1.3.6.1.4.1.14848.2.1.9.1.2", [ OID_END, "" ])],
+ # From firmware version 1.21 on the ethernetbox 2 from MessPC
+ # supports additional temperature sensors. The sensor data are
+ # located under these OIDs. There are no standard OIDs for
+ # disk space reasons.
+ 'snmp_scan_function' : lambda oid: oid(".1.3.6.1.2.1.1.1.0") == "" and \
+ "Version 1.21" in oid(".1.3.6.1.4.1.14848.2.1.1.1.0", ""),
+ 'default_levels_variable' : 'etherbox_temp_default_levels',
+ 'group' : 'temperature',
+ 'includes' : [ "temperature.include" ],
+}
Module: check_mk
Branch: master
Commit: c7345b5411f8d52a65afb2dce0c184a5b07a2571
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c7345b5411f8d5…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Tue Oct 6 16:56:01 2015 +0200
#2656 windows agent can now optionally output the full command line in the ps section
This feature requires wmi which is also a configuration switch. As a side-effect, the windows agent
now includes a native c++ wmi wrapper which may be useful in the future.
---
.werks/2656 | 10 +
ChangeLog | 1 +
agents/windows/Configuration.cc | 23 ++
agents/windows/Configuration.h | 10 +
agents/windows/Makefile | 9 +-
agents/windows/build_version | 2 +-
agents/windows/check_mk.example.ini | 7 +
agents/windows/check_mk_agent-64.exe | Bin 633344 -> 826368 bytes
agents/windows/check_mk_agent-64.unversioned.exe | Bin 633344 -> 826368 bytes
agents/windows/check_mk_agent.cc | 106 ++++-
agents/windows/check_mk_agent.exe | Bin 545792 -> 743424 bytes
agents/windows/check_mk_agent.msi | Bin 1433088 -> 1827328 bytes
agents/windows/check_mk_agent.unversioned.exe | Bin 545792 -> 743424 bytes
agents/windows/install_agent-64.exe | Bin 313788 -> 380168 bytes
agents/windows/install_agent.exe | Bin 302107 -> 370669 bytes
agents/windows/stringutil.cc | 4 +-
agents/windows/stringutil.h | 32 +-
agents/windows/types.h | 31 +-
agents/windows/wmiHelper.cc | 448 ++++++++++++++++++++++
agents/windows/wmiHelper.h | 190 +++++++++
20 files changed, 853 insertions(+), 20 deletions(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=c7345b5411…