Module: check_mk
Branch: master
Commit: 2a2f9ebbb85b3788d118dac94c7f967eb1045382
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2a2f9ebbb85b37…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Mar 15 11:14:58 2013 +0100
notify.py: unique spoolfiles name no longer created with uuid
---
ChangeLog | 3 +++
modules/notify.py | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 04de6e9..fbcab31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -51,6 +51,9 @@
* mem.include: Linux memory check now includes size of page tables. This
can be important e.g. on ORACLE systems with a lot of memory
+ Notifications:
+ * notify.py: unique spoolfiles name no longer created with uuid
+
Livestatus:
* Table statehist: Improved detection of vanished hosts and services.
Now able to detect and remove nonsense check plugin output
diff --git a/modules/notify.py b/modules/notify.py
index 28c100c..8dc5b80 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -34,7 +34,7 @@
# hostname, servicedesc, hoststate, servicestate, output in
# the form %(variable)s
-import pprint, uuid
+import pprint
# Default settings
notification_logdir = var_dir + "/notify"
@@ -201,7 +201,7 @@ def create_spoolfile(data):
target_dir = "%s/%s" % (notification_spooldir, contactname)
if not os.path.exists(target_dir):
os.makedirs(target_dir)
- file_path = "%s/%0.2f_%s" % (target_dir, time.time(), uuid.uuid1())
+ file_path = "%s/%0.8f" % (target_dir, time.time())
notify_log("Creating spoolfile: %s" % file_path)
file(file_path,"w").write(pprint.pformat(data))