tinkerforge.motion, tinkerforge.temperature:
new checks to monitor
tinkerforge sensors
Message-ID: <56ab85ec.j/z6eCkpszkb+x0A%sh(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: 8bb3d1ee48532806c1d45e02b9570ac8a8507121
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8bb3d1ee485328…
Author: Sebastian Herbord <sh(a)mathias-kettner.de>
Date: Fri Jan 29 15:43:11 2016 +0100
#2941 tinkerforge, tinkerforge.ambient, tinkerforge.humidity, tinkerforge.motion, tinkerforge.temperature: new checks to monitor tinkerforge sensors
Tinkerforge is a manufacturer of buildings blocks (include many sensor blocks) that can be combined
and assembled freely. The assembled devices can be connected to via usb, ethernet or wifi.
The current range of checks supports the blocks (so called bricklets) included in the
"Server Room Monitoring"-kit:
- Ambient Light sensor
- Humidity sensor
- Motion sensor
- Temperature sensor
- Master brick
The plugin can also be configured to display sensor readings on the integrated 7-segment display.
---
.werks/2941 | 19 +++
ChangeLog | 1 +
agents/plugins/mk_tinkerforge | 294 ++++++++++++++++++++++++++++++++++
checkman/tinkerforge | 17 ++
checkman/tinkerforge.ambient | 15 ++
checkman/tinkerforge.humidity | 14 ++
checkman/tinkerforge.motion | 21 +++
checkman/tinkerforge.temperature | 16 ++
checks/tinkerforge | 213 ++++++++++++++++++++++++
web/plugins/wato/check_parameters.py | 54 +++++++
10 files changed, 664 insertions(+)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=8bb3d1ee48…
Module: check_mk
Branch: master
Commit: 964f7203c3f467bd8770397947632a2a7435237b
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=964f7203c3f467…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Jan 29 15:41:45 2016 +0100
Do not create a HTTP 404 in case of missing Livestatus data anymore
---
web/htdocs/index.py | 2 --
1 file changed, 2 deletions(-)
diff --git a/web/htdocs/index.py b/web/htdocs/index.py
index d9de6d5..46b4766 100644
--- a/web/htdocs/index.py
+++ b/web/htdocs/index.py
@@ -157,8 +157,6 @@ def handler(req, fields = None, is_profiling = False):
# Some exception need to set a specific HTTP status code
if ty == MKUnauthenticatedException:
response_code = apache.HTTP_UNAUTHORIZED
- elif ty == livestatus.MKLivestatusNotFoundError:
- response_code = apache.HTTP_NOT_FOUND
elif ty == livestatus.MKLivestatusException:
response_code = apache.HTTP_BAD_GATEWAY
Module: check_mk
Branch: master
Commit: c84ae7adaa743c5870029b02e6a7d95a225103e3
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c84ae7adaa743c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 29 15:13:34 2016 +0100
#3038 FIX Fixed invalid error message when creating service group assignment rule without having service groups
---
.werks/3038 | 9 +++++++++
ChangeLog | 1 +
web/htdocs/valuespec.py | 8 ++++++++
3 files changed, 18 insertions(+)
diff --git a/.werks/3038 b/.werks/3038
new file mode 100644
index 0000000..9dda8dc
--- /dev/null
+++ b/.werks/3038
@@ -0,0 +1,9 @@
+Title: Fixed invalid error message when creating service group assignment rule without having service groups
+Level: 1
+Component: wato
+Compatible: compat
+Version: 1.2.7i4
+Date: 1454076806
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 87e13fa..fe7500f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -318,6 +318,7 @@
* 2964 FIX: Deleting site having hosts assigned links to list of hosts now
* 2928 FIX: Fix display of rule set Do hardware/software Inventory...
* 3036 FIX: Bulk discovery steps are now timing out short before HTTP request timeout...
+ * 3038 FIX: Fixed invalid error message when creating service group assignment rule without having service groups
Notifications:
* 2811 Mail notifications: Now able to add Host/Service Notes Url...
diff --git a/web/htdocs/valuespec.py b/web/htdocs/valuespec.py
index f70ee07..187a491 100644
--- a/web/htdocs/valuespec.py
+++ b/web/htdocs/valuespec.py
@@ -3106,6 +3106,14 @@ class ElementSelection(ValueSpec):
ValueSpec.custom_validate(self, value, varprefix)
def validate_datatype(self, value, varprefix):
+ self.load_elements()
+ # When no elements exists the default value is None and e.g. in wato.mode_edit_rule()
+ # handed over to validate_datatype() before rendering the input form. Disable the
+ # validation in this case to prevent validation errors. A helpful message is shown
+ # during render_input()
+ if len(self._elements) == 0 and value == None:
+ return
+
if type(value) != str:
raise MKUserError(varprefix, _("The datatype must be str (string), but is %s") % type_name(value))
Module: check_mk
Branch: master
Commit: 3240e2270ea0d7c0ada63f648a79a6180e0e3d26
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3240e2270ea0d7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 29 13:23:22 2016 +0100
#3037 FIX Terminate datasource programs when check timeout occurs
When using datasource programs, e.g. for checking by SSH, the Check_MK
process could be terminated by a reached timeout leaving the launched
subprocesses open. This might have caused in processes being too long
open, running and consuming resources.
The datasource program process and it's sub processes are now cleaned
up when a check timeout occures.
---
.werks/3037 | 15 +++++++++++++++
ChangeLog | 1 +
modules/check_mk_base.py | 6 +++++-
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/.werks/3037 b/.werks/3037
new file mode 100644
index 0000000..e843806
--- /dev/null
+++ b/.werks/3037
@@ -0,0 +1,15 @@
+Title: Terminate datasource programs when check timeout occurs
+Level: 2
+Component: core
+Compatible: compat
+Version: 1.2.7i4
+Date: 1454069860
+Class: fix
+
+When using datasource programs, e.g. for checking by SSH, the Check_MK
+process could be terminated by a reached timeout leaving the launched
+subprocesses open. This might have caused in processes being too long
+open, running and consuming resources.
+
+The datasource program process and it's sub processes are now cleaned
+up when a check timeout occures.
diff --git a/ChangeLog b/ChangeLog
index ecd02aa..87e13fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -14,6 +14,7 @@
* 2894 FIX: Fixed broken cluster checks when using Nagios core...
* 2926 FIX: Fix exception in WATO when a check man page has not catalog entry
* 2944 FIX: Fixed exception during config activation having clusters with unresolvable node IP addresses
+ * 3037 FIX: Terminate datasource programs when check timeout occurs...
Checks & Agents:
* 2434 NetApp monitoring: Cluster-Mode is now supported, changes in existing 7Mode checks...
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 995e457..eef1b9c 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -772,10 +772,14 @@ def get_agent_info_program(commandline):
vverbose("Calling external program %s\n" % commandline)
try:
- p = subprocess.Popen(commandline, shell = True, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
+ p = subprocess.Popen(commandline, shell = True, stdout = subprocess.PIPE,
+ stderr = subprocess.PIPE, preexec_fn=os.setsid)
stdout, stderr = p.communicate()
exitstatus = p.returncode
except MKTimeout:
+ # On timeout exception try to stop the process to prevent child process "leakage"
+ if p:
+ os.killpg(os.getpgid(p.pid), signal.SIGTERM)
raise
except Exception, e: