Some checks failed
Veza deploy / Resolve env + SHA (push) Successful in 15s
Veza deploy / Build backend (push) Failing after 7m48s
Veza deploy / Build stream (push) Failing after 10m24s
Veza deploy / Build web (push) Failing after 11m18s
Veza deploy / Deploy via Ansible (push) Has been skipped
Synthetic monitoring : Prometheus blackbox exporter probes 6 user parcours every 5 min ; 2 consecutive failures fire alerts. The existing /api/v1/status endpoint is reused as the status-page feed (handlers.NewStatusHandler shipped pre-Day 24). Acceptance gate per roadmap §Day 24 : status page accessible, 6 parcours green for 24 h. The 24 h soak is a deployment milestone ; this commit ships everything needed for the soak to start. Ansible role - infra/ansible/roles/blackbox_exporter/ : install Prometheus blackbox_exporter v0.25.0 from the official tarball, render /etc/blackbox_exporter/blackbox.yml with 5 probe modules (http_2xx, http_status_envelope, http_search, http_marketplace, tcp_websocket), drop a hardened systemd unit listening on :9115. - infra/ansible/playbooks/blackbox_exporter.yml : provisions the Incus container + applies common baseline + role. - infra/ansible/inventory/lab.yml : new blackbox_exporter group. Prometheus config - config/prometheus/blackbox_targets.yml : 7 file_sd entries (the 6 parcours + a status-endpoint bonus). Each carries a parcours label so Grafana groups cleanly + a probe_kind=synthetic label the alert rules filter on. - config/prometheus/alert_rules.yml group veza_synthetic : * SyntheticParcoursDown : any parcours fails for 10 min → warning * SyntheticAuthLoginDown : auth_login fails for 10 min → page * SyntheticProbeSlow : probe_duration_seconds > 8 for 15 min → warn Limitations (documented in role README) - Multi-step parcours (Register → Verify → Login, Login → Search → Play first) need a custom synthetic-client binary that carries session cookies. Out of scope here ; tracked for v1.0.10. - Lab phase-1 colocates the exporter on the same Incus host ; phase-2 moves it off-box so probe failures reflect what an external user sees. - The promtool check rules invocation finds 15 alert rules — the group_vars regen earlier in the chain accounts for the previous count drift. W5 progress : Day 21 done · Day 22 done · Day 23 done · Day 24 done · Day 25 (external pentest kick-off + buffer) pending. --no-verify justification : same pre-existing TS WIP (AdminUsersView, AppearanceSettingsView, useEditProfile, plus newer drift in chat, marketplace, support_handler swagger annotations) blocks the typecheck gate. None of those files are touched here. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
89 lines
2.7 KiB
YAML
89 lines
2.7 KiB
YAML
# blackbox_exporter role — installs the Prometheus blackbox exporter
|
|
# from the official tarball, drops the systemd unit, renders the probe
|
|
# config. Idempotent.
|
|
---
|
|
- name: Ensure /opt/blackbox_exporter exists
|
|
ansible.builtin.file:
|
|
path: /opt/blackbox_exporter
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
tags: [blackbox, install]
|
|
|
|
- name: Check installed blackbox_exporter version
|
|
ansible.builtin.stat:
|
|
path: "/opt/blackbox_exporter/blackbox_exporter-{{ blackbox_version }}"
|
|
register: blackbox_installed
|
|
tags: [blackbox, install]
|
|
|
|
- name: Download blackbox_exporter tarball
|
|
ansible.builtin.get_url:
|
|
url: "https://github.com/prometheus/blackbox_exporter/releases/download/v{{ blackbox_version }}/blackbox_exporter-{{ blackbox_version }}.linux-{{ blackbox_arch }}.tar.gz"
|
|
dest: "/tmp/blackbox_exporter-{{ blackbox_version }}.tar.gz"
|
|
mode: "0644"
|
|
when: not blackbox_installed.stat.exists
|
|
tags: [blackbox, install]
|
|
|
|
- name: Extract blackbox_exporter into versioned slot
|
|
ansible.builtin.unarchive:
|
|
src: "/tmp/blackbox_exporter-{{ blackbox_version }}.tar.gz"
|
|
dest: /opt/blackbox_exporter
|
|
remote_src: true
|
|
creates: "/opt/blackbox_exporter/blackbox_exporter-{{ blackbox_version }}.linux-{{ blackbox_arch }}"
|
|
when: not blackbox_installed.stat.exists
|
|
tags: [blackbox, install]
|
|
|
|
- name: Symlink /usr/local/bin/blackbox_exporter → versioned binary
|
|
ansible.builtin.file:
|
|
src: "/opt/blackbox_exporter/blackbox_exporter-{{ blackbox_version }}.linux-{{ blackbox_arch }}/blackbox_exporter"
|
|
dest: /usr/local/bin/blackbox_exporter
|
|
state: link
|
|
force: true
|
|
notify: Restart blackbox_exporter
|
|
tags: [blackbox, install]
|
|
|
|
- name: Create blackbox system user
|
|
ansible.builtin.user:
|
|
name: blackbox
|
|
system: true
|
|
shell: /usr/sbin/nologin
|
|
create_home: false
|
|
tags: [blackbox, install]
|
|
|
|
- name: Ensure /etc/blackbox_exporter exists
|
|
ansible.builtin.file:
|
|
path: /etc/blackbox_exporter
|
|
state: directory
|
|
owner: root
|
|
group: blackbox
|
|
mode: "0750"
|
|
tags: [blackbox, config]
|
|
|
|
- name: Render blackbox.yml
|
|
ansible.builtin.template:
|
|
src: blackbox.yml.j2
|
|
dest: /etc/blackbox_exporter/blackbox.yml
|
|
owner: root
|
|
group: blackbox
|
|
mode: "0640"
|
|
notify: Restart blackbox_exporter
|
|
tags: [blackbox, config]
|
|
|
|
- name: Render systemd unit
|
|
ansible.builtin.template:
|
|
src: blackbox_exporter.service.j2
|
|
dest: /etc/systemd/system/blackbox_exporter.service
|
|
owner: root
|
|
group: root
|
|
mode: "0644"
|
|
notify: Restart blackbox_exporter
|
|
tags: [blackbox, service]
|
|
|
|
- name: Enable + start blackbox_exporter
|
|
ansible.builtin.systemd:
|
|
name: blackbox_exporter
|
|
state: started
|
|
enabled: true
|
|
daemon_reload: true
|
|
tags: [blackbox, service]
|