You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
3.7 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
9 years ago
10 years ago
10 years ago
9 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
  1. {% extends "base.html" %}
  2. {% load staticfiles %}
  3. {% block title %}Documentation - healthchecks.io{% endblock %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <h3>Summary</h3>
  8. <p>
  9. Each check you create in <a href="{% url 'hc-index' %}">My Checks</a>
  10. page has an unique "ping" URL. Whenever you access this URL,
  11. the "Last Ping" value of corresponding check is updated.
  12. </p>
  13. <p>When a certain amount of time passes since last received ping, the
  14. check is considered "late", and Health Checks sends an email alert.
  15. It is all very simple, really.</p>
  16. <h3>Executing a Ping</h3>
  17. <p>
  18. At the end of your batch job, add a bit of code to request
  19. one of your ping URLs.
  20. </p>
  21. <ul>
  22. <li>HTTP and HTTPS protocols both are fine</li>
  23. <li>Request method can be GET or POST</li>
  24. <li>It does not matter what request headers you send</li>
  25. <li>You can leave request body empty or put anything in it, it's all good</li>
  26. </ul>
  27. <p>The response will have status code "200 OK" and response body will be a
  28. short and simple string "OK".</p>
  29. <p>
  30. In bash scripts, you can use <code>wget</code> or <code>curl</code> to run the requests:
  31. </p>
  32. <pre>
  33. curl {{ ping_endpoint }}{uuid-goes-here}
  34. </pre>
  35. <h3>When Alerts Are Sent</h3>
  36. <p>
  37. Each check has a configurable <strong>Frequency</strong> parameter, with the default value of one day.
  38. For periodic tasks, this is the expected time gap between two runs.
  39. </p>
  40. <p>
  41. Additionally, each check has a <strong>Grace</strong> parameter, with default value of one hour.
  42. You can use this parameter to account for run time variance of tasks.
  43. For example, if a backup task completes in 50 seconds one day, and
  44. completes in 60 seconds the following day, you might not want to get
  45. alerted because the backups are 10 seconds late.
  46. </p>
  47. <p>Each check can be in one of the following states:</p>
  48. <table class="table">
  49. <tr>
  50. <td>
  51. <span class="glyphicon glyphicon-question-sign new"></span>
  52. </td>
  53. <td>
  54. <strong>New.</strong>
  55. A check that has been created, but has not received any pings yet.
  56. </td>
  57. </tr>
  58. <tr>
  59. <td>
  60. <span class="glyphicon glyphicon-ok-sign up"></span>
  61. </td>
  62. <td>
  63. <strong>Up.</strong>
  64. Time since last ping has not exceeded <strong>Frequency</strong>.
  65. </td>
  66. </tr>
  67. <tr>
  68. <td>
  69. <span class="glyphicon glyphicon-exclamation-sign grace"></span>
  70. </td>
  71. <td>
  72. <strong>Late.</strong>
  73. Time since last ping has exceeded <strong>Frequency</strong>,
  74. but has not yet exceeded <strong>Frequency</strong> + <strong>Grace</strong>.
  75. </td>
  76. </tr>
  77. <tr>
  78. <td>
  79. <span class="glyphicon glyphicon-exclamation-sign down"></span>
  80. </td>
  81. <td>
  82. <strong>Down.</strong>
  83. Time since last ping has exceeded <strong>Frequency</strong> + <strong>Grace</strong>.
  84. When check goes from "Late" to "Down", healthchecks.io
  85. sends you an email alert.
  86. </td>
  87. </tr>
  88. </table>
  89. </div>
  90. </div>
  91. {% endblock %}