feat(monitors): a DNS monitor can name a resolver; the host page puts Ansible above Docker (#5214)
CI / lint (push) Successful in 2s
CI / integration (push) Successful in 53s
CI / unit (push) Successful in 1m19s
CI / publish (push) Successful in 1m20s

DNS monitors take an optional Resolver, a server's IP. Set, the check asks
that server directly for A and AAAA over UDP and records how long it took
to answer; empty keeps today's lookup through the container's resolver.
"Does my local DNS still answer for public names" and "does 1.1.1.1" are
now separate monitors. No new dependency.

On a host's page the Ansible card moves above the Docker list, which can
run to dozens of containers and hid it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 16:14:11 -04:00
co-authored by Claude Opus 5.5
parent c6fc02def5
commit 6788ce60f1
12 changed files with 270 additions and 26 deletions
+7 -1
View File
@@ -10,7 +10,7 @@
<p class="field-hint mfield" data-types="http" style="grid-column:1/-1;margin:0;">
<strong>HTTP</strong> requests the target URL (http:// or https://). Up when the status matches, and the page contains the text below if you set one. For https, the certificate's expiry is tracked too.</p>
<p class="field-hint mfield" data-types="dns" style="grid-column:1/-1;margin:0;">
<strong>DNS</strong> looks the target name up (google.com, nas.lan, …) through the resolver Steward's container uses. Up when it resolves, and to the expected IP if you set one. No response time is recorded.</p>
<strong>DNS</strong> looks the target name up (google.com, nas.lan, …). Up when it resolves, and to the expected IP if you set one. With no resolver it asks the way Steward's container does (its resolv.conf, so usually your local DNS) and records no response time; name a resolver (1.1.1.1, your router, …) to ask that server directly and time its answer.</p>
{# tcp #}
<div class="mfield" data-types="tcp">
@@ -24,6 +24,12 @@
<input type="text" name="expected_ip" value="{{ config.get('expected_ip') or '' }}"
placeholder="e.g. 192.0.2.10" autocomplete="off" class="input">
</div>
<div class="mfield" data-types="dns">
<label class="field-label">Resolver <span style="color:var(--text-dim);">(optional)</span></label>
<input type="text" name="resolver" value="{{ config.get('resolver') or '' }}"
placeholder="the container's own" autocomplete="off" class="input"
title="A DNS server's IP address to ask directly. Empty asks the way Steward's container does.">
</div>
{# http #}
<div class="mfield" data-types="http">
+3
View File
@@ -134,6 +134,9 @@
<dd style="overflow-wrap:anywhere;">{{ value|join(", ") if value is mapping else ("yes" if value is sameas true else ("no" if value is sameas false else value)) }}</dd>
{% endif %}
{% endfor %}
{% if monitor.type == "dns" and not monitor.config.get("resolver") %}
<dt>Resolver</dt><dd>the container's own (its resolv.conf)</dd>
{% endif %}
</dl>
</section>
{% endblock %}