This commit is contained in:
4cuck committed 2023-07-27 04:14:47 +02:00
1 parent 906bfbb70c
commit a304acc505
36 files changed
+9888

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="/static/bootstrap.min.css" rel="stylesheet">
<meta name="robots" content="noindex,nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>About Nitter Instance Health</title>
</head>
<body>
<div class="container">
<h1>Nitter instance uptime & health tracker</h1>
<p><a href="/">Home</a></p>
<p>Uptime check interval: {{uptime_interval_s}}s.</p>
<p>Instance re-fetching interval, including RSS & version check: {{wiki_interval_s}}s.</p>
<p>The following paths are checked per instance:</p>
<ul>
{% for path in checked_paths %}
<li><code>{{path}}</code></li>
{% endfor %}
</ul>
<p>The same data can also be fetched as JSON from <code>/api/v1/instances</code></p>
<p>Explanations</p>
<ul>
<li><code>Healthy</code> stands for hosts which are reachable and pass a content check.</li>
<li><code>Ping AVG</code> is the ping average over the last {{ping_avg_interval_h}} hours.
Note that this is the time in ms it took for an instance to respond with content. This is not a network ping.</li>
<li><code>RSS</code> whether the host has RSS feeds enabled.</li>
<li><code>Version</code> which nitter version the host reports.</li>
<li><code>Points</code> an instance score based on the availability over the last 30 and 120 days, together with the version.</li>
<li>(api only) <code>Ping</code> last health check response time (ms).</li>
</ul>
</body>
</html>
+63
View File
@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="/static/bootstrap.min.css" rel="stylesheet">
<meta name="robots" content="noindex,nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Nitter Instance Health</title>
</head>
<body>
<div class="container">
<h1>Nitter Instance Uptime & Health</h1>
<p><a href="/about">About</a></p>
<p>Last Updated {{last_updated}} <a href="https://time.is/UTC">UTC</a>.</p>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col">Instance</th>
<th scope="col">Healthy</th>
<th scope="col">Ping</th>
<th scope="col">Average</th>
<th scope="col">RSS</th>
<th scope="col">Version</th>
<th scope="col">Points</th>
</tr>
</thead>
<tbody>
{% for host in instances %}
<tr>
<td><a href="{{host.url}}">{{host.domain}}</a></td>
<td>{% if host.healthy%} ✅ {% else %} ❌ {% endif %}</td>
<td>
{% if host.recent_pings|length > 0 %}
{% set height = 57 %}
{% set width = 182 %}
{% set amount = host.recent_pings|length %}
{% set width_bar = width / amount %}
{% set offset = 5 %}
{% set step_size = (host.ping_max - host.ping_min)/(height-offset) %}
<svg viewBox="0 0 182 56" width="{{width - 1}}" height="{{height - 1}}">
{% set avg_pos = (height-(host.ping_avg - host.ping_min )/step_size) - offset %}
<line x1="1" x2="181" y1="{{avg_pos}}" y2="{{avg_pos}}" stroke="black" stroke-width="0.72727275" stroke-linecap="butt" stroke-opacity="0.3"><title>Average</title></line>
{% for ping in host.recent_pings %}
{% set height_bar = (ping - host.ping_min )/step_size + offset%}
<rect x="{{loop.index * width_bar}}" y="{{height - height_bar - offset}}" width="{{width_bar}}" height="{{height_bar}}" fill="#a09df2" fill-opacity="0.95"><title>{{ping}}</title></rect>
{% endfor %}
</svg>
{% endif %}
</td>
<td>{{host.ping_avg}}</td>
<td>{% if host.rss%} ✅ {% else %} ❌ {% endif %}</td>
<td>{{host.version}}</td>
<td>{{host.points}}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<script src="/static/bootstrap.min.js"></script>
</body>
</html>