How to create a custom alert with an email notification

Applies to
ApexSQL Audit

Summary
This article describes how to set an email notification for a default and custom alerts

Description

To set up an email alert for existing alerts click the Edit button under the Manage tab under the Alerts tab:

In the Edit alert dialog change the severity, name, subject, and a body of the alert or just click the Next button:

In the next window of the Edit alert dialog set the interval to check the metric you want to track and click Next:

In the next window set up an email alert:

  1. Select the Send this alert report via email check box. Under Account click on the Click here to configure an account for sending e-mail link:

  2. In the Account settings dialog enter smtp settings, email, and port, and click the OK button:

  3. Enter a recipients name and click Next. Review a summary dialog and if everything is ok click OK:

  4. To check if an account set up is set properly select Send test email option and click Next:

Creating custom alerts

To create a custom alert click the New button and from the drop down list select the Data alert or the Custom script alert

Custom script alert

  1. Enter a name, subject, and a body of a new alert:

  2. Select a server to monitor in the Server deployment window:

  3. Enter a SQL script in a Conditions window:

    Quick tip icon

    Quick tip:

    A custom SQL script must return a numeric value to be used as a trigger for an alert if a value returned by a script is larger than a value specified in a trigger text box.

  4. Click Next and perform the same steps as for the built in alerts regarding the email notifications and setting the interval for conditions check.

    Data alert

    To create a new data alert:

    1. In the Create a new alert dialog set the name, subject and a body of an alert:

    2. Select a server to monitor in the Server Deployment window:

    3. Set alert conditions by filtering captured data for desired events by using the advanced filter and click Next:

    The same steps as for the built in, and the custom script alerts are required regarding the email notifications and setting the interval for conditions check.

    Note: When an email account is set once the application will use the configured account always.