forked from GithubBackups/healthchecks
Title tags for documentation pages.
This commit is contained in:
parent
564f69aca5
commit
e2fe2edcc1
@ -283,6 +283,7 @@ def serve_doc(request, doc="introduction"):
|
||||
"section": "home",
|
||||
"section": doc,
|
||||
"content": content,
|
||||
"first_line": content.split("\n")[0],
|
||||
}
|
||||
|
||||
return render(request, "front/docs_single.html", ctx)
|
||||
|
@ -53,15 +53,15 @@ minimizes the delay from your monitored service failing to you receiving an aler
|
||||
</pre></div>
|
||||
|
||||
|
||||
<div class="highlight"><pre><span></span><span class="nt">HTTP</span><span class="o">/</span><span class="nt">1</span><span class="p">.</span><span class="nc">1</span> <span class="nt">200</span> <span class="nt">OK</span>
|
||||
<span class="nt">Server</span><span class="o">:</span> <span class="nt">nginx</span>
|
||||
<span class="nt">Date</span><span class="o">:</span> <span class="nt">Wed</span><span class="o">,</span> <span class="nt">29</span> <span class="nt">Jan</span> <span class="nt">2020</span> <span class="nt">09</span><span class="p">:</span><span class="nd">58</span><span class="p">:</span><span class="nd">23</span> <span class="nt">GMT</span>
|
||||
<span class="nt">Content-Type</span><span class="o">:</span> <span class="nt">text</span><span class="o">/</span><span class="nt">plain</span><span class="o">;</span> <span class="nt">charset</span><span class="o">=</span><span class="nt">utf-8</span>
|
||||
<span class="nt">Content-Length</span><span class="o">:</span> <span class="nt">2</span>
|
||||
<span class="nt">Connection</span><span class="o">:</span> <span class="nt">close</span>
|
||||
<span class="nt">Access-Control-Allow-Origin</span><span class="o">:</span> <span class="o">*</span>
|
||||
<div class="highlight"><pre><span></span><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">200</span> <span class="ne">OK</span>
|
||||
<span class="na">Server</span><span class="o">:</span> <span class="l">nginx</span>
|
||||
<span class="na">Date</span><span class="o">:</span> <span class="l">Wed, 29 Jan 2020 09:58:23 GMT</span>
|
||||
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">text/plain; charset=utf-8</span>
|
||||
<span class="na">Content-Length</span><span class="o">:</span> <span class="l">2</span>
|
||||
<span class="na">Connection</span><span class="o">:</span> <span class="l">close</span>
|
||||
<span class="na">Access-Control-Allow-Origin</span><span class="o">:</span> <span class="l">*</span>
|
||||
|
||||
<span class="nt">OK</span>
|
||||
OK
|
||||
</pre></div>
|
||||
|
||||
|
||||
@ -82,13 +82,13 @@ optional but enables a few extra features:</p>
|
||||
</pre></div>
|
||||
|
||||
|
||||
<div class="highlight"><pre><span></span><span class="nt">HTTP</span><span class="o">/</span><span class="nt">1</span><span class="p">.</span><span class="nc">1</span> <span class="nt">200</span> <span class="nt">OK</span>
|
||||
<span class="nt">Server</span><span class="o">:</span> <span class="nt">nginx</span>
|
||||
<span class="nt">Date</span><span class="o">:</span> <span class="nt">Wed</span><span class="o">,</span> <span class="nt">29</span> <span class="nt">Jan</span> <span class="nt">2020</span> <span class="nt">09</span><span class="p">:</span><span class="nd">58</span><span class="p">:</span><span class="nd">23</span> <span class="nt">GMT</span>
|
||||
<span class="nt">Content-Type</span><span class="o">:</span> <span class="nt">text</span><span class="o">/</span><span class="nt">plain</span><span class="o">;</span> <span class="nt">charset</span><span class="o">=</span><span class="nt">utf-8</span>
|
||||
<span class="nt">Content-Length</span><span class="o">:</span> <span class="nt">2</span>
|
||||
<span class="nt">Connection</span><span class="o">:</span> <span class="nt">close</span>
|
||||
<span class="nt">Access-Control-Allow-Origin</span><span class="o">:</span> <span class="o">*</span>
|
||||
<div class="highlight"><pre><span></span><span class="kr">HTTP</span><span class="o">/</span><span class="m">1.1</span> <span class="m">200</span> <span class="ne">OK</span>
|
||||
<span class="na">Server</span><span class="o">:</span> <span class="l">nginx</span>
|
||||
<span class="na">Date</span><span class="o">:</span> <span class="l">Wed, 29 Jan 2020 09:58:23 GMT</span>
|
||||
<span class="na">Content-Type</span><span class="o">:</span> <span class="l">text/plain; charset=utf-8</span>
|
||||
<span class="na">Content-Length</span><span class="o">:</span> <span class="l">2</span>
|
||||
<span class="na">Connection</span><span class="o">:</span> <span class="l">close</span>
|
||||
<span class="na">Access-Control-Allow-Origin</span><span class="o">:</span> <span class="l">*</span>
|
||||
|
||||
<span class="nt">OK</span>
|
||||
OK
|
||||
</pre></div>
|
@ -63,7 +63,7 @@ GET /5bf66975-d4c7-4bf5-bcc8-b8d8a82ea278/fail HTTP/1.0
|
||||
Host: hc-ping.com
|
||||
```
|
||||
|
||||
```
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Server: nginx
|
||||
Date: Wed, 29 Jan 2020 09:58:23 GMT
|
||||
@ -94,7 +94,7 @@ GET /5bf66975-d4c7-4bf5-bcc8-b8d8a82ea278/start HTTP/1.0
|
||||
Host: hc-ping.com
|
||||
```
|
||||
|
||||
```
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Server: nginx
|
||||
Date: Wed, 29 Jan 2020 09:58:23 GMT
|
||||
|
@ -1,4 +1,4 @@
|
||||
<h1>SITE_NAME</h1>
|
||||
<h1>SITE_NAME Documentation</h1>
|
||||
<p>SITE_NAME is a service for monitoring cron jobs and similar periodic processes:</p>
|
||||
<ul>
|
||||
<li>SITE_NAME <strong>listens for HTTP requests ("pings")</strong> from services being monitored.</li>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# SITE_NAME
|
||||
# SITE_NAME Documentation
|
||||
|
||||
SITE_NAME is a service for monitoring cron jobs and similar periodic processes:
|
||||
|
||||
|
@ -38,15 +38,16 @@ increasingly important as you add more checks to your account.</p>
|
||||
<p>Take note of your check's unique <strong>ping URL</strong></p>
|
||||
</li>
|
||||
</ol>
|
||||
<p>Finally, edit your crontab and append a curl or wget call after the command:</p>
|
||||
<p>Finally, edit your cron job definition and append a curl or wget call
|
||||
after the command:</p>
|
||||
<div class="highlight"><pre><span></span>$ crontab -e
|
||||
<span class="c1"># m h dom mon dow command</span>
|
||||
<span class="m">8</span> <span class="m">6</span> * * * /home/user/backup.sh <span class="o">&&</span> curl -fsS --retry <span class="m">3</span> PING_URL > /dev/null
|
||||
</pre></div>
|
||||
|
||||
|
||||
<p>Now, each time your cron job runs, it will send a HTTP request to the ping URL.</p>
|
||||
<p>Since SITE_NAME knows the schedule of your cron job, it can calculate
|
||||
<p>Now, each time your cron job runs, it will send a HTTP request to the ping URL.
|
||||
Since SITE_NAME knows the schedule of your cron job, it can calculate
|
||||
the dates and times when the job should run. As soon as your cron job doesn't
|
||||
report at an expected time, SITE_NAME will send you a notification.</p>
|
||||
<p>This monitoring technique takes care of various failure scenarios that could
|
||||
|
@ -35,7 +35,8 @@ increasingly important as you add more checks to your account.
|
||||
|
||||
1. Take note of your check's unique **ping URL**
|
||||
|
||||
Finally, edit your crontab and append a curl or wget call after the command:
|
||||
Finally, edit your cron job definition and append a curl or wget call
|
||||
after the command:
|
||||
|
||||
```bash
|
||||
$ crontab -e
|
||||
@ -44,7 +45,6 @@ $ crontab -e
|
||||
```
|
||||
|
||||
Now, each time your cron job runs, it will send a HTTP request to the ping URL.
|
||||
|
||||
Since SITE_NAME knows the schedule of your cron job, it can calculate
|
||||
the dates and times when the job should run. As soon as your cron job doesn't
|
||||
report at an expected time, SITE_NAME will send you a notification.
|
||||
|
@ -1,16 +1,13 @@
|
||||
{% extends "front/base_docs.html" %}
|
||||
{% load compress static hc_extras %}
|
||||
|
||||
{% block title %}Documentation - {% site_name %}{% endblock %}
|
||||
{% block description %}
|
||||
<meta name="description" content="Monitor any service that can make a HTTP request or send an email: cron jobs, Bash scripts, Python, Ruby, Node, PHP, JS, ...">
|
||||
{% endblock %}
|
||||
{% block keywords %}
|
||||
<meta name="keywords" content="healthchecks, crontab monitoring, python health check, bash health check, cron monitoring, cron tutorial, cron howto, api health check, open source">
|
||||
{% endblock %}
|
||||
{% block title %}{{ first_line|striptags }} - {% site_name %}{% endblock %}
|
||||
{% block description %}{% endblock %}
|
||||
{% block keywords %}{% endblock %}
|
||||
|
||||
|
||||
{% block docs_content %}<div class="docs-content">{{ content|safe }}</div>{% endblock %}
|
||||
{% block docs_content %}
|
||||
<div class="docs-content">{{ content|safe }}</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
{% compress js %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user