forked from GithubBackups/healthchecks
More content
This commit is contained in:
parent
2a60666b5a
commit
a1bfed5d89
@ -8,4 +8,7 @@ urlpatterns = [
|
||||
url(r'^checks/add/$', views.add_check, name="hc-add-check"),
|
||||
url(r'^checks/([\w-]+)/name/$', views.update_name, name="hc-update-name"),
|
||||
url(r'^checks/([\w-]+)/timeout/$', views.update_timeout, name="hc-update-timeout"),
|
||||
url(r'^pricing/$', views.pricing, name="hc-pricing"),
|
||||
url(r'^docs/$', views.docs, name="hc-docs"),
|
||||
url(r'^about/$', views.about, name="hc-about"),
|
||||
]
|
||||
|
@ -7,11 +7,19 @@ from hc.front.forms import TimeoutForm, TIMEOUT_CHOICES
|
||||
|
||||
|
||||
def index(request):
|
||||
ctx = {
|
||||
"page": "welcome"
|
||||
}
|
||||
return render(request, "index.html", {"page": "welcome"})
|
||||
|
||||
return render(request, "index.html", ctx)
|
||||
|
||||
def pricing(request):
|
||||
return render(request, "pricing.html", {"page": "pricing"})
|
||||
|
||||
|
||||
def docs(request):
|
||||
return render(request, "docs.html", {"page": "docs"})
|
||||
|
||||
|
||||
def about(request):
|
||||
return render(request, "about.html", {"page": "about"})
|
||||
|
||||
|
||||
@login_required
|
||||
|
36
static/css/pricing.css
Normal file
36
static/css/pricing.css
Normal file
@ -0,0 +1,36 @@
|
||||
@import url("http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css");
|
||||
|
||||
.panel-pricing {
|
||||
-moz-transition: all .3s ease;
|
||||
-o-transition: all .3s ease;
|
||||
-webkit-transition: all .3s ease;
|
||||
}
|
||||
.panel-pricing:hover {
|
||||
box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.panel-pricing .panel-heading {
|
||||
padding: 20px 10px;
|
||||
}
|
||||
.panel-pricing .panel-heading .fa {
|
||||
margin-top: 10px;
|
||||
font-size: 58px;
|
||||
}
|
||||
.panel-pricing .list-group-item {
|
||||
color: #777777;
|
||||
border-bottom: 1px solid rgba(250, 250, 250, 0.5);
|
||||
}
|
||||
.panel-pricing .list-group-item:last-child {
|
||||
border-bottom-right-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
}
|
||||
.panel-pricing .list-group-item:first-child {
|
||||
border-top-right-radius: 0px;
|
||||
border-top-left-radius: 0px;
|
||||
}
|
||||
.panel-pricing .panel-body {
|
||||
background-color: #f0f0f0;
|
||||
font-size: 40px;
|
||||
color: #777777;
|
||||
padding: 20px;
|
||||
margin: 0px;
|
||||
}
|
@ -2,6 +2,23 @@ html, body {
|
||||
background: #EEE;
|
||||
}
|
||||
|
||||
#pitch {
|
||||
text-align: center;
|
||||
padding: 3em;
|
||||
}
|
||||
|
||||
.step-number {
|
||||
text-align: center;
|
||||
font-size: 48px;
|
||||
font-weight: bold;
|
||||
color: #777;
|
||||
|
||||
}
|
||||
|
||||
#get-started {
|
||||
margin-top: 3em;
|
||||
}
|
||||
|
||||
.glyphicon.up, .glyphicon.new, .glyphicon.down {
|
||||
font-size: 22px;
|
||||
}
|
||||
@ -38,10 +55,11 @@ table.table tr > th.th-name {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.indicator-cell {
|
||||
vertical-align: middle;
|
||||
#checks-table .indicator-cell {
|
||||
text-align: center;
|
||||
}
|
||||
table.table tr.checks-row > td {
|
||||
|
||||
#checks-table td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@ -63,6 +81,10 @@ table.table tr.checks-row > td {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.url-cell {
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
td.inactive .popover {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
35
templates/about.html
Normal file
35
templates/about.html
Normal file
@ -0,0 +1,35 @@
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h3>Who Runs This</h3>
|
||||
<p>
|
||||
Hello, my name is Pēteris Caune, I live in Riga, Latvia and do programming for living.
|
||||
You can contact me <a href="mailto:cuu508@gmail.com">via email</a>.
|
||||
</p>
|
||||
<h3>Reliability Guarantees</h3>
|
||||
<p>
|
||||
Health Checks is currently at a very early stage as you can probably tell.
|
||||
</p>
|
||||
<p>
|
||||
The service is currently run on single $5 Digital Ocean box. The service
|
||||
can and will have ocassional outages. User data should be safe however,
|
||||
as we are doing regular database backups to Amazon S3.
|
||||
</p>
|
||||
<p>
|
||||
If all this does not sound very inspiring,
|
||||
there are also alternative services:
|
||||
</p>
|
||||
|
||||
<h3>Alternative Services</h3>
|
||||
<ul>
|
||||
<li><a href="https://cronitor.io/">Cronitor.io</a></li>
|
||||
<li><a href="https://deadmanssnitch.com/">Dead Man's Snitch</a></li>
|
||||
<li><a href="https://github.com/quantopian/coal-mine">Coal Mine</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
@ -7,6 +7,7 @@
|
||||
{% load staticfiles %}
|
||||
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css">
|
||||
<link rel="stylesheet" href="{% static 'css/style.css' %}" type="text/css">
|
||||
<link rel="stylesheet" href="{% static 'css/pricing.css' %}" type="text/css">
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-default">
|
||||
@ -19,24 +20,32 @@
|
||||
<li {% if page == 'welcome' %} class="active" {% endif %}>
|
||||
<a href="{% url 'hc-index' %}">Welcome</a>
|
||||
</li>
|
||||
{% if request.user %}
|
||||
|
||||
{% if request.user.is_authenticated %}
|
||||
<li {% if page == 'checks' %} class="active" {% endif %}>
|
||||
<a href="{% url 'hc-checks' %}">My Checks</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li><a href="#">Pricing</a></li>
|
||||
<li><a href="#">Documentation</a></li>
|
||||
<li><a href="#">About</a></li>
|
||||
|
||||
<li {% if page == 'pricing' %} class="active" {% endif %}>
|
||||
<a href="{% url 'hc-pricing' %}">Pricing</a>
|
||||
</li>
|
||||
|
||||
<li {% if page == 'docs' %} class="active" {% endif %}>
|
||||
<a href="{% url 'hc-docs' %}">Documentation</a>
|
||||
</li>
|
||||
|
||||
<li {% if page == 'about' %} class="active" {% endif %}>
|
||||
<a href="{% url 'hc-about' %}">About</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% if request.user %}
|
||||
{% if request.user.is_authenticated %}
|
||||
<li><a href="#">{{ request.user.email }}</a></li>
|
||||
<li><a href="#">Log Out</a></li>
|
||||
{% else %}
|
||||
<li><a href="#">Log In</a></li>
|
||||
<li><a href="{% url 'hc-login' %}">Log In</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
51
templates/docs.html
Normal file
51
templates/docs.html
Normal file
@ -0,0 +1,51 @@
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h3>Checks and pinging</h3>
|
||||
<p>
|
||||
Each check you create in <a href="{% url 'hc-checks' %}">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 notification.
|
||||
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 ping
|
||||
one of your checks.
|
||||
</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>
|
||||
wget https://healthchecks.io/ping/b2012751-c542-4deb-b054-ff51322102b9/
|
||||
</pre>
|
||||
|
||||
<h3>When notifications are sent</h3>
|
||||
<p>
|
||||
Each check has a configurable "Frequency" parameter, with default value of <strong>one day</strong>.
|
||||
When time since last ping exceeds the configured amount, the check is considered late.
|
||||
When a check is <strong>1 hour late</strong>, Health Checks sends you an email notification.
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
@ -5,11 +5,11 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h1>My Checks</h1>
|
||||
<table class="table table-hover">
|
||||
<table id="checks-table" class="table table-hover">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="th-name">Name</th>
|
||||
<th>Code</th>
|
||||
<th>URL</th>
|
||||
<th>Frequency</th>
|
||||
<th>Last Ping</th>
|
||||
<th></th>
|
||||
@ -25,7 +25,7 @@
|
||||
<span class="glyphicon glyphicon-exclamation-sign down"></span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<td class="name-cell">
|
||||
<form
|
||||
method="post"
|
||||
action="{% url 'hc-update-name' check.code %}"
|
||||
@ -46,10 +46,8 @@
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
<td>
|
||||
<small>
|
||||
<code>{{ check.code }}</code>
|
||||
</small>
|
||||
<td class="url-cell">
|
||||
<code>https://healthchecks.io{% url 'hc-ping' check.code %}</code>
|
||||
</td>
|
||||
<td class="timeout-cell inactive">
|
||||
<div class="timeout-dialog popover bottom">
|
||||
|
@ -3,49 +3,53 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<h1>Get Notified When Your CRON Jobs Fail</h1>
|
||||
<ol>
|
||||
<li>Create a pingback address on healtchecks.io <br />
|
||||
<img
|
||||
src="{% static 'img/intro-create-check.png' %}"
|
||||
alt="Screenshot of 'My Checks'"
|
||||
class="img-thumbnail" />
|
||||
<div class="col-sm-12">
|
||||
<h1 id="pitch">Get Notified When Your Cron Jobs Fail</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
<li>Add a single line at the bottom of your batch processing task:
|
||||
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#bash" aria-controls="home" role="tab" data-toggle="tab">Bash</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#python" aria-controls="profile" role="tab" data-toggle="tab">Python</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="bash">
|
||||
<pre>wget https://healthchecks.io/ping/b2012751-something-something/
|
||||
</pre>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="python">
|
||||
<pre>
|
||||
>>> import urllib2
|
||||
>>> urllib2.urlopen("http://localhost:8000/ping/b2012751-c542-4deb-b054-ff51322102b9")
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
<li>Receive an email from healthchecks.io when the task has an issue:</li>
|
||||
</ol>
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<p class="step-number">1</p>
|
||||
<p>
|
||||
Create a ping URL on healtchecks.io
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-4">
|
||||
<p class="step-number">2</p>
|
||||
Add a single line at the bottom of your batch processing task:
|
||||
|
||||
<h1>E-mail Address to Receive Notifications:</h1>
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active">
|
||||
<a href="#bash" aria-controls="home" role="tab" data-toggle="tab">Bash</a>
|
||||
</li>
|
||||
<li role="presentation">
|
||||
<a href="#python" aria-controls="profile" role="tab" data-toggle="tab">Python</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="bash">
|
||||
<pre>wget https://healthchecks.io/ping/b2012751-c542-4deb-b054-ff51322102b9/
|
||||
</pre>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="python">
|
||||
<pre>
|
||||
>>> import urllib2
|
||||
>>> urllib2.urlopen("https://healthchecks.io/ping/b2012751-c542-4deb-b054-ff51322102b9/")
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<p class="step-number">3</p>
|
||||
Receive an email from healthchecks.io when the task has an issue
|
||||
</div>
|
||||
|
||||
|
||||
<div id="get-started" class="col-sm-6 col-sm-offset-3">
|
||||
<h3>E-mail Address to Receive Notifications:</h3>
|
||||
<form action="{% url 'hc-create-account' %}" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
|
39
templates/pricing.html
Normal file
39
templates/pricing.html
Normal file
@ -0,0 +1,39 @@
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<!-- Plans -->
|
||||
<section id="plans">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
||||
<!-- item -->
|
||||
<div class="col-md-4 text-center col-md-offset-4">
|
||||
<div class="panel panel-success panel-pricing">
|
||||
<div class="panel-heading">
|
||||
<i class="fa fa-desktop"></i>
|
||||
<h3>Free Plan</h3>
|
||||
</div>
|
||||
<div class="panel-body text-center">
|
||||
<p><strong>€0 / Month</strong></p>
|
||||
</div>
|
||||
<ul class="list-group text-center">
|
||||
<li class="list-group-item"><i class="fa fa-check"></i> Personal or Commercial use</li>
|
||||
<li class="list-group-item"><i class="fa fa-check"></i> Unlimited projects</li>
|
||||
<li class="list-group-item"><i class="fa fa-check"></i> Unlimited notifications</li>
|
||||
</ul>
|
||||
<div class="panel-footer">
|
||||
<a class="btn btn-lg btn-block btn-success" href="#">Get Started</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /item -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /Plans -->
|
||||
|
||||
|
||||
{% endblock %}
|
Loading…
x
Reference in New Issue
Block a user