From 6a4cef3131da4f0164e3da862a4da7499dde6899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Tue, 21 Jul 2015 01:23:57 +0300 Subject: [PATCH] Docs updates --- hc/front/views.py | 8 +++++- templates/front/about.html | 8 +++--- templates/front/docs.html | 54 +++++++++++++++++++++++++++++++++++--- 3 files changed, 61 insertions(+), 9 deletions(-) diff --git a/hc/front/views.py b/hc/front/views.py index db0a7f8b..9b0ea69b 100644 --- a/hc/front/views.py +++ b/hc/front/views.py @@ -1,5 +1,6 @@ from datetime import timedelta as td +from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import HttpResponseForbidden from django.shortcuts import redirect, render @@ -61,7 +62,12 @@ def pricing(request): def docs(request): - return render(request, "front/docs.html", {"page": "docs"}) + ctx = { + "page": "docs", + "ping_endpoint": settings.PING_ENDPOINT + } + + return render(request, "front/docs.html", ctx) def about(request): diff --git a/templates/front/about.html b/templates/front/about.html index d645ac90..f6322598 100644 --- a/templates/front/about.html +++ b/templates/front/about.html @@ -18,15 +18,15 @@

Reliability Guarantees

- Health Checks is currently at a very early stage as you can probably tell. + Health Checks is currently at an + relatively early stage as you can probably tell.

The service is currently run on single $5 Digital Ocean box. - It can and will have ocassional outages. + It can and will have ocassional outages. User data is however + being backed up to Amazon S3 daily.

-

If all this does not sound very inspiring, there are also alternative services: diff --git a/templates/front/docs.html b/templates/front/docs.html index 7ba885d5..362c4d14 100644 --- a/templates/front/docs.html +++ b/templates/front/docs.html @@ -35,18 +35,64 @@ In bash scripts, you can use wget or curl to run the requests:

-curl http://healthchecks.io/ping/uuid-goes-here
+curl {{ ping_endpoint }}{uuid-goes-here}
 

When Alerts Are Sent

- Each check has a configurable "Frequency" parameter, with default value of one day. + Each check has a configurable Frequency parameter, with the default value of one day. + For periodic tasks, this is the expected time gap between two runs.

- When time since last ping exceeds the configured amount, the check is considered late. - When a check is 1 hour late, Health Checks sends you an email alert. + Additionally, each check has a Grace 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.

+

Each check can be in one of the following states:

+ + + + + + + + + + + + + + + + + +
+ + + New. + A check that has been created, but has not received any pings yet. +
+ + + Up. + Time since last ping has not exceeded Frequency. +
+ + + Late. + Time since last ping has exceeded Frequency, + but has not yet exceeded Frequency + Grace. +
+ + + Down. + Time since last ping has exceeded Frequency + Grace. + When check goes from "Late" to "Down", healthchecks.io + sends you an email alert. +