With this simple modification, you monitor several failure
scenarios:
@@ -110,20 +113,41 @@ thing: they fire off a HTTP GET method.
Ubuntu, for example, does not have curl installed out of the box.
-{% include "front/snippets/bash.html" %}
+
+
+ {% include "front/snippets/bash_curl.html" %}
+
+
+
+
+ {% include "front/snippets/bash_wget.html" %}
+
Python
-{% include "front/snippets/python.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
@@ -132,7 +156,10 @@ 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
@@ -146,15 +173,21 @@ 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:
+
+ {% include "front/snippets/bash_curl.html" %}
+
+
+
+ {% include "front/snippets/bash_wget.html" %}
+
- {% include "front/snippets/python.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,
@@ -286,6 +315,7 @@
+
{% endcompress %}
{% endblock %}
diff --git a/templates/front/snippets/bash.html b/templates/front/snippets/bash_curl.html
similarity index 74%
rename from templates/front/snippets/bash.html
rename to templates/front/snippets/bash_curl.html
index 53022156..1df710c1 100644
--- a/templates/front/snippets/bash.html
+++ b/templates/front/snippets/bash_curl.html
@@ -1,7 +1,4 @@
# using curl:# (make sure it is installed on your system!)
curl --retry 3 {{ ping_url }}
-
-# using wget:
-wget {{ ping_url }} -O /dev/null
diff --git a/templates/front/snippets/bash.txt b/templates/front/snippets/bash_curl.txt
similarity index 67%
rename from templates/front/snippets/bash.txt
rename to templates/front/snippets/bash_curl.txt
index 934d7f91..2279949f 100644
--- a/templates/front/snippets/bash.txt
+++ b/templates/front/snippets/bash_curl.txt
@@ -1,6 +1,3 @@
# using curl:
# (make sure it is installed on your system!)
curl --retry 3 PING_URL
-
-# using wget:
-wget PING_URL -O /dev/null
\ No newline at end of file
diff --git a/templates/front/snippets/bash_wget.html b/templates/front/snippets/bash_wget.html
new file mode 100644
index 00000000..060a5c65
--- /dev/null
+++ b/templates/front/snippets/bash_wget.html
@@ -0,0 +1,3 @@
+
>>># using urllib2:
->>>importurllib2
->>>urllib2.urlopen("{{ ping_url }}")
-
->>># using requests:
->>>importrequests
->>>requests.get("{{ ping_url }}")
-
diff --git a/templates/front/snippets/python.txt b/templates/front/snippets/python.txt
deleted file mode 100644
index b37e2a01..00000000
--- a/templates/front/snippets/python.txt
+++ /dev/null
@@ -1,7 +0,0 @@
->>> # using urllib2:
->>> import urllib2
->>> urllib2.urlopen("PING_URL")
-
->>> # using requests:
->>> import requests
->>> requests.get("PING_URL")
\ No newline at end of file
diff --git a/templates/front/snippets/python_requests.html b/templates/front/snippets/python_requests.html
new file mode 100644
index 00000000..a97a4ff2
--- /dev/null
+++ b/templates/front/snippets/python_requests.html
@@ -0,0 +1,4 @@
+
# using requests:
+importrequests
+requests.get("{{ ping_url }}")
+
diff --git a/templates/front/snippets/python_requests.txt b/templates/front/snippets/python_requests.txt
new file mode 100644
index 00000000..72a8fb89
--- /dev/null
+++ b/templates/front/snippets/python_requests.txt
@@ -0,0 +1,3 @@
+# using requests:
+import requests
+requests.get("PING_URL")
diff --git a/templates/front/snippets/python_urllib2.html b/templates/front/snippets/python_urllib2.html
new file mode 100644
index 00000000..7fd2b041
--- /dev/null
+++ b/templates/front/snippets/python_urllib2.html
@@ -0,0 +1,4 @@
+
# using urllib2:
+importurllib2
+urllib2.urlopen("{{ ping_url }}")
+
diff --git a/templates/front/snippets/python_urllib2.txt b/templates/front/snippets/python_urllib2.txt
new file mode 100644
index 00000000..44c514c8
--- /dev/null
+++ b/templates/front/snippets/python_urllib2.txt
@@ -0,0 +1,3 @@
+# using urllib2:
+import urllib2
+urllib2.urlopen("PING_URL")
diff --git a/templates/front/welcome.html b/templates/front/welcome.html
index f1cf0dea..b9d4da42 100644
--- a/templates/front/welcome.html
+++ b/templates/front/welcome.html
@@ -59,27 +59,56 @@
- {% include "front/snippets/crontab.html" %}
+
+
+ {% include "front/snippets/crontab.html" %}
+
- {% include "front/snippets/bash.html" %}
+
+
+ {% include "front/snippets/bash_curl.html" %}
+
+
+
+ {% include "front/snippets/bash_wget.html" %}
+
- {% include "front/snippets/python.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
@@ -333,7 +362,8 @@
{% compress js %}
+
+
+
{% endcompress %}
{% endblock %}
-
-