Skip to content

Commit

Permalink
Allow check of prometheus alert status
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Horstmann <[email protected]>
  • Loading branch information
janhorstmann committed May 3, 2024
1 parent 492c3f4 commit 15d2f39
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions playbooks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
9 changes: 9 additions & 0 deletions scripts/check/303-prometheus-alert-status.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 15d2f39

Please sign in to comment.