48 lines
1.8 KiB
YAML
48 lines
1.8 KiB
YAML
|
|
---
|
||
|
|
# The per-service health probes.
|
||
|
|
#
|
||
|
|
# These are NOT the same thing as the systemd checks in infra/401. Those answer
|
||
|
|
# "is the unit running"; these answer "does the service actually respond" - an
|
||
|
|
# RPC call to bitcoind, a TCP connect to Fulcrum's Electrum port, an HTTP fetch
|
||
|
|
# from the Mempool backend. A process can be perfectly `active` and useless,
|
||
|
|
# which is precisely the gap these close.
|
||
|
|
#
|
||
|
|
# The checks themselves live in each service's own role, deployed by that
|
||
|
|
# service's playbook. This play only registers where they report, because the
|
||
|
|
# endpoints must exist in Gatus before the first push arrives.
|
||
|
|
#
|
||
|
|
# They used to push to Uptime Kuma. The scripts now POST with a bearer token
|
||
|
|
# instead of GETting ?status=up, and each host uses its own token.
|
||
|
|
|
||
|
|
- name: Register the per-service probes with Gatus
|
||
|
|
hosts: observability
|
||
|
|
become: yes
|
||
|
|
|
||
|
|
vars:
|
||
|
|
probes:
|
||
|
|
- {name: bitcoin-knots, host: knots_box_local}
|
||
|
|
- {name: datum-gateway, host: knots_box_local}
|
||
|
|
- {name: fulcrum, host: fulcrum_box_local}
|
||
|
|
- {name: phoenixd, host: vipy}
|
||
|
|
- {name: forgejo-runner, host: forgejo_runner_local}
|
||
|
|
- {name: mempool-mariadb, host: mempool_box_local}
|
||
|
|
- {name: mempool-backend, host: mempool_box_local}
|
||
|
|
- {name: mempool-frontend, host: mempool_box_local}
|
||
|
|
|
||
|
|
tasks:
|
||
|
|
- name: Build the probe endpoint list
|
||
|
|
ansible.builtin.set_fact:
|
||
|
|
probe_endpoints: "{{ probe_endpoints | default([]) + [{
|
||
|
|
'name': item.name,
|
||
|
|
'group': 'probe',
|
||
|
|
'token': gatus_push_tokens[item.host],
|
||
|
|
'heartbeat': '16m'}] }}"
|
||
|
|
loop: "{{ probes }}"
|
||
|
|
|
||
|
|
- name: Register the probe endpoints
|
||
|
|
ansible.builtin.include_role:
|
||
|
|
name: gatus_endpoint
|
||
|
|
vars:
|
||
|
|
gatus_endpoint_name: probes
|
||
|
|
gatus_endpoint_external: "{{ probe_endpoints }}"
|