Start a Conversation

Unsolved

This post is more than 5 years old

2350

October 19th, 2017 13:00

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?

30 Posts

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!

48 Posts

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

No Events found!

Top