Module: check_mk
Branch: master
Commit: f65be6e5a851ef28bb46d7375e103496c09693cb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f65be6e5a851ef…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Apr 9 14:27:37 2015 +0200
#2194 FIX Avoid new discovered checks from being used without config reload
---
.werks/2194 | 10 ++++++++++
ChangeLog | 1 +
modules/discovery.py | 2 ++
3 files changed, 13 insertions(+)
diff --git a/.werks/2194 b/.werks/2194
new file mode 100644
index 0000000..5d2bc1a
--- /dev/null
+++ b/.werks/2194
@@ -0,0 +1,10 @@
+Title: Avoid new discovered checks from being used without config reload
+Level: 1
+Component: core
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1428582353
+
+
diff --git a/ChangeLog b/ChangeLog
index ee65b76..14435e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -22,6 +22,7 @@
* 2089 FIX: Debug mode shows details about errors in autochecks as expected now
* 2093 FIX: Fixed handling of check_mk commandline parameter "-c"
* 2187 FIX: Avoid CLOSE_WAIT sockets for agent connection in case of timeouts...
+ * 2194 FIX: Avoid new discovered checks from being used without config reload
Checks & Agents:
* 1665 agent_netapp: New special agent for NetApp monitoring via Web-API...
diff --git a/modules/discovery.py b/modules/discovery.py
index 222756f..64e0733 100644
--- a/modules/discovery.py
+++ b/modules/discovery.py
@@ -845,6 +845,8 @@ def save_autochecks_file(hostname, items):
if not os.path.exists(autochecksdir):
os.makedirs(autochecksdir)
filepath = autochecksdir + "/" + hostname + ".mk"
+ if os.path.exists(filepath):
+ os.remove(filepath)
out = file(filepath, "w")
out.write("[\n")
for entry in items: