fix(monitoring): проверять Xray по HTTP-статусу, а не по IP
ansible-core-mon / deploy (push) Successful in 31s
ansible-core-mon / deploy (push) Successful in 31s
Профиль ноды блокирует api.ipify.org, поэтому метод ip всегда помечал рабочий прокси офлайн. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b6d6db9e2c
commit
b69e1c8f93
2 files changed
+7
No files matched your search
@@ -144,6 +144,7 @@
|
||||
group: root
|
||||
mode: "0600"
|
||||
no_log: true
|
||||
register: xray_checker_env
|
||||
when: xray_checker_subscription_url | length > 0
|
||||
|
||||
- name: Scrape Xray Checker
|
||||
@@ -169,6 +170,11 @@
|
||||
register: compose_up
|
||||
changed_when: "'Started' in compose_up.stderr or 'Created' in compose_up.stderr or 'Recreated' in compose_up.stderr or 'Pulled' in compose_up.stderr"
|
||||
|
||||
- name: Пересоздать Xray Checker, чтобы подхватить метод проверки
|
||||
ansible.builtin.command: docker compose -f {{ monitoring_dir }}/compose.yaml up -d --force-recreate --no-deps xray-checker
|
||||
when: xray_checker_env is changed
|
||||
changed_when: true
|
||||
|
||||
- name: Пересоздать Prometheus, чтобы подхватить конфиг
|
||||
ansible.builtin.command: docker compose -f {{ monitoring_dir }}/compose.yaml up -d --force-recreate --no-deps prometheus
|
||||
when: prometheus_config is changed or prometheus_alerts is changed or monitoring_compose is changed
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
SUBSCRIPTION_URL={{ xray_checker_subscription_url }}
|
||||
PROXY_CHECK_METHOD=status
|
||||
PROXY_STATUS_CHECK_URL=http://google.com/generate_204
|
||||
PROXY_CHECK_INTERVAL=60
|
||||
Reference in new issue
Block a user