forked from GithubBackups/healthchecks
Add the "Last Ping Type" field in the email notification template
This commit is contained in:
parent
26a7918b5b
commit
ca3d1d3a3b
@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
## Improvements
|
## Improvements
|
||||||
- Add tighter parameter checks in hc.front.views.serve_doc
|
- Add tighter parameter checks in hc.front.views.serve_doc
|
||||||
- Update OpsGenie instructions (#450)
|
- Update OpsGenie instructions (#450)
|
||||||
|
- Update the email notification template to include more check and last ping details
|
||||||
|
|
||||||
## v1.18.0 - 2020-12-09
|
## v1.18.0 - 2020-12-09
|
||||||
|
|
||||||
|
@ -47,16 +47,6 @@
|
|||||||
<b>Schedule</b><br>
|
<b>Schedule</b><br>
|
||||||
<code>{{ check.schedule }}</code>
|
<code>{{ check.schedule }}</code>
|
||||||
</td>
|
</td>
|
||||||
{% if trttr %}Yo!{% endif %}
|
|
||||||
{{ trtr|safe }} {% cycle trtr %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if ping %}
|
|
||||||
<td style="padding-right: 32px; padding-bottom: 8px; vertical-align: top;">
|
|
||||||
<b>Last Ping</b><br>
|
|
||||||
{{ ping.created|naturaltime }}{% if ping.remote_addr %}, from {{ ping.remote_addr }}{% endif %}
|
|
||||||
</td>
|
|
||||||
{% if trttr %}Yo!{% endif %}
|
|
||||||
{{ trtr|safe }} {% cycle trtr %}
|
{{ trtr|safe }} {% cycle trtr %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@ -66,9 +56,46 @@
|
|||||||
{% if check.created %}(since {{ check.created|date:'M j, Y' }}){% endif %}
|
{% if check.created %}(since {{ check.created|date:'M j, Y' }}){% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
{% if ping %}
|
||||||
|
<tr>
|
||||||
|
<td style="padding-right: 32px; padding-bottom: 8px; vertical-align: top;">
|
||||||
|
<b>Last Ping</b><br>
|
||||||
|
{{ ping.created|naturaltime }}{% if ping.remote_addr %}, from {{ ping.remote_addr }}{% endif %}
|
||||||
|
</td>
|
||||||
|
<td style="padding-right: 32px; padding-bottom: 8px; vertical-align: top;">
|
||||||
|
<b>Last Ping Type</b><br>
|
||||||
|
{% if ping.exitstatus > 0 %}
|
||||||
|
<span style="background-color: #f2dede; color: #333333; padding-left: 4px; padding-right: 4px; border-radius: 2px;">
|
||||||
|
Exit status {{ ping.exitstatus }}
|
||||||
|
</span>
|
||||||
|
{% elif ping.exitstatus == 0 %}
|
||||||
|
<span style="background-color: #dff0d8; color: #333333; padding-left: 4px; padding-right: 4px; border-radius: 2px;">
|
||||||
|
Exit status 0
|
||||||
|
</span>
|
||||||
|
{% elif ping.kind == "fail" %}
|
||||||
|
<span style="background-color: #f2dede; color: #333333; padding-left: 4px; padding-right: 4px; border-radius: 2px;">
|
||||||
|
Failure
|
||||||
|
</span>
|
||||||
|
{% elif ping.kind == "start" %}
|
||||||
|
<span style="background-color: #dff0d8; color: #333333; padding-left: 4px; padding-right: 4px; border-radius: 2px;">
|
||||||
|
Started
|
||||||
|
</span>
|
||||||
|
{% elif ping.kind == "ign" %}
|
||||||
|
<span style="background-color: #eeeeee; color: #333333; padding-left: 4px; padding-right: 4px; border-radius: 2px;">
|
||||||
|
Ignored
|
||||||
|
</span>
|
||||||
|
{% else %}
|
||||||
|
<span style="background-color: #dff0d8; color: #333333; padding-left: 4px; padding-right: 4px; border-radius: 2px;">
|
||||||
|
Success
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{% if ping.body %}
|
{% if ping and ping.body %}
|
||||||
<p><b>Last Ping Body</b></p>
|
<p><b>Last Ping Body</b></p>
|
||||||
<pre>{{ ping.body|slice:":10000"|linebreaksbr }}{% if ping.body|length > 10000 %} [truncated]{% endif %}</pre>
|
<pre>{{ ping.body|slice:":10000"|linebreaksbr }}{% if ping.body|length > 10000 %} [truncated]{% endif %}</pre>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user