0
0
Fork 0
mirror of https://github.com/alerta/alerta.git synced 2025-01-24 17:29:39 +00:00
alerta_alerta/examples/delete-ack-alerts.sh
2012-11-27 08:40:20 +00:00

8 lines
258 B
Bash
Executable file

#!/bin/bash
# Script to delete all ACK'ed alerts
/opt/alerta/sbin/alert-query.py --status ACK --no-header --no-footer | awk -F"|" ' { print $1 } ' | while read id
do
curl -XDELETE http://${1:-'monitoring.gudev.gnl'}/alerta/api/v1/alerts/alert/$id
done