Subscribe

Ack & delete alarms from CLI

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

Re: Ack & delete alarms from CLI

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

Re: Ack & delete alarms from CLI

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

Re: Ack & delete alarms from CLI

Hi

A similar issue was already discussed in the past

Check this link

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

Regards,

Prasad

Re: Ack & delete alarms from CLI

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.

Re: Ack & delete alarms from CLI

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.