NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Active IQ Unified Manager Discussions

Ack & delete alarms from CLI

bmorse
8,419 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
8,419 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
8,419 Views

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

prasads
8,419 Views

Hi

A similar issue was already discussed in the past

Check this link

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

Regards,

Prasad

adaikkap
8,419 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
7,924 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