You can create an unlimited number of custom SQL alerts based on your own T-SQL queries. This allows you to monitor custom application data such as number of active work items or queue lengths and be alerted when the results fall outside your chosen thresholds.
As with other alert types you can choose if you want to be alerted through application popups, email, Slack etc.
The screenshot belows shows the alerts configuration screen.
After giving you alert a name and description you must decide whether the alert query will return a boolean or numberic result. If a boolean then the alert will be raised if the result is true. If numberic then the threshold property is used as well.
You can set the query timeout in seconds and then test your query. When saved it will appear in the master list of alerts under the Custom
section as seen below.
On the alert properties area you can now give the alert numeric thresholds (if the query type was numeric not boolean). Also the standard options are email and Slack etc for both major and minor alert types.
The amount of custom alerts you create is up to you and means miniDBAs standard alerts can be added to and then easily copied across all servers in your environment.