Module: check_mk
Branch: master
Commit: 3f4963b9a941b7f6319a8d09db65b02518781981
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3f4963b9a941b7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 18 11:28:27 2013 +0100
Improved flexible notification handling
* Flexibile notifications: removed "debug notification" script from GUI (you
can make it
executable to be choosable again)
* Flexibile notifications: added plain mail notification which uses the
mail templates from global settings dialog
---
ChangeLog | 4 ++++
modules/notify.py | 5 ++++-
web/htdocs/wato.py | 3 ++-
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 938a009..8a5af39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -52,6 +52,10 @@
* Added valuespec for cisco_mem check to configure thresholds via WATO
* FIX: Fixed displaying of tag selections when creating a rule in the ruleeditor
* FIX: Rulesets are always cloned in the same folder
+ * Flexibile notifications: removed "debug notification" script from GUI
(you make it
+ executable to be choosable again)
+ * Flexibile notifications: added plain mail notification which uses the
+ mail templates from global settings dialog
BI:
* Added FOREACH_SERVICE capability to leaf nodes
diff --git a/modules/notify.py b/modules/notify.py
index 5ca0b87..db92845 100644
--- a/modules/notify.py
+++ b/modules/notify.py
@@ -364,7 +364,10 @@ def notify_flexible(contact, context, notification_table):
notify_log(" - Skipping: time period %s is currently not
active" % timeperiod)
continue
- call_notification_script(plugin, entry.get("parameters", []), context)
+ if plugin is None:
+ notify_via_email(context)
+ else:
+ call_notification_script(plugin, entry.get("parameters", []),
context)
def call_notification_script(plugin, parameters, context):
diff --git a/notifications/debug b/notifications/debug
old mode 100755
new mode 100644
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 5254540..fae9b2c 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7596,6 +7596,7 @@ def load_notification_scripts():
except:
pass
choices = scripts.items()
+ choices.append((None, _("Plain Text Email (using configured templates)")))
choices.sort(cmp = lambda a,b: cmp(a[1], b[1]))
return choices
@@ -7608,7 +7609,7 @@ vs_notification_method = \
CascadingDropdown(
title = _("Notification Method"),
choices = [
- ( "email", _("Send Email") ),
+ ( "email", _("Plain Text Email (using configured
templates)") ),
( "flexible",
_("Flexible Custom Notifications"),
ListOf(