Active IQ Unified Manager Discussions

Ack & delete alarms from CLI

bmorse
6,943 Views

Can I acknowledge and/or delete all alarms for the cli?  The command dfm event ack and dfm event delete do not accept wildcards.

5 REPLIES 5

adaikkap
6,943 Views

It doesn’t take any wildcard.

But you can use something like this, if yours is a linux dfm server.

for i in `dfm alarm list -q | awk '{ print $1 }'`; do dfm alarm delete $i ; done

for I in dfm event list –q | awk awk '{ print $1 }'`; do dfm event ack $i;dfm event delete $i;done.

Regards

adai

bmorse
6,943 Views

This is Windows.  Thanks I'll have to come up with something similar.

prasads
6,943 Views

Hi

A similar issue was already discussed in the past

Check this link

http://communities.netapp.com/message/29795#29795

Regards,

Prasad

adaikkap
6,943 Views

Attaching the script that prasad, pointed in the earlier post here, for the convinence of others as that is a closed community.

And not everyone might have access.

Regards

adai

PS:All credit for this goes to the owner/developer of the script Prasad S.

CHRIS_K_AU
6,448 Views

Try this in an elevated Powershell console:

 

 

$command="dfm event delete "; $i=<starting event ID>; while( $i -lt <ending event ID>) { $command += $i; $command += " " ; $i++}; invoke-expression $command

No NetApp PS tools required in this case.

If your range is too great it might hit a maximum line/command length limit in PS, if there is one. I ack'd then deleted about 500 events in one go without a hitch.

 

Public