0
0
Fork 0
mirror of https://github.com/alerta/alerta.git synced 2025-01-26 02:08:31 +00:00
alerta_alerta/contrib/examples/delete-ack-alerts.sh
2013-02-17 10:55:54 +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