Module: check_mk
Branch: master
Commit: e56f5d8f63e0a3d0ef3704781d260cfb736d3a3f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e56f5d8f63e0a3…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Apr 4 13:47:22 2014 +0200
FIX FIX: correctly show original state in HTML notification mails
This fix is relevant if you have the maximum check attempts > 1.
---
.werks/753 | 9 +++++++++
ChangeLog | 1 +
notifications/mail | 8 ++++----
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/.werks/753 b/.werks/753
new file mode 100644
index 0000000..43cd61b
--- /dev/null
+++ b/.werks/753
@@ -0,0 +1,9 @@
+Title: FIX: correctly show original state in HTML notification mails
+Level: 1
+Component: notifications
+Class: fix
+State: unknown
+Version: 1.2.5i3
+Date: 1396612003
+
+This fix is relevant if you have the maximum check attempts > 1.
diff --git a/ChangeLog b/ChangeLog
index ad0bdd2..e6e93c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,7 @@
Notifications:
* 0752 FIX: FIX: compute correct state transitions for notifications...
+ * 0753 FIX: FIX: correctly show original state in HTML notification mails...
Livestatus:
* 0747 FIX: livestatus table hostsbygroup: fixed bug with group_authorization
strict...
diff --git a/notifications/mail b/notifications/mail
index c83c3b2..f3aad46 100755
--- a/notifications/mail
+++ b/notifications/mail
@@ -158,7 +158,7 @@ tmpl_host_txt = '''
Host: $HOSTNAME$ ($HOSTALIAS$)
Address: $HOSTADDRESS$
$HOSTLINK$
-State: $LASTHOSTSTATE$ -> $HOSTSTATE$ ($NOTIFICATIONTYPE$) since
$LASTHOSTSTATECHANGE_REL$
+State: $PREVIOUSHOSTHARDSTATE$ -> $HOSTSTATE$ ($NOTIFICATIONTYPE$) since
$LASTHOSTSTATECHANGE_REL$
Output: $HOSTOUTPUT$
Perfdata: $HOSTPERFDATA$
$LONGHOSTOUTPUT$
@@ -183,7 +183,7 @@ tmpl_host_html = tmpl_head_html + '''
<tr class="odd0">
<td class=left>State</td>
<td class="state">
- <span class="hstate$LASTHOSTSTATE$">$LASTHOSTSTATE$</span>
→
+ <span
class="hstate$PREVIOUSHOSTHARDSTATE$">$PREVIOUSHOSTHARDSTATE$</span>
→
<span class="hstate$HOSTSTATEID$">$HOSTSTATE$
($NOTIFICATIONTYPE$)</span>
since $LASTHOSTSTATECHANGE_REL$
</td>
@@ -206,7 +206,7 @@ Host: $HOSTNAME$ ($HOSTALIAS$)
Address: $HOSTADDRESS$$HOSTLINK$
Service: $SERVICEDESC$$SERVICELINK$
-State: $LASTSERVICESTATE$ -> $SERVICESTATE$ ($NOTIFICATIONTYPE$) since
$LASTSERVICESTATECHANGE_REL$
+State: $PREVIOUSSERVICEHARDSTATE$ -> $SERVICESTATE$ ($NOTIFICATIONTYPE$) since
$LASTSERVICESTATECHANGE_REL$
Output: $SERVICEOUTPUT$
Perfdata: $SERVICEPERFDATA$
$LONGSERVICEOUTPUT$
@@ -235,7 +235,7 @@ tmpl_service_html = tmpl_head_html + '''
<tr class="odd0">
<td class=left>State</td>
<td class="state">
- <span
class="state$LASTSERVICESTATE$">$LASTSERVICESTATE$</span> →
+ <span
class="state$PREVIOUSSERVICEHARDSTATE$">$PREVIOUSSERVICEHARDSTATE$</span>
→
<span class="state$SERVICESTATEID$">$SERVICESTATE$
($NOTIFICATIONTYPE$)</span>
since $LASTSERVICESTATECHANGE_REL$
</td>