Module: check_mk
Branch: master
Commit: e9b526f51c0e6a967478a52983604182374ec599
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e9b526f51c0e6a…
Author: Tom Baerwinkel <tb(a)mathias-kettner.de>
Date: Thu Jun 22 11:39:46 2017 +0200
4809 Display the OMD Site and Host Tags in HTML Emails
The OMD Site and Host Tags can be shown optionally in HTML Emails.
By default the information is not displayed. To show the information
it can be enabled under "Host and Service Parameters" or per rule
in the Notifications menu.
Change-Id: I4e0272410902fcb428b2538fb60dedbe9288e02b
---
.werks/4809 | 14 ++++++++++++++
notifications/mail | 8 ++++++++
web/plugins/wato/notifications.py | 2 ++
3 files changed, 24 insertions(+)
diff --git a/.werks/4809 b/.werks/4809
new file mode 100644
index 0000000..d83459c
--- /dev/null
+++ b/.werks/4809
@@ -0,0 +1,14 @@
+Title: Display the OMD Site and Host Tags in HTML Emails
+Level: 1
+Component: notifications
+Compatible: compat
+Edition: cre
+Version: 1.5.0i1
+Date: 1498123688
+Class: feature
+
+The OMD Site and Host Tags can be shown optionally in HTML Emails.
+By default the information is not displayed. To show the information
+it can be enabled under "Host and Service Parameters" or per rule
+in the Notifications menu.
+
diff --git a/notifications/mail b/notifications/mail
index c5e4fa0..f51922e 100755
--- a/notifications/mail
+++ b/notifications/mail
@@ -312,6 +312,14 @@ body_elements = [
"$LONGDATETIME$",
"$LONGDATETIME$", ),
+ ( "omdsite", "both", False, "all", "OMD Site",
+ "$OMD_SITE$",
+ "$OMD_SITE$" ),
+
+ ( "hosttags", "both", False, "all", "Host
Tags",
+ "$HOST_TAGS$",
+ "$HOST_TAGS$" ),
+
( "notesurl", "both", False, "all", "Custom Host
Notes URL",
"$HOSTNOTESURL$",
"$HOSTNOTESURL$",),
diff --git a/web/plugins/wato/notifications.py b/web/plugins/wato/notifications.py
index 143afaf..213ac10 100644
--- a/web/plugins/wato/notifications.py
+++ b/web/plugins/wato/notifications.py
@@ -62,6 +62,8 @@ def html_email_parameter_elements():
ListChoice(
title = _("Information to be displayed in the email body"),
choices = [
+ ( "omdsite", _("OMD Site") ),
+ ( "hosttags", _("Tags of the Host") ),
( "address", _("IP Address of Host") ),
( "abstime", _("Absolute Time of Alert") ),
( "reltime", _("Relative Time of Alert") ),