4 Replies Latest reply on Mar 8, 2012 6:51 PM by Breclawm

    Alert report showing last 7 days plus notes

    Galaxe

      I'm trying to write a report that will show all alerts for the last 7 days including the notes made while the alerts were active.  Is this possible?

      I have the alerts for the last 7 days working but can not find how to add the notes. 

       

      SQL statement, keeping in mind the report runs on Mondays.

      SELECT     ObjectName, Message, LogDateTime
      FROM         AlertLog
      WHERE LogDateTime >=DATEADD(day,datediff(day,0,GetDate())-8,0) AND LogDateTime <=DATEADD(day,datediff(day,0,GetDate())-1,0) AND Message like 'Alert %'
      GROUP BY  ObjectName, LogDateTime, Message

       

      Any help or guidance is appreciated.

        • Re: Alert report showing last 7 days plus notes
          mdriskell

          I don't think this is possible but perhaps a member of SW Staff can confirm.

           

          The notes are in the AlertStatus table which only shows active alerts, from what I have been able to tell the notes don't make it into the AlertLog table (or any other) which is where the historical data is kept.  

          I was extremely happy when alert notes were added to Solarwinds but it seems rather short sighted that these are not retained in any fashion.

            • Re: Alert report showing last 7 days plus notes
              docwhite

              mdriskell is correct; the $Note variable that captures information related to a given alert functions as a runtime cache. There is not permanent record of what is held by the variable.

              Sorry to disappoint. I assume you would like a permanent record and I'll call this to the product manager's attention as an enhancement request.

               

              Doug

                • Re: Alert report showing last 7 days plus notes
                  mdriskell

                  Doug,

                  Having access to not only the alert notes but also the acknowledgement info (who & when) are a valuable part of any auditing.

                  I have had to go back numerous times to try to find information which is simply not available anywhere.

                    • Re: Alert report showing last 7 days plus notes
                      Breclawm

                      I have just come across this requirement and need this like yesterday!  Im running NPM 10.2 and use strictly Advanced alerts.  As a cumbersome workaround, I have a reset action to write a message to the NPM event log which includes ${Node}, ${Node.status}, $(Acknowledgedby}, ${Acknowledged DateTime}, ${SQL: Select 'Notes' From AlertStatus}

                      There is one issue with this, at least on my system, and that is in the AlertStatus table the field 'Notes' puts in an extra line feed before the actual data so when viewing that piece of a report or message it appears to be null, but doing a copy/paste directly from the DB table field shows the data with a blank line in from of it. 

                      Im currently working with tech support on this issue.

                      IF there were a nice way to combine the best of alerts (acknowledgements & notes) with the NPM Event feature (historical data) my life would be wonderful!

                       

                      mb