Unsolved
This post is more than 5 years old
18 Posts
1
2350
How to clear critical alerts in one command
I have over 200 critical alerts and don't see a way how to clear them all at once. Does anybody knows how to do it?
Unsolved
This post is more than 5 years old
18 Posts
1
2350
I have over 200 critical alerts and don't see a way how to clear them all at once. Does anybody knows how to do it?
Top
jroczniak
30 Posts
0
November 7th, 2017 06:00
I am looking for this as well. I want an easy way to "Acknowledge" everything quickly, instead of one at a time. very frustrating when testing and generating a ton of alerts.
Thanks!
urle
48 Posts
1
May 16th, 2018 02:00
Quick'n dirty:
#!/bin/bash
curl -s -L --location-trusted -k https://ECS-host:4443/login\?using-cookies=true -u ECS-user -c ~/.ecs_cookie
curl -s -k https://ECS-host:4443/vdc/alerts -b ~/.ecs_cookie | xmllint --format - | \
awk '/ / { sub(".* ",""); sub(" ",""); printf "curl -s -k -X PUT https://ECS-host:4443/vdc/alerts/%s/acknowledgment -b ~/.ecs_cookie\n", $0 }' > /tmp/ecs_alert.$$
rm -f /tmp/ecs_alert.$$
-urle