Documenting Alerts?

wullsywullsy Posts: 10
edited June 22, 2016 2:37PM in SQL Monitor Previous Versions
Hi,

I want to go through all my alerts, discuss with the team the current values and change a few to a more appropriate value.
Is there an easy way to export all the current alerts, values, descriptions etc to a csv?
Failing that, a sql query I could use to pull the data out would be good.
I can see a list of the alerts in alert.Alert_Type but can't see how to join to the values.
I'm trying to pull out the custom alerts too.

cheers,

Comments

  • Alex BAlex B Posts: 1,131 Diamond 4
    Hi wullsy,

    Officially we don't support direct querying of the database and I don't have the specific query to do this on hand.

    However, since it's common for alert configuration at different levels of the hierarchy to be an issue, the developers have included a script to get this information in the SQLMonitorLogs.zip file received when you go to Configuration > About > Retrieve all log files (under Diagnostics at the bottom). In the zip folder there is a sub-folder named RepositoryInformation and within that the file AlertConfiguration.csv.

    This file, among other things, displays the level at which the configuration applies (root being all servers), the configuration XML and whether the alert is enabled at that level.

    The XML for the Long-running query looks like this (though not formatted as nicely):
    <Config xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns=""v1"">
    <HighTimeSpan>120</HighTimeSpan><HighEnabled>false</HighEnabled>
    <MediumTimeSpan>90</MediumTimeSpan><MediumEnabled>false</MediumEnabled>
    <LowTimeSpan>60</LowTimeSpan><LowEnabled>true</LowEnabled>
    <IgnoreCommand />
    <IgnoreProcess />
    </Config>
    

    This example shows that there is only the Low level enabled, it's set for 60 seconds and I'm not excluding anything by Process Name or Command text.

    I hope this helps!

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.