Skip to content

Commit 28a8b74

Browse files
authored
[test_alerts] Update the command for checking the alert in alert manager (#179)
The prometheus container in the prometheus-default pod no longer has wget included The equivalent curl command is used instead.
1 parent 097c999 commit 28a8b74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

roles/test_alerts/tasks/test_creating_a_standard_alert_route_in_alert_manager.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
- name: "RHELOSP-148698 Verify that the alert is active in Alertmanager"
4444
ansible.builtin.shell:
4545
cmd: >-
46-
oc exec -it prometheus-default-0 -c prometheus -- /bin/sh -c 'wget --header \
46+
oc exec -it prometheus-default-0 -c prometheus -- /bin/sh -c 'curl -k -H \
4747
"Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \
48-
https://default-alertmanager-proxy:9095/api/v1/alerts -q -O -' | grep 'active' | grep 'Collectd metrics receive rate is zero' | wc -l
48+
https://default-alertmanager-proxy:9095/api/v1/alerts' | grep 'active' | grep 'Collectd metrics receive rate is zero' | wc -l
4949
register: cmd_output
5050
changed_when: false
5151
failed_when: cmd_output.stdout|int == 0

0 commit comments

Comments
 (0)