45 lines
2 KiB
YAML
45 lines
2 KiB
YAML
|
|
---
|
||
|
|
# The Signal transport for Gatus alerts.
|
||
|
|
#
|
||
|
|
# Deliberately NOT published and NOT fronted by Caddy: the API has no
|
||
|
|
# authentication of any kind, so it is reachable only from the shared docker
|
||
|
|
# network that Gatus is on. See roles/signal_api/README.md, including the
|
||
|
|
# one-time manual step to link the device.
|
||
|
|
- name: Deploy the Signal API on the observability host
|
||
|
|
hosts: observability
|
||
|
|
become: yes
|
||
|
|
roles:
|
||
|
|
- signal_api
|
||
|
|
|
||
|
|
# post_tasks, not a second play: the registration below needs the role's
|
||
|
|
# defaults (service name, port) in scope, and a separate play would not have
|
||
|
|
# them.
|
||
|
|
post_tasks:
|
||
|
|
# Monitored, because a dead alert transport is the worst kind of dead: every
|
||
|
|
# check could be failing and nothing would tell you. Gatus polls it over the
|
||
|
|
# shared network - the same path the alerts take - so this proves the actual
|
||
|
|
# delivery route rather than merely that a container is running.
|
||
|
|
#
|
||
|
|
# Deliberately NOT backed up: the data directory holds Signal private keys,
|
||
|
|
# and the recovery path is to link the device again from the phone. Backing
|
||
|
|
# it up would copy a credential off the host to buy nothing.
|
||
|
|
- name: Register the signal-api health endpoint with Gatus
|
||
|
|
ansible.builtin.include_role:
|
||
|
|
name: gatus_endpoint
|
||
|
|
vars:
|
||
|
|
gatus_endpoint_name: signal-api
|
||
|
|
gatus_endpoint_pulled:
|
||
|
|
- name: signal-api
|
||
|
|
group: infrastructure
|
||
|
|
url: "http://{{ signal_api_service_name }}:{{ signal_api_port }}/v1/health"
|
||
|
|
interval: 5m
|
||
|
|
# Deliberately NOT alerted via Signal: if this endpoint is down,
|
||
|
|
# Signal is exactly what cannot deliver the alert. It is visible on
|
||
|
|
# the dashboard, and its failure shows up indirectly as every other
|
||
|
|
# alert going missing.
|
||
|
|
conditions:
|
||
|
|
# /v1/health answers 204 No Content, not 200 - checked live. Any
|
||
|
|
# 2xx is asserted rather than the exact code, so an upstream
|
||
|
|
# change from 204 to 200 does not read as an outage.
|
||
|
|
- "[STATUS] < 300"
|