5 Replies Latest reply on Apr 2, 2012 12:06 AM by Andy Ng

    Reporting Question

    ahthomas

      I need to create a report showing historical data of all events triggered for certain alerts that I have configured. How do I do that?

        • Re: Reporting Question
          pacetti

          ahthomas,

          To create a report showing historical data of all events triggered for certain alerts:

          1. Click Start > All Programs > SolarWinds Orion > Alerting, Reporting, and Mapping > Report Writer.
          2. In the left pane, under Events, click Triggered Alerts - Last 30 Days.
          3. Configure conditions on Report Designer tabs to select the the alerts you want to see.
            Note: For more information, see "Creating and Modifying Reports" in the SolarWinds Orion NPM Administrator Guide.

          HTH,

            • Re: Reporting Question
              ahthomas

              That doesn't work. I can't get anything from my advanced alerts...

                • Re: Reporting Question
                  Michael Melton

                  Ensure that your Alerts have a Trigger Action to log to the NetPerfMon Event Log. If this isn't set I don't believe it will show the Event if it is only set to send Emails.

                    • Re: Reporting Question
                      ahthomas

                      Ahh that's it... well the SQL DB logs to the AlertLogs table. Anybody have a proper way to query that for a result? This one isn't working correctly for me...

                       

                      select ObjectName,Message,LogDateTime from AlertLog
                      where LogDateTime >= (GetDate() - 7)
                      and Message='Alert Triggered'
                      and ObjectName like 'someserver%'
                      or ObjectName like 'someserver2%'
                      or ObjectName like 'someserver3%'
                      and LogDateTime >= (GetDate() - 7)
                      order by 3 desc

                       

                      I censored out server names, but essentially I'm getting results back to 2011 and not all servers are being queried.

                        • Re: Reporting Question
                          Andy Ng

                          ahthomas,

                           

                          I managed to get based on LogDateTime >= (GetDate() - 7)

                           

                          The following is what I did:

                           

                          1. Used the following query to confirm if the date is reported correctly: SELECT GETDATE()

                           

                          2. Ran the following to confirm that earliest date that I should see the from the AlertLog events: SELECT GETDATE() - 7

                           

                          3. I am not sure if it is the AND and OR in the statements that messed up the querying, but the following is what I used. I also noticed that you used GetDate() twice:

                           

                          SELECT ObjectName, Message, LogDateTime

                          FROM AlertLog

                          WHERE

                          LogDateTime >= (GetDate() - 7)

                          AND Message='Alert Triggered'

                          AND

                          ( ObjectName LIKE 'someserver%'

                          OR ObjectName LIKE 'someserver1%' )

                          ORDER BY 3 desc

                           

                          HTH.