13 Replies Latest reply: Oct 21, 2013 5:23 AM by YONI.SHPERLING RSS

mass acknowledgement?

stading NetApp Employee Novice
Currently Being Moderated

IHAC for which I need to identify a process to perform a mass acknowledgement of all existing events/alerts on an Operations Manager instance.  Is there a 'dfm option' I can leveredge here?  Or some other option?

Thanks,

Rick Stading

  • Re: mass acknowledgement?
    adaikkap NetApp Employee Grand Marshal
    Currently Being Moderated

    Hi Rick,

              Attached is a simple script written by one of my collegues, to acknowledge and delete dfm events.

    What you may do is comment out the delete part and use it.

     

    Regards

    adai

     

     

    PS: The credit goes to the owenr of the script  Prasad S.

    • Re: mass acknowledgement?
      sinhaa NetApp Employee Kart Racer
      Currently Being Moderated

      This thing may not even need a script, a simple shell command one line will do it.

       

      On LINUX host:

       

      for i in `dfm event list -q|tr -s ' '|cut -d " " -f 2`; do dfm event ack $i; done

       

      This will work on windows as well if you use cygwin host.

       

      warm regards,

      Abhishek

      • Re: mass acknowledgement?
        adaikkap NetApp Employee Grand Marshal
        Currently Being Moderated

        what will windows DFM admin do ?

        Will  the commad work ?

         

        Perl makes it OS agnostic.

        • Re: mass acknowledgement?
          sinhaa NetApp Employee Kart Racer
          Currently Being Moderated

          @

           

          what will windows DFM admin do ?

          Will  the commad work ?

           

          ----------------------------------------

           

          I think you missed it. I mentioned this in my last post itself that this works with windows as well if the users use a cygwin environment. cygwin a great utility for windows.

          www.cygwin.com/

           

           

          @

           

          Perl makes it OS agnostic.

           

          ----------------------------------------------

           

          Not hardly. It needs a perl installation on windows.

          • mass acknowledgement?
            sinhaa NetApp Employee Kart Racer
            Currently Being Moderated

            Infact cygwin comes with Perl as well or anything one always wanted in a windows environment.

             

            http://en.wikipedia.org/wiki/Cygwin#Features

            • Re: mass acknowledgement?
              arne.asmus Novice
              Currently Being Moderated

              Hello together,

               

              i have solved this with an Powershell Script:

              <dfm-event-delete.ps1>

              dfm event list -q | Select-String -Pattern "(?<ID>[0-9]+)" | select-object @{Name="ID";Expression={$_.Matches[0].Groups["ID"].Value}} | foreach {dfm event delete $_.ID}

              </dfm-event-delete.ps1>

               

              Regards Arne

              • Re: mass acknowledgement?
                peter.lehmann Hall of Fame Certified Kart Racer
                Currently Being Moderated

                Hi everybody

                 

                Is there a way to enhance the POSH script to ONLY delete the INFORMATION Events?

                My customer is having to delete up to 3000 Information Events per day...

                 

                Thanks in advance,

                Peter

                • Re: mass acknowledgement?
                  pascalduk Kart Racer
                  Currently Being Moderated

                  Perhaps it helps to list only all the information events:

                   

                  dfm event list -S information

                • Re: mass acknowledgement?
                  adaikkap NetApp Employee Grand Marshal
                  Currently Being Moderated

                  Hi Peter,

                       OCUM 5.2 has a feature, which during upgrade or restore deletes all events irrespective of the severity beyond the minimum of (value of eventsPurgeInterval or 180days).

                   

                  And as you said, there is the dfm purge cli's as well.

                   

                  Regards

                  adai

                • Re: mass acknowledgement?
                  MAMMANN Novice
                  Currently Being Moderated

                  Hi Peter,

                   

                  Had the same problem. I wrote the attached Windows Command-Line Script for getting this done.

                   

                  best regards,

                   

                  Matthias

                  • Re: mass acknowledgement?
                    adaikkap NetApp Employee Grand Marshal
                    Currently Being Moderated

                    Hi Peter,

                             With OCUM 5.2RC1 and later, you may not need this, as there is a inbuilt cli to purge the events.

                    [root@vmlnx ~]# dfm purge help

                     

                     

                    NAME

                        purge -- purge events and data protection job events from the Database.

                     

                     

                    SYNOPSIS

                        dfm purge event [-S <Severity>] [-s] <purge-interval>

                        dfm purge dpevent [-J <jobId>] [-s] <purge-interval>

                     

                     

                    DESCRIPTION

                        The purge command purge the events and data protection job events from database

                     

                     

                        -S <Severity>

                            Purge the events whose severity is less than or equal to <Severity>.

                     

                     

                        -s

                            Show the details about the events without cleaning up them fom DB.

                     

                     

                        -J <JobId>

                            Purge the dpevents whose JobId is less than or equal to <JobId>.

                     

                     

                    [root@vmlnx ~]#

                     

                    [root@vmlnx ~]# dfm purge event help

                     

                     

                    NAME

                        event -- purge events that are older than interval

                     

                     

                    SYNOPSIS

                        dfm purge event [-S <Severity>] [-s] <purge-interval>

                     

                     

                    DESCRIPTION

                        This command is used to purge history events that are older than purge interval.

                     

                     

                        -S <Severity>

                             Purge only the events which has severity equal or less than 'Severity'

                     

                     

                        -s

                             Shows the details of the events, without cleaning up them from DB

                     

                     

                     

                     

                    [root@vmlnx~]#

                     

                    Regards

                    adai

              • Re: mass acknowledgement?
                YONI.SHPERLING Novice
                Currently Being Moderated

                Great

                 

                 

                Thanks !

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points