|
|
- {% extends "base.html" %}
- {% load staticfiles %}
-
- {% block title %}Documentation - healthchecks.io{% endblock %}
-
- {% block content %}
- <div class="row">
- <div class="col-sm-12">
- <h3>Summary</h3>
- <p>
- Each check you create in <a href="{% url 'hc-index' %}">My Checks</a>
- page has an unique "ping" URL. Whenever you access this URL,
- the "Last Ping" value of corresponding check is updated.
- </p>
- <p>When a certain amount of time passes since last received ping, the
- check is considered "late", and Health Checks sends an email alert.
- It is all very simple, really.</p>
-
- <h3>Executing a Ping</h3>
- <p>
- At the end of your batch job, add a bit of code to request
- one of your ping URLs.
- </p>
- <ul>
- <li>HTTP and HTTPS protocols both are fine</li>
- <li>Request method can be GET or POST</li>
- <li>It does not matter what request headers you send</li>
- <li>You can leave request body empty or put anything in it, it's all good</li>
- </ul>
-
- <p>The response will have status code "200 OK" and response body will be a
- short and simple string "OK".</p>
-
- <p>
- In bash scripts, you can use <code>wget</code> or <code>curl</code> to run the requests:
- </p>
- <pre>
- curl {{ ping_endpoint }}{uuid-goes-here}
- </pre>
-
- <h3>When Alerts Are Sent</h3>
- <p>
- Each check has a configurable <strong>Frequency</strong> parameter, with the default value of one day.
- For periodic tasks, this is the expected time gap between two runs.
- </p>
- <p>
- Additionally, each check has a <strong>Grace</strong> parameter, with default value of one hour.
- You can use this parameter to account for run time variance of tasks.
- For example, if a backup task completes in 50 seconds one day, and
- completes in 60 seconds the following day, you might not want to get
- alerted because the backups are 10 seconds late.
- </p>
- <p>Each check can be in one of the following states:</p>
-
- <table class="table">
- <tr>
- <td>
- <span class="glyphicon glyphicon-question-sign new"></span>
- </td>
- <td>
- <strong>New.</strong>
- A check that has been created, but has not received any pings yet.
- </td>
- </tr>
- <tr>
- <td>
- <span class="glyphicon glyphicon-ok-sign up"></span>
- </td>
- <td>
- <strong>Up.</strong>
- Time since last ping has not exceeded <strong>Frequency</strong>.
- </td>
- </tr>
- <tr>
- <td>
- <span class="glyphicon glyphicon-exclamation-sign grace"></span>
- </td>
- <td>
- <strong>Late.</strong>
- Time since last ping has exceeded <strong>Frequency</strong>,
- but has not yet exceeded <strong>Frequency</strong> + <strong>Grace</strong>.
- </td>
- </tr>
- <tr>
- <td>
- <span class="glyphicon glyphicon-exclamation-sign down"></span>
- </td>
- <td>
- <strong>Down.</strong>
- Time since last ping has exceeded <strong>Frequency</strong> + <strong>Grace</strong>.
- When check goes from "Late" to "Down", healthchecks.io
- sends you an email alert.
- </td>
- </tr>
- </table>
-
- </div>
- </div>
- {% endblock %}
|