diff --git a/playbooks/deploy.yml b/playbooks/deploy.yml index f6e3c2672..d1230c5df 100644 --- a/playbooks/deploy.yml +++ b/playbooks/deploy.yml @@ -29,6 +29,7 @@ in_a_nutshell: "{{ nutshell | default(false) | bool }}" run_refstack: "{{ refstack | default(false) | bool }}" + run_prometheus_alert_status: "{{ prometheus_alert_status | default(false) | bool }}" tasks: - name: Set facts (Zuul deployment) @@ -197,3 +198,11 @@ - not manual_deploy | bool - run_refstack | bool changed_when: true + + - name: Check prometheus alert status + ansible.builtin.command: + cmd: "ssh -i {{ terraform_path }}/.id_rsa.{{ cloud_env }} dragon@{{ manager_host }} /opt/configuration/scripts/check/303-prometheus-alert-status.sh" + when: + - not manual_deploy | bool + - run_prometheus_alert_status | bool + changed_when: true diff --git a/scripts/check/303-prometheus-alert-status.sh b/scripts/check/303-prometheus-alert-status.sh new file mode 100755 index 000000000..3f5664920 --- /dev/null +++ b/scripts/check/303-prometheus-alert-status.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +set -x +set -e + +echo +echo "# Checking for active prometheus alerts" +echo + +osism apply prometheus-alert-status