With this simple modification, you monitor several failure
scenarios:
@@ -113,41 +110,21 @@ thing: they fire off a HTTP GET method.
Ubuntu, for example, does not have curl installed out of the box.
-
-
- {% include "front/snippets/bash_curl.html" %}
-
-
-
-
- {% include "front/snippets/bash_wget.html" %}
-
+{% include "front/snippets/bash_curl.html" %}
+{% include "front/snippets/bash_wget.html" %}
Python
-
-
- {% include "front/snippets/python_urllib2.html" %}
-
-
-
- {% include "front/snippets/python_requests.html" %}
-
+{% include "front/snippets/python_urllib2.html" %}
+{% include "front/snippets/python_requests.html" %}
Node
-
-
- {% include "front/snippets/node.html" %}
-
-
+{% include "front/snippets/node.html" %}
PHP
-
-
- {% include "front/snippets/php.html" %}
-
+{% include "front/snippets/php.html" %}
Browser
@@ -156,10 +133,7 @@ thing: they fire off a HTTP GET method.
CORS header in its ping responses, so cross-domain AJAX requests
should work.
-
-
- {% include "front/snippets/browser.html" %}
-
+{% include "front/snippets/browser.html" %}
PowerShell
@@ -173,20 +147,14 @@ When scheduled to run with Task Scheduler, it will essentially
just send regular "I'm alive" messages. You can of course extend it to
do more things.
-
-
- {% include "front/snippets/powershell.html" %}
-
+{% include "front/snippets/powershell.html" %}
Save the above to e.g. C:\Scripts\healthchecks.ps1. Then use
the following command in a Scheduled Task to run the script:
@@ -284,6 +252,7 @@ the following command in a Scheduled Task to run the script:
{% block scripts %}
{% compress js %}
+
{% endcompress %}
diff --git a/templates/front/docs_api.html b/templates/front/docs_api.html
index 9c61f2e1..4c823814 100644
--- a/templates/front/docs_api.html
+++ b/templates/front/docs_api.html
@@ -64,10 +64,7 @@ The response may contain a JSON document with additional data.
a JSON document with all checks in user's account.
Example Request
-
-
- {% include "front/snippets/list_checks_request.html" %}
-
+{% include "front/snippets/list_checks_request.html" %}
Example Response
{% include "front/snippets/list_checks_response.html" %}
@@ -170,16 +167,10 @@ The response may contain a JSON document with additional data.
Example Request
-
-
- {% include "front/snippets/create_check_request_a.html" %}
-
+{% include "front/snippets/create_check_request_a.html" %}
Or, alternatively:
-
-
- {% include "front/snippets/create_check_request_b.html" %}
-
+{% include "front/snippets/create_check_request_b.html" %}
Example Response
@@ -208,10 +199,7 @@ The response may contain a JSON document with additional data.
Example Request
-
-
- {% include "front/snippets/pause_check_request.html" %}
-
+{% include "front/snippets/pause_check_request.html" %}
Example Response
{% include "front/snippets/pause_check_response.html" %}
@@ -222,6 +210,7 @@ The response may contain a JSON document with additional data.
{% block scripts %}
{% compress js %}
+
{% endcompress %}
diff --git a/templates/front/my_checks.html b/templates/front/my_checks.html
index 8da40727..072f6c2e 100644
--- a/templates/front/my_checks.html
+++ b/templates/front/my_checks.html
@@ -230,67 +230,37 @@
-
-
{% with ping_url="" %}
-
-
- {% include "front/snippets/crontab.html" %}
-
+ {% include "front/snippets/crontab.html" %}
-
-
- {% include "front/snippets/bash_curl.html" %}
-
-
-
- {% include "front/snippets/bash_wget.html" %}
-
+ {% include "front/snippets/bash_curl.html" %}
+ {% include "front/snippets/bash_wget.html" %}
-
-
- {% include "front/snippets/python_urllib2.html" %}
-
-
-
- {% include "front/snippets/python_requests.html" %}
-
+ {% include "front/snippets/python_urllib2.html" %}
+ {% include "front/snippets/python_requests.html" %}
-
-
- {% include "front/snippets/node.html" %}
-
+ {% include "front/snippets/node.html" %}
-
-
- {% include "front/snippets/php.html" %}
-
+ {% include "front/snippets/php.html" %}
-
-
- {% include "front/snippets/browser.html" %}
-
+ {% include "front/snippets/browser.html" %}
-
-
- {% include "front/snippets/powershell.html" %}
-
+ {% include "front/snippets/powershell.html" %}
- As an alternative to HTTP/HTTPS requests,
- you can "ping" this check by sending an
- email message to
-
-
-
+
+ As an alternative to HTTP/HTTPS requests,
+ you can "ping" this check by sending an
+ email message to
+
// the server returns appropriate CORS headers so cross-domain AJAX requests should work:
+varxhr=newXMLHttpRequest();xhr.open('GET','{{ ping_url }}',true);xhr.send(null);
diff --git a/templates/front/snippets/browser.txt b/templates/front/snippets/browser.txt
index 93e083c0..1805a685 100644
--- a/templates/front/snippets/browser.txt
+++ b/templates/front/snippets/browser.txt
@@ -1,3 +1,4 @@
+// the server returns appropriate CORS headers so cross-domain AJAX requests should work:
var xhr = new XMLHttpRequest();
xhr.open('GET', 'PING_URL', true);
xhr.send(null);
\ No newline at end of file
diff --git a/templates/front/welcome.html b/templates/front/welcome.html
index b9d4da42..00f46c98 100644
--- a/templates/front/welcome.html
+++ b/templates/front/welcome.html
@@ -59,64 +59,35 @@
-
-
- {% include "front/snippets/crontab.html" %}
-
+ {% include "front/snippets/crontab.html" %}
-
-
- {% include "front/snippets/bash_curl.html" %}
-
-
-
- {% include "front/snippets/bash_wget.html" %}
-
+ {% include "front/snippets/bash_curl.html" %}
+ {% include "front/snippets/bash_wget.html" %}
-
-
- {% include "front/snippets/python_urllib2.html" %}
-
-
-
- {% include "front/snippets/python_requests.html" %}
-
+ {% include "front/snippets/python_urllib2.html" %}
+ {% include "front/snippets/python_requests.html" %}
-
-
- {% include "front/snippets/node.html" %}
-
+ {% include "front/snippets/node.html" %}
-
-
- {% include "front/snippets/php.html" %}
-
+ {% include "front/snippets/php.html" %}
-
-
- {% include "front/snippets/browser.html" %}
-
+ {% include "front/snippets/browser.html" %}
-
-
- {% include "front/snippets/powershell.html" %}
-
+ {% include "front/snippets/powershell.html" %}
-
+
As an alternative to HTTP/HTTPS requests,
you can "ping" this check by sending an
email message to
-