Module: check_mk
Branch: master
Commit: 0afd701b3ea763ae4930c462ba0b9e1412378436
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0afd701b3ea763…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Sun Jun 15 15:39:03 2014 +0200
FIX Fixed keepalive termination in case of exceptions during checking
For example regular appearing exceptions like "Cannot resolve hostname..." were
terminating the keepalive instance. This restart of the keepalive process is not
expected to be done in such situations.
---
.werks/819 | 10 ++++++++++
ChangeLog | 1 +
modules/check_mk.py | 2 ++
3 files changed, 13 insertions(+)
diff --git a/.werks/819 b/.werks/819
new file mode 100644
index 0000000..f85191a
--- /dev/null
+++ b/.werks/819
@@ -0,0 +1,10 @@
+Title: Fixed keepalive termination in case of exceptions during checking
+Level: 1
+Component: checks
+Version: 1.2.5i4
+Date: 1402839420
+Class: fix
+
+For example regular appearing exceptions like "Cannot resolve hostname..."
were
+terminating the keepalive instance. This restart of the keepalive process is not
+expected to be done in such situations.
diff --git a/ChangeLog b/ChangeLog
index b4b2e93..6676490 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
* 0619 adva_fsp_temp: new check to monitor temperature and temperature trends on ADVA
scalable optical transport solutions
* 0616 FIX: brocade.fan, brocade.power, brocade.temp: will now only discover services
which are not marked as absent
* 0992 FIX: zfs_arc_cache: returns OK even if values of arc meta are missing...
+ * 0819 FIX: Fixed keepalive termination in case of exceptions during checking...
Multisite:
* 0934 FIX: Logwatch messages with class unknown ( 'u' ) now displayed as
WARN...
diff --git a/modules/check_mk.py b/modules/check_mk.py
index d7f4e3c..86dfb29 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -5492,6 +5492,8 @@ def do_check_keepalive():
sys.stderr.write("WARNING: new variable appeared: %s" %
", ".join(new_vars))
except Exception, e:
+ signal.signal(signal.SIGALRM, signal.SIG_IGN) # Prevent ALRM from
CheckHelper.cc
+ signal.alarm(0)
if opt_debug:
raise
total_check_output = "UNKNOWN - %s\n" % e