99stack is prepaid: when the balance runs out the servers stop. A pulled check on the account API alerts when billing.secondsdue - the provider's own runway at current spend - drops under 14 days: checked every 6h, reminding every 24h. gatus_endpoint gains a `headers` field for APIs behind a credential. The vault gains ninetyninestack_api_token (account-wide; 99stack has no read-only scope) and gatus_push_tokens.arbret, used by the next commit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
64 lines
1.9 KiB
Django/Jinja
64 lines
1.9 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 %}
|
|
{% if e.headers is defined %}
|
|
headers:
|
|
{{ e.headers | 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 %}
|