Community Archive (Customer) asked a question.

Reports
I need to produce reports showing the number of sent emails per week for: disks, CPU, RAM, Active Monitors and Passive Monitors. I need to do that for all the servers (or for a group) and not per device. I need a single report for all. Can someone tell me where I can  find a database schema in order to identify the needed tables to do that ? ( version :16.3.2 build 538 premium edition) Thanks in advance for your help. Hanane

  • To get you off to a start, the following SQL will display a list all instances of when an Active Monitor's state changed to down. You can add a date range and maybe some groupings to suit your requirements.
    SELECT        ActiveMonitorStateChangeLog.dStartTime, ActiveMonitorType.sMonitorTypeName, Device.sDisplayName

    FROM            ActiveMonitorStateChangeLog INNER JOIN

                             ActiveMonitorType ON ActiveMonitorStateChangeLog.nPivotActiveMonitorTypeToDeviceID = ActiveMonitorType.nActiveMonitorTypeID INNER JOIN

                             Device ON ActiveMonitorStateChangeLog.nPivotActiveMonitorTypeToDeviceID = Device.nDeviceID

    WHERE        (ActiveMonitorStateChangeLog.nMonitorStateID = 3)
  • Thanks Paul for your answer.
    I don't find all informations in the table dbo.ActionActivityLog. disks, cpu, ram and passive monitors alerts are missing in this table.
    I would like to use "SQL reporting services" to get all this infomartions weekly using one report.
    Thanks so much for your help.
  • Thank you so much for your help, I will try this next week and let you know if it's ok.
    Hanane
  • I am guessing that the main table you are after is dbo.ActionActivityLog
    You could also add an action to your alert policies which write your alerts to a text file and use those text files to generate your reports.
  • Hi Hannae
    Yes it has all the information you require.
    This is an SQL database so the data is not stored in a flat format. The data is related to other tables.
    Explore the table structure a bit and you should get the information you require by using joins to other tables.
    Andrei
  • Hi all,
    Just a reminder, Ipswitch does not support accessing the WUG database directly as the WUG database may change at any time in the future without notice or backward compatibility. 
    Robbie