diff --git a/ansible/roles/prometheus/files/alert_ooni.yml b/ansible/roles/prometheus/files/alert_ooni.yml index e43397ed..a84b2732 100644 --- a/ansible/roles/prometheus/files/alert_ooni.yml +++ b/ansible/roles/prometheus/files/alert_ooni.yml @@ -27,4 +27,10 @@ groups: summary: 'Mirror {{ $labels.instance }} lags by {{ $value | humanizeDuration }}' description: '{{ if eq $labels.instance "ooni.torproject.org:443" }}Run `make update-site`.{{ end }}' + - alert: TestHelperDown + expr: up{domain!=""} != 1 + for: 5m + annotations: + summary: 'test helper down: {{ $labels.instance }} ({{ $labels.domain }})' + ... diff --git a/ansible/roles/prometheus/vars/main.yml b/ansible/roles/prometheus/vars/main.yml index 1e819869..e9db75b1 100644 --- a/ansible/roles/prometheus/vars/main.yml +++ b/ansible/roles/prometheus/vars/main.yml @@ -1,8 +1,6 @@ dom0_hosts: - ams-slack-1.ooni.org - doams1-countly.ooni.nu - - mia-echoth.ooni.nu - - mia-httpth.ooni.nu blackbox_jobs: # TODO add these records to the ALB config @@ -51,22 +49,27 @@ blackbox_jobs: # cloudfront - "https://d3kr4emv7f56qa.cloudfront.net/bouncer/net-tests" - # IP addresses are used for test-helpers in monitoring configuration for some - # historical reason hopefully remembered by @hellais. + - name: "ooni explorer homepage" + module: "http_2xx" + targets: + - "https://explorer.ooni.org/" + + # We use IP monitoring since this is what is served to users through check-in. - name: "ooni tcp echo" module: "ooni_tcp_echo_ok" + ignore_instance_down: true # covered by the more specific TestHelperDown alert + labels: + domain: "echo.th.prod.ooni.io" targets: - - "{{ lookup('dig', 'c.echo.th.ooni.io/A') }}:80" + - "{{ lookup('dig', 'echo.th.prod.ooni.io/A') }}:80" - name: "ooni http return json headers" module: "ooni_http_return_json_headers_ok" + ignore_instance_down: true # covered by the more specific TestHelperDown alert + labels: + domain: "json.th.prod.ooni.io" targets: - - "http://{{ lookup('dig', 'a.http.th.ooni.io/A') }}:80" - - - name: "ooni explorer homepage" - module: "http_2xx" - targets: - - "https://explorer.ooni.org/" + - "http://{{ lookup('dig', 'json.th.prod.ooni.io/A') }}:80" # API #