SQL Server Alert Configuration

The alerts in miniDBA are broken down into 7 categories:
  • Disk
  • Memory
  • CPU
  • Query
  • Availability
  • General
  • Custom
The screenshot belows shows the alerts configuration screen with the General category expanded.
SQL Server triggers
Note the Import Alerts Config button at the top of the screen. If you already have a SQL Server being monitored with alerts configured and you wish to use these settings then click this button. You will be able to select the server to copy from. This is a great time saving feature once you have setup an intial server.

Each alert can be enabled/disabled - this is simply whether the trigger will raise an alert when it is fired or not. This is set in the main alerts grid in the top half of the screen.
Once an alert is clicked on in the top grid, it's details are shown in the lower property grid for editing. Properties on the left and a description of the alert on the right.

The first option is the frequency the alert can be checked. If an alert is occurring too often for your liking and is causing 'noise' in your current alerts then change the check frequency to be less often.

Where appropriate each alert can have a major and minor alert configuration. For example if the server cpu metric is above 90% then this might raise a minor alert. If the same metric passes above 99% then it will raise a major alert. Major and minor alerts have independent options to allow emailing of different people/groups as well as differing Slack channels etc.

Some of the alerts have settable threshold values that can be configured to suit your server, such as the disk drive free space threshold (shown above) or number of minutes a batch can run before it is identified as a long running process.

The alert can send an email, send a message to Slack or write to the Windows event log when they fire - the screen shot shows writing to Slack is enabled. Writing to the Windows Event log is a dual purpose communication as obviously it allows you to open the event log and see alert events but more usefully it allows other programs to pick the alerts up and act on them. These are commonly enterprise monitoring suits like Microsoft's System Center Operations Manager.

Configuring Email

When you click on the email address text box the email config area replaces the description box on the right of the screen: email alert configuration
Enter email addresses seperated by commas in the text box at top right. When happy click save and the address will populate the email textbox in the main alert properties window. If you have already entered email addresses for alerts this process can be simplified by selecting an existing address in the list in the bottom right of the email config window, then clicking save. All email addresses across all sql servers are searched to populate this list.
Don't forget the major and minor alerts have independent properties so you can choose differenet email addresses for both types of alert.

Database Filter

Some alerts have a database filter that let's you select which databases on the sql server to run the alert on. For example a low disk space on a drive alert has no concept of databases as it runs per physical disk drive. Long running queries on the other hand run in databases so you may want to ignore certain databases. The following screenshot shows the DB Filter button has become visible on an appropriate alert and once clicked the db filter area replaces the description box on the right of the alert properties area. The button shows (9/9) on it as all 9 out of 9 available databases are included in the alert. alert database filter
Moving databases from the left to right windows makes them be ignored by the alert.
If you find you have a common set of databases you wish to ignore then you can copy that list from an existing alert using the Copy Filter From Alert button. This gives you a list of alerts you can copy the filter from:
alert database filter copy

Available Alerts

Now you know how to configure a miniDBA alert, you now need to know which alerts are available to you. Please see SQL Server Alerts List for more details.