Module: check_mk
Branch: master
Commit: 38c0170c9b35cf8a76676e9ae94d295bf212b8a7
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=38c0170c9b35cf…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Sep 2 16:23:27 2014 +0200
html mail: Added Acknowledgement Author and Comment as option for html mails
---
notifications/mail | 21 +++++++++++++++++++++
web/plugins/wato/notifications.py | 2 ++
2 files changed, 23 insertions(+)
diff --git a/notifications/mail b/notifications/mail
index 39603ed..a97e3d5 100755
--- a/notifications/mail
+++ b/notifications/mail
@@ -220,6 +220,14 @@ body_elements = [
"$HOSTOUTPUT$",
"$HOSTOUTPUT$",),
+ ( "ack_author", "host", False, "Acknowledge Author",
+ "$HOSTACKAUTHORNAME$",
+ "$HOSTACKAUTHORNAME$",),
+
+ ( "ack_comment", "host", False, "Acknowledge Comment",
+ "$HOSTACKCOMMENT$",
+ "$HOSTACKCOMMENT$",),
+
( "perfdata", "host", False, "Performance Data",
"$HOSTPERFDATA$",
"$HOSTPERFDATA$",),
@@ -238,6 +246,18 @@ body_elements = [
"$LONGSERVICEOUTPUT$",
"$LONGSERVICEOUTPUT$",),
+ ( "ack_author", "host", False, "Acknowledge Author",
+ "$SERVICEACKAUTHOR$",
+ "$SERVICEACKAUTHOR$",),
+
+ ( "ack_comment", "host", False, "Acknowledge Comment",
+ "$SERVICEACKCOMMENT$",
+ "$SERVICEACKCOMMENT$",),
+
+ ( "perfdata", "host", False, "Performance Data",
+ "$HOSTPERFDATA$",
+ "$HOSTPERFDATA$",),
+
( "perfdata", "service", False, "Performance Data",
"$SERVICEPERFDATA$",
"$SERVICEPERFDATA$",),
@@ -431,6 +451,7 @@ def construct_content(context):
html_info = "Downtime " + what + " (while " + html_state +
")"
elif notification_type == "ACKNOWLEDGEMENT":
+
txt_info = "Acknowledged ($@SHORTSTATE$)"
html_info = "Acknowledged (while " + html_state + ")"
diff --git a/web/plugins/wato/notifications.py b/web/plugins/wato/notifications.py
index 318dd53..b120dd1 100644
--- a/web/plugins/wato/notifications.py
+++ b/web/plugins/wato/notifications.py
@@ -67,6 +67,8 @@ register_notification_parameters("mail",
( "abstime", _("Absolute Time of Alert") ),
( "reltime", _("Relative Time of Alert") ),
( "longoutput", _("Additional Plugin Output")
),
+ ( "ack_author", _("Acknowledgement Author") ),
+ ( "ack_comment", _("Acknowledgement Comment")
),
( "perfdata", _("Performance Data") ),
( "graph", _("Performance Graphs") ),
],