|
| 1 | +--- |
| 2 | +title: Setup alerts and notifications for Managed Instance (Azure portal) |
| 3 | +description: Use the Azure portal to create SQL Managed Instance alerts, which can trigger notifications or automation when the conditions you specify are met. |
| 4 | +services: sql-database |
| 5 | +ms.service: sql-database |
| 6 | +ms.subservice: performance |
| 7 | +ms.custom: |
| 8 | +ms.devlang: |
| 9 | +ms.topic: conceptual |
| 10 | +author: danimir |
| 11 | +ms.author: danil |
| 12 | +ms.reviewer: jrasnik, carlrab |
| 13 | +ms.date: 04/02/2020 |
| 14 | +--- |
| 15 | +# Create alerts for Azure SQL Managed Instance using the Azure portal |
| 16 | + |
| 17 | +## Overview |
| 18 | + |
| 19 | +This article shows you how to set up alerts for databases in Azure SQL Managed Instance Database using the Azure portal. Alerts can send you an email or call a web hook when some metric (for example instance storage size or CPU usage) reaches the threshold. This article also provides best practices for setting alert periods. |
| 20 | + |
| 21 | +You can receive an alert based on monitoring metrics for, or events on, your Azure services. |
| 22 | + |
| 23 | +* **Metric values** - The alert triggers when the value of a specified metric crosses a threshold you assign in either direction. That is, it triggers both when the condition is first met and then afterwards when that condition is no longer being met. |
| 24 | +* **Activity log events** - An alert can trigger on *every* event, or, only when a certain number of events occur. |
| 25 | + |
| 26 | +You can configure an alert to do the following when it triggers: |
| 27 | + |
| 28 | +* Send email notifications to the service administrator and co-administrators |
| 29 | +* Send email to additional emails that you specify. |
| 30 | +* Call a webhook |
| 31 | + |
| 32 | +You can configure and get information about alert rules using |
| 33 | + |
| 34 | +* [Azure portal](../monitoring-and-diagnostics/insights-alerts-portal.md) |
| 35 | +* [PowerShell](../azure-monitor/platform/alerts-classic-portal.md) |
| 36 | +* [command-line interface (CLI)](../azure-monitor/platform/alerts-classic-portal.md) |
| 37 | +* [Azure Monitor REST API](https://msdn.microsoft.com/library/azure/dn931945.aspx) |
| 38 | + |
| 39 | +## Create an alert rule on a metric with the Azure portal |
| 40 | + |
| 41 | +1. In the [portal](https://portal.azure.com/), locate the resource you are interested in monitoring and select it. |
| 42 | +2. Select **Alerts** in the Monitoring section. The text and icon may vary slightly for different resources. |
| 43 | + |
| 44 | +  |
| 45 | + |
| 46 | +3. Select the **New alert rule** button to open the **Create rule** page. |
| 47 | +  |
| 48 | + |
| 49 | +4. In the **Condition** section, click **Add**. |
| 50 | +  |
| 51 | +5. In the **Configure signal logic** page, select a signal. |
| 52 | +  |
| 53 | +6. After selecting a signal, such as **CPU percentage**, the **Configure signal logic** page appears. |
| 54 | +  |
| 55 | +7. On this page, configure that threshold type, operator, aggregation type, threshold value, aggregation granularity, and frequency of evaluation. Then click **Done**. |
| 56 | +8. On the **Create rule**, select an existing **Action group** or create a new group. An action group enables you to define the action to be taken when an alert condition occurs. |
| 57 | +  |
| 58 | + |
| 59 | +9. Define a name for the rule, provide an optional description, choose a severity level for the rule, choose whether to enable the rule upon rule creation, and then click **Create rule alert** to create the metric rule alert. |
| 60 | + |
| 61 | +Within 10 minutes, the alert is active and triggers as previously described. |
| 62 | + |
| 63 | +## Next steps |
| 64 | + |
| 65 | +* Learn more about [configuring webhooks in alerts](../azure-monitor/platform/alerts-webhooks.md). |
0 commit comments