A failed HTTPS check is retried (3 attempts, 2 s apart). If all attempts fail, the agent runs traceroute -4 -n to the target's IPv4 address in a separate process, polls it every 5 s (90 s limit) and posts the full output as a traceroute_result event for the address. The agent waits for traces before reporting completion, while the floating IP is attached. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
57 lines
3.3 KiB
YAML
57 lines
3.3 KiB
YAML
# Validator-agent configuration. Runs on each validator VM. validator_id
|
||
# must match one of the control-api config's `validators[].validator_id`.
|
||
|
||
validator_id: "validator_01"
|
||
control_api_url: "http://control-api.internal:8080"
|
||
# Имя переменной окружения с токеном агентов control-api (тот же, что у
|
||
# prober; CONTROL_API_AGENT_TOKEN на стороне control-api). Нужен для записи
|
||
# результатов/событий; register/heartbeat/получение задания работают без него.
|
||
# Токен отправляется только в control-api — не на ip_echo_urls и не на цели
|
||
# проверок.
|
||
control_api_token_env: "CONTROL_API_AGENT_TOKEN"
|
||
poll_interval_seconds: 5
|
||
|
||
self_check:
|
||
timeout_seconds: 10
|
||
# Способы самопроверки в порядке приоритета (допустимо: ip_echo,
|
||
# control_api); по умолчанию [ip_echo]. Самопроверка успешна, если адрес
|
||
# подтвердил любой способ: пробуются по порядку, остановка на первом
|
||
# успешном, к следующему переходим и при отсутствии ответа, и при
|
||
# несовпадении адреса. Таймаут timeout_seconds действует на каждый способ
|
||
# отдельно (зависший первый способ не лишает второй времени). control_api спрашивает у control-api, с какого адреса он видит
|
||
# это соединение; рекомендуется [control_api, ip_echo], когда control-api
|
||
# стоит вне облака и валидатор ходит к нему напрямую (через внешнюю сеть).
|
||
# Ограничение: если control-api достижим по внутренней сети облака, он
|
||
# увидит частный адрес валидатора и control_api всегда даст несовпадение —
|
||
# тогда оставьте только ip_echo (или он сработает вторым в списке).
|
||
methods: [control_api, ip_echo]
|
||
# Used by the ip_echo method. Must be a resource genuinely outside the cloud project — OpenStack only
|
||
# applies floating-IP SNAT to traffic leaving via the external network,
|
||
# so anything reachable over the project's internal network (including
|
||
# control-api itself, if it's on the same internal network) would report
|
||
# this validator's private address instead, regardless of whether the
|
||
# floating IP is correctly attached. Tried in order; falls through to the
|
||
# next URL only on error/timeout, never on a genuine mismatch. Defaults
|
||
# to these two public services if omitted.
|
||
ip_echo_urls:
|
||
- "https://api.ipify.org"
|
||
- "https://ifconfig.me/ip"
|
||
|
||
checks:
|
||
https_timeout_seconds: 10
|
||
# Attempts per HTTPS URL (first + retries) and pause between them.
|
||
https_attempts: 3
|
||
https_retry_delay_seconds: 2
|
||
# Background traceroute (IPv4) after an HTTPS check fails on all attempts;
|
||
# result goes to the address event log as "traceroute_result".
|
||
traceroute:
|
||
enabled: true
|
||
timeout_seconds: 90
|
||
max_hops: 30
|
||
poll_interval_seconds: 5
|
||
icmp_timeout_seconds: 5
|
||
icmp_count: 3
|
||
ssh:
|
||
enabled: false
|
||
timeout_seconds: 5
|