Asked to un-hide endpoint properties; the answer is that nothing was hidden.
All six hide-* options (hide-hostname, hide-url, hide-port, hide-conditions,
hide-errors, and dont-resolve-failed-conditions) already default to false
upstream, so hostname, URL, port, conditions and errors were all being shown.
The one setting that genuinely displays MORE is resolve-successful-conditions.
By default a FAILING check resolves its placeholders - "[STATUS] (502) == 200" -
while a PASSING one drops the value and shows only "[STATUS] == 200". With it
on, a healthy DNS check now reads:
[DNS_RCODE] (NOERROR) == NOERROR
[BODY] (64.226.70.190) == 64.226.70.190
which says what it actually resolved to rather than merely that the assertion
held. Applied to all 27 pulled endpoints via a gatus_endpoint_default_ui that
each caller can override.
It applies to pulled endpoints ONLY: an external (push) endpoint has no `ui`
field upstream at all, because it carries no conditions - success comes from the
push. The template was initially emitting the block in both loops; emitting an
unknown key into the external-endpoints list risks a parse rejection, and a
rejected config is exactly what skip-invalid-config-update exists to survive.
Also made the page-level `ui` a pass-through dict, the same shape as
gatus_alerting, so every upstream option (description, dashboard-heading, logo,
link, favicon, buttons, custom-css, dark-mode, default-sort-by,
default-filter-by) is reachable without a variable per key. Replaces the two
one-off gatus_ui_title / gatus_ui_header variables.
Set default-sort-by: group, because the dashboard's own grouping toggle starts
OFF and remembers per browser in localStorage - without it the ten groups render
as one flat list of 86 rows for anyone who has not clicked it.
Note the limit of all this: it is configuration. Layout, card design and group
rendering come from the Vue app compiled into the binary (//go:embed static), so
changing those means forking and rebuilding the image - which would discard the
pinned-digest property the deployment relies on.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
60 lines
1.8 KiB
Django/Jinja
60 lines
1.8 KiB
Django/Jinja
# {{ gatus_endpoint_name }}.yaml — managed by Ansible (roles/gatus_endpoint)
|
|
#
|
|
# Contributed by a playbook, not hand-edited. Gatus appends the lists in every
|
|
# *.yaml under its config directory, so this file adds to whatever else is
|
|
# registered without knowing about it.
|
|
{% if gatus_endpoint_external %}
|
|
|
|
external-endpoints:
|
|
{% for e in gatus_endpoint_external %}
|
|
- name: {{ e.name }}
|
|
group: {{ e.group }}
|
|
token: "{{ e.token }}"
|
|
{% if e.heartbeat is defined %}
|
|
heartbeat:
|
|
interval: {{ e.heartbeat }}
|
|
{% endif %}
|
|
{% set _alerts = e.alerts | default(gatus_endpoint_default_alerts) %}
|
|
{% if _alerts %}
|
|
alerts:
|
|
{{ _alerts | to_nice_yaml(indent=2) | indent(6, true) }}
|
|
{% endif %}
|
|
{# external endpoints have no `ui` field upstream - they carry no conditions #}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% if gatus_endpoint_pulled %}
|
|
|
|
endpoints:
|
|
{% for e in gatus_endpoint_pulled %}
|
|
- name: {{ e.name }}
|
|
group: {{ e.group }}
|
|
url: "{{ e.url }}"
|
|
interval: {{ e.interval | default('60s') }}
|
|
{% if e.dns is defined %}
|
|
# A DNS endpoint: `url` is the RESOLVER to ask, not the thing being asked
|
|
# about. The name being queried lives in query-name, and [BODY] holds the
|
|
# resolved record for the conditions below.
|
|
dns:
|
|
query-type: {{ e.dns['query-type'] }}
|
|
query-name: {{ e.dns['query-name'] }}
|
|
{% endif %}
|
|
{% if e.client is defined %}
|
|
client:
|
|
{{ e.client | to_nice_yaml(indent=2) | indent(6, true) }}
|
|
{% endif %}
|
|
conditions:
|
|
{% for c in e.conditions %}
|
|
- "{{ c }}"
|
|
{% endfor %}
|
|
{% set _alerts = e.alerts | default(gatus_endpoint_default_alerts) %}
|
|
{% if _alerts %}
|
|
alerts:
|
|
{{ _alerts | to_nice_yaml(indent=2) | indent(6, true) }}
|
|
{% endif %}
|
|
{% set _ui = e.ui | default(gatus_endpoint_default_ui) %}
|
|
{% if _ui %}
|
|
ui:
|
|
{{ _ui | to_nice_yaml(indent=2) | indent(6, true) }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% endif %}
|