mirror of
https://github.com/healthchecks/healthchecks.git
synced 2025-04-03 04:15:29 +00:00
Add Docs / Pinging / Network Routers
This commit is contained in:
parent
24e5e83bbc
commit
037499f33a
6 changed files with 115 additions and 0 deletions
static/img/docs
templates
BIN
static/img/docs/ddwrt.png
Normal file
BIN
static/img/docs/ddwrt.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 73 KiB |
BIN
static/img/docs/routeros1.png
Normal file
BIN
static/img/docs/routeros1.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 81 KiB |
BIN
static/img/docs/routeros2.png
Normal file
BIN
static/img/docs/routeros2.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 80 KiB |
51
templates/docs/network_routers.html-fragment
Normal file
51
templates/docs/network_routers.html-fragment
Normal file
|
@ -0,0 +1,51 @@
|
|||
<h1>Network Routers</h1>
|
||||
<p>Certain network router operating systems can be configured to send regular HTTP(S)
|
||||
requests to SITE_NAME directly from the router. This is a handy way to monitor them: when
|
||||
the router loses its WAN connection, it will not be able to ping SITE_NAME, and SITE_NAME
|
||||
will notify you about the outage.</p>
|
||||
<h2>DD-WRT</h2>
|
||||
<p><a href="https://dd-wrt.com/">DD-WRT</a> is a Linux-based firmware for routers that runs on wide
|
||||
variety of router models. DD-WRT ships with a cron daemon and wget utility. You can
|
||||
enable the cron daemon and edit crontab in DD-WRT control panel,
|
||||
<strong>Administration › Management › Cron</strong>.</p>
|
||||
<p>The crontab syntax on DD-WRT is:</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="p">[</span><span class="n">cron</span><span class="w"> </span><span class="n">expression</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="n">username</span><span class="p">]</span><span class="w"> </span><span class="p">[</span><span class="n">command</span><span class="p">]</span>
|
||||
</code></pre></div>
|
||||
|
||||
<p>Example for sending a ping every minute:</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="k">*</span> * <span class="gs">* *</span> * root wget PING_URL
|
||||
</code></pre></div>
|
||||
|
||||
<p>Screenshot:</p>
|
||||
<p><img alt="DD-WRT control panel" src="IMG_URL/ddwrt.png" /></p>
|
||||
<h2>MikroTik RouterOS</h2>
|
||||
<p><a href="https://mikrotik.com/software">MikroTik RouterOS</a> is a router operating system used
|
||||
primarily on MikroTik network hardware. Among its many features is scripting support
|
||||
and a scheduler.</p>
|
||||
<p>First, create a script in WebFig, <strong>System › Scripts › Add New</strong>. Use the following
|
||||
parameters:</p>
|
||||
<ul>
|
||||
<li>Name: <code>ping</code> (example, you can use a different name)</li>
|
||||
<li>Policy: <code>read</code>, <code>test</code></li>
|
||||
<li>Source: <code>/tool fetch url="/tool fetch url="PING_URL" output=none</code></li>
|
||||
</ul>
|
||||
<p><img alt="DD-WRT control panel" src="IMG_URL/routeros1.png" /></p>
|
||||
<p>Then, create a schedule in WebFig, <strong>System › Scheduler › Add New</strong>. Use parameters:</p>
|
||||
<ul>
|
||||
<li>Interval: <code>00:01:00</code> (one minute)</li>
|
||||
<li>Policy: <code>read</code>, <code>test</code></li>
|
||||
<li>On Event: <code>ping</code> (the name of the script from the previous step)</li>
|
||||
</ul>
|
||||
<p><img alt="DD-WRT control panel" src="IMG_URL/routeros2.png" /></p>
|
||||
<p>Notes:</p>
|
||||
<ul>
|
||||
<li>The <code>output=none</code> parameter tells the system to discard response body. Without
|
||||
this parameter, the system will save response body to a file, which will additionally
|
||||
require the <code>write</code> policy.</li>
|
||||
<li>The "tool fetch" utility supports HTTPS URLs but does not verify TLS certificates
|
||||
by default. You can add <code>check-certificate=yes</code> parameter to require a valid TLS
|
||||
certificate. Note that RouterOS ships with no root CA certificates, so you will
|
||||
also need to load these.</li>
|
||||
<li><a href="https://wiki.mikrotik.com/wiki/Manual:Tools/Fetch">Here's the full list of options</a>
|
||||
supported by "tool fetch".</li>
|
||||
</ul>
|
63
templates/docs/network_routers.md
Normal file
63
templates/docs/network_routers.md
Normal file
|
@ -0,0 +1,63 @@
|
|||
# Network Routers
|
||||
|
||||
Certain network router operating systems can be configured to send regular HTTP(S)
|
||||
requests to SITE_NAME directly from the router. This is a handy way to monitor them: when
|
||||
the router loses its WAN connection, it will not be able to ping SITE_NAME, and SITE_NAME
|
||||
will notify you about the outage.
|
||||
|
||||
## DD-WRT
|
||||
|
||||
[DD-WRT](https://dd-wrt.com/) is a Linux-based firmware for routers that runs on wide
|
||||
variety of router models. DD-WRT ships with a cron daemon and wget utility. You can
|
||||
enable the cron daemon and edit crontab in DD-WRT control panel,
|
||||
**Administration › Management › Cron**.
|
||||
|
||||
The crontab syntax on DD-WRT is:
|
||||
|
||||
[cron expression] [username] [command]
|
||||
|
||||
Example for sending a ping every minute:
|
||||
|
||||
* * * * * root wget PING_URL
|
||||
|
||||
Screenshot:
|
||||
|
||||

|
||||
|
||||
## MikroTik RouterOS
|
||||
|
||||
[MikroTik RouterOS](https://mikrotik.com/software) is a router operating system used
|
||||
primarily on MikroTik network hardware. Among its many features is scripting support
|
||||
and a scheduler.
|
||||
|
||||
First, create a script in WebFig, **System › Scripts › Add New**. Use the following
|
||||
parameters:
|
||||
|
||||
* Name: `ping` (example, you can use a different name)
|
||||
* Policy: `read`, `test`
|
||||
* Source: `/tool fetch url="/tool fetch url="PING_URL" output=none`
|
||||
|
||||

|
||||
|
||||
Then, create a schedule in WebFig, **System › Scheduler › Add New**. Use parameters:
|
||||
|
||||
* Interval: `00:01:00` (one minute)
|
||||
* Policy: `read`, `test`
|
||||
* On Event: `ping` (the name of the script from the previous step)
|
||||
|
||||

|
||||
|
||||
Notes:
|
||||
|
||||
* The `output=none` parameter tells the system to discard response body. Without
|
||||
this parameter, the system will save response body to a file, which will additionally
|
||||
require the `write` policy.
|
||||
* The "tool fetch" utility supports HTTPS URLs but does not verify TLS certificates
|
||||
by default. You can add `check-certificate=yes` parameter to require a valid TLS
|
||||
certificate. Note that RouterOS ships with no root CA certificates, so you will
|
||||
also need to load these.
|
||||
* [Here's the full list of options](https://wiki.mikrotik.com/wiki/Manual:Tools/Fetch)
|
||||
supported by "tool fetch".
|
||||
|
||||
|
||||
|
|
@ -37,6 +37,7 @@
|
|||
{% include "front/docs_nav_item.html" with slug="reliability_tips" title="Reliability tips" %}
|
||||
{% include "front/docs_nav_item.html" with slug="bash" title="Shell scripts" %}
|
||||
{% include "front/docs_nav_item.html" with slug="arduino" title="Arduino" %}
|
||||
{% include "front/docs_nav_item.html" with slug="network_routers" title="Network Routers" %}
|
||||
{% include "front/docs_nav_item.html" with slug="csharp" title="C#" %}
|
||||
{% include "front/docs_nav_item.html" with slug="email" title="Email" %}
|
||||
{% include "front/docs_nav_item.html" with slug="github_actions" title="GitHub Actions" %}
|
||||
|
|
Loading…
Add table
Reference in a new issue