Module: check_mk
Branch: master
Commit: aa18f558fd430adf059b0922f7a5f7194f3a6a6f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=aa18f558fd430a…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Dec 14 10:52:57 2015 +0100
#2811 Mail notifications: Now able to add Host/Service Notes Url
You can now configure to add the host/service notes url to the email body.
---
.werks/2811 | 9 +++++++++
ChangeLog | 1 +
notifications/mail | 9 ++++++++-
web/plugins/wato/notifications.py | 1 +
4 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/.werks/2811 b/.werks/2811
new file mode 100644
index 0000000..2563a5e
--- /dev/null
+++ b/.werks/2811
@@ -0,0 +1,9 @@
+Title: Mail notifications: Now able to add Host/Service Notes Url
+Level: 1
+Component: notifications
+Compatible: compat
+Version: 1.2.7i4
+Date: 1450086609
+Class: feature
+
+You can now configure to add the host/service notes url to the email body.
diff --git a/ChangeLog b/ChangeLog
index a60cfa2..a8a6700 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -206,6 +206,7 @@
* 2779 FIX: Fix moving of folders...
Notifications:
+ * 2811 Mail notifications: Now able to add Host/Service Notes Url...
* 2728 FIX: Removed debug notification script (was not executable)...
* 2843 FIX: Hanging notification scripts could prevent all other notifications...
diff --git a/notifications/mail b/notifications/mail
index 6de3ca0..6e47b16 100755
--- a/notifications/mail
+++ b/notifications/mail
@@ -254,6 +254,10 @@ body_elements = [
"$LONGDATETIME$",
"$LONGDATETIME$", ),
+ ( "notesurl", "both", False, "Custom Host Notes Url",
+ "$HOSTNOTESURL$",
+ "$HOSTNOTESURL$",),
+
# Elements only for host notifications
( "reltime", "host", False, "Relative Time",
"$LASTHOSTSTATECHANGE_REL$",
@@ -275,7 +279,6 @@ body_elements = [
"$HOSTPERFDATA$",
"$HOSTPERFDATA$",),
-
# Elements only for service notifications
( "reltime", "service", False, "Relative Time",
"$LASTSERVICESTATECHANGE_REL$",
@@ -305,6 +308,10 @@ body_elements = [
"$SERVICEPERFDATA$",
"$SERVICEPERFDATA$",),
+ ( "notesurl", "service", False, "Custom Service Notes
Url",
+ "$SERVICENOTESURL$",
+ "$SERVICENOTESURL$",),
+
# Debugging
( "context", "both", False, "Complete variable list",
"$CONTEXT_ASCII$",
diff --git a/web/plugins/wato/notifications.py b/web/plugins/wato/notifications.py
index 15f6219..b6e3804 100644
--- a/web/plugins/wato/notifications.py
+++ b/web/plugins/wato/notifications.py
@@ -72,6 +72,7 @@ register_notification_parameters(
( "ack_comment", _("Acknowledgement Comment")
),
( "perfdata", _("Performance Data") ),
( "graph", _("Performance Graphs") ),
+ ( "notesurl", _("Custom Host/Service Notes
URL") ),
( "context", _("Complete variable list (for
testing)" ) ),
],
default_value = [ "perfdata", "graph",
"abstime", "address", "longoutput" ],