Module: check_mk
Branch: master
Commit: f27d68adabf1887b21832aa47512ac5a7aeeb652
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f27d68adabf188…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Nov 22 16:25:39 2012 +0100
Fix flexible notifications on non-OMD systems
---
ChangeLog | 3 +++
modules/notify.py | 8 ++++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7465922..9c8f62a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
1.2.1i4:
+ Notifications:
+ * Fix flexible notifications on non-OMD systems
+
Checks & Agents:
* Linux Agent, mk_postgres: Supporting pgsql and postgres as user
* Linux Agent, mk_postgres: Fixed database stats query to be compatible
diff --git a/modules/notify.py b/modules/notify.py
index a258034..600d594 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -255,9 +255,13 @@ def call_notification_script(plugin, parameters):
os.putenv(name, "")
# Call actual script without any arguments
- path = local_notifications_dir + "/" + plugin
- if not os.path.exists(path):
+ if local_notifications_dir:
+ path = local_notifications_dir + "/" + plugin
+ if not os.path.exists(path):
+ path = notifications_dir + "/" + plugin
+ else:
path = notifications_dir + "/" + plugin
+
if not os.path.exists(path):
notify_log("Notification plugin '%s' not found" % plugin)
notify_log(" not in %s" % notifications_dir)