Module: check_mk
Branch: master
Commit: 311d36da1e0d684036a311a81449e5d63fb86f8e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=311d36da1e0d68…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Sep 2 13:34:25 2013 +0200
HTML notifications: Added time of state change
---
ChangeLog | 1 +
notifications/mail | 16 ++++++++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 40bb853..969d2c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -81,6 +81,7 @@
* HTML notifications: Now adding optional links to host- and service names
when second argument notification script is configured to the base url of the
monitoring installation (e.g. http://<host>/<site>/ in case of OMD
setups)
+ * HTML notifications: Added time of state change
Multisite:
* User accounts can now be locked after a specified amount of auth
diff --git a/notifications/mail b/notifications/mail
index 01bbf08..08b6858 100755
--- a/notifications/mail
+++ b/notifications/mail
@@ -175,7 +175,7 @@ tmpl_host_txt = '''
Host: $HOSTNAME$ ($HOSTALIAS$)
Address: $HOSTADDRESS$
$HOSTLINK$
-State: $LASTHOSTSTATE$ -> $HOSTSTATE$ ($NOTIFICATIONTYPE$)
+State: $LASTHOSTSTATE$ -> $HOSTSTATE$ ($NOTIFICATIONTYPE$) since
$LASTHOSTSTATECHANGE_REL$
Output: $HOSTOUTPUT$
Perfdata: $HOSTPERFDATA$
$LONGHOSTOUTPUT$
@@ -199,7 +199,11 @@ tmpl_host_html = tmpl_head_html + '''
</tr>
<tr class="data odd0">
<td class=left>State</td>
- <td class="state hstate"><span
class="hstate$LASTHOSTSTATE$">$LASTHOSTSTATE$>/span> →
<span class="hstate$HOSTSTATEID$">$HOSTSTATE$
($NOTIFICATIONTYPE$)</span></td>
+ <td class="state hstate">
+ <span class="hstate$LASTHOSTSTATE$">$LASTHOSTSTATE$>/span>
→
+ <span class="hstate$HOSTSTATEID$">$HOSTSTATE$
($NOTIFICATIONTYPE$)</span>
+ since $LASTHOSTSTATECHANGE_REL$
+ </td>
</tr>
<tr class="data even0">
<td class="left">Output</td>
@@ -219,7 +223,7 @@ Host: $HOSTNAME$ ($HOSTALIAS$)
Address: $HOSTADDRESS$$HOSTLINK$
Service: $SERVICEDESC$$SERVICELINK$
-State: $LASTSERVICESTATE$ -> $SERVICESTATE$ ($NOTIFICATIONTYPE$)
+State: $LASTSERVICESTATE$ -> $SERVICESTATE$ ($NOTIFICATIONTYPE$) since
$LASTSERVICESTATECHANGE_REL$
Output: $SERVICEOUTPUT$
Perfdata: $SERVICEPERFDATA$
$LONGSERVICEOUTPUT$
@@ -247,7 +251,11 @@ tmpl_service_html = tmpl_head_html + '''
</tr>
<tr class="data odd0">
<td class=left>State</td>
- <td class="state svcstate"><span
class="state$LASTSERVICESTATE$">$LASTSERVICESTATE$</span> →
<span class="state$SERVICESTATEID$">$SERVICESTATE$
($NOTIFICATIONTYPE$)</span></td>
+ <td class="state svcstate">
+ <span
class="state$LASTSERVICESTATE$">$LASTSERVICESTATE$</span> →
+ <span class="state$SERVICESTATEID$">$SERVICESTATE$
($NOTIFICATIONTYPE$)</span>
+ since $LASTSERVICESTATECHANGE_REL$
+ </td>
</tr>
<tr class="data even0">
<td class="left">Output</td>