You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/postgresql/flexible-server/howto-alert-on-metrics.md
+32-31Lines changed: 32 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ ms.author: varundhawan
6
6
ms.service: postgresql
7
7
ms.subservice: flexible-server
8
8
ms.topic: conceptual
9
-
ms.date: 11/30/2021
9
+
ms.date: 7/12/2023
10
10
---
11
11
12
12
# Use the Azure portal to set up alerts on metrics for Azure Database for PostgreSQL - Flexible Server
@@ -15,7 +15,7 @@ ms.date: 11/30/2021
15
15
16
16
This article shows you how to set up Azure Database for PostgreSQL alerts using the Azure portal. You can receive an alert based on monitoring metrics for your Azure services.
17
17
18
-
The alert triggers when the value of a specified metric crosses a threshold you assign. The alert triggers both when the condition is first met, and then afterwards when that condition is no longer being met.
18
+
The alert triggers when the value of a specified metric crosses a threshold you assign. The alert triggers both when the condition is first met, and then afterwards when that condition is no longer being met. Metric alerts are stateful, that is, they only send out notifications when the state changes.
19
19
20
20
You can configure an alert to do the following actions when it triggers:
21
21
@@ -31,51 +31,50 @@ You can configure and get information about alert rules using:
31
31
32
32
## Create an alert rule on a metric from the Azure portal
33
33
34
-
1.In the [Azure portal](https://portal.azure.com/), select the Azure Database for PostgreSQL server you want to monitor.
34
+
1.In the [Azure portal](https://portal.azure.com/), select the Azure Database for PostgreSQL – Flexible Server you want to monitor
35
35
36
-
2. Under the **Monitoring** section of the sidebar, select **Alerts** as shown:
36
+
2. Under the **Monitoring** section of the sidebar, select **Alerts**.
7. Configure the alert logic including the **Condition** (ex. "Greater than"), **Threshold** (ex. 85 percent), **Time Aggregation**, **Period** of time the metric rule must be satisfied before the alert triggers (ex. "Over the last 30 minutes"), and **Frequency**.
42
+
5. Current Flexible Server instance is automatically added to the alert **Scope**.
53
43
54
-
Select **Done**when complete.
44
+
6. Within the **Condition**section, select **Add condition**.
7. You'll see a list of supported signals, select the metric you want to create an alert on. For example, select `storage percent`.
57
47
58
-
8. Within the **Action Groups** section, select **Create New** to create a new group to receive notifications on the alert.
48
+
8. You'll see a chart for the metric for the last six hours. Use the **Chart period**dropdown to select to see longer history for the metric.
59
49
60
-
9. Fill out the "Add action group" form with a name, short name, subscription, and resource group.
50
+
9. Select the **Threshold type** (ex. "Static" or "Dynamic"), **Operator** (ex. "Greater than"), and **Aggregation type** (ex. average). This selection determines the logic that the metric alert rule will evaluate.
51
+
- If you're using a Static threshold, continue to define a Threshold value (ex. 85 percent). The metric chart can help determine what might be a reasonable threshold.
52
+
- If you're using a Dynamic threshold, continue to define the Threshold sensitivity. The metric chart will display the calculated thresholds based on recent data. [Learn more about Dynamic Thresholds condition type and sensitivity options](../../azure-monitor/alerts/alerts-dynamic-thresholds.md).
61
53
62
-
10.Configure an **Email/SMS/Push/Voice**action type.
54
+
10.Refine the condition by adjusting **Aggregation granularity (Period)**interval over which data points are grouped using the aggregation type function (ex. "Lookback period 30 minutes"), and **Frequency** (ex "Check every 15 Minutes").
63
55
64
-
1. Choose "Email Azure Resource Manager Role" to select subscription Owners, Contributors, and Readers to receive notifications.
56
+
11. Select **Done** when complete.
57
+
12. Add an action group. An action group is a collection of notification preferences defined by the owner of an Azure subscription. Within the **Action Groups** section, choose **Select action group** to select an already existing action group to attach to the alert rule.
58
+
- You can also create a new action group to receive notifications on the alert. For more information, see [create and manage action group](../../azure-monitor/alerts/action-groups.md).
59
+
- To create a new action group, choose **+ Create action group**. Fill out the **create action group** form with a **subscription**, **resource group**, **action group name** and **display name**.
60
+
- Configure **Notifications** for action group.
65
61
66
-
2. Optionally, provide a valid URI in the **Webhook**field if you want it called when the alert fires.
62
+
In **Notification type**, choose **Email Azure Resource Manager Role** to select subscription Owners, Contributors, and Readers to receive notifications. Choose the **Azure Resource Manager Role**for sending the email. You can also choose **Email/SMS message/Push/Voice** to send notifications to specific recipients. Provide **Name** to the notification type and select **Review + Create** when completed.
67
63
68
-
3. Select **OK** when completed.
64
+
13. Fill in **Alert rule details** like **severity**, **alert rule name** and **description**.
65
+
14. Select **Create alert rule** to create the alert.
66
+
15. Within a few minutes, the alert is active and triggers as previously described.
11. Specify an Alert rule name, Description, and Severity.
70
+
Azure Database for PostgreSQL Flexible server also supports multi-resource metric alert rule. You can monitor at scale by applying the same metric alert rule to multiple Flexible server instances in the same Azure region. Individual notifications are sent for each monitored resource.
73
71
74
-
:::image type="content" source="./media/howto-alert-on-metrics/11-name-description-severity.png" alt-text="Specify, name description and severity":::
72
+
To [set up a new metric alert rule](../../azure-monitor/alerts/alerts-create-new-alert-rule.md#metric-alert), in the alert rule creation experience, in Scope definition (step 5.) from the previous section use the checkboxes to select all the Azure PostgreSQL Flexible Server instances you want the rule to be applied to.
75
73
76
-
12. Select **Create alert rule** to create the alert.
74
+
> [!IMPORTANT]
75
+
> The resources you select must be within the same resource type, location, and subscription. Resources that do not fit these criteria are not selectable.
77
76
78
-
Within a few minutes, the alert is active and triggers as previously described.
77
+
You can also use [Azure Resource Manager templates](../../azure-monitor/alerts/alerts-create-new-alert-rule.md#create-a-new-alert-rule-using-an-arm-template) to deploy multi-resource metric alerts. Learn more in our documentation, [Understand how metric alerts work in Azure Monitor](../../azure-monitor/alerts/alerts-types.md).
79
78
80
79
## Manage your alerts
81
80
@@ -87,5 +86,7 @@ Once you have created an alert, you can select it and do the following actions:
87
86
88
87
## Next steps
89
88
90
-
* Learn more about [configuring webhooks in alerts](../../azure-monitor/alerts/alerts-webhooks.md).
91
-
* Get an [overview of metrics collection](../../azure-monitor/data-platform.md) to make sure your service is available and responsive.
89
+
* Learn more about [setting alert on metrics](../../azure-monitor/alerts/alerts-create-new-alert-rule.md).
90
+
* Learn more about [monitoring metrics available in Azure Database for PostgreSQL - Flexible Server](./concepts-monitoring.md).
91
+
*[Understand how metric alerts work in Azure Monitor](../../azure-monitor/alerts/alerts-types.md).
92
+
*[Scale Monitoring with Azure PostgreSQL Multi-Resource Alerts](https://techcommunity.microsoft.com/t5/azure-database-for-postgresql/scale-monitoring-with-azure-postgresql-multi-resource-alerts/ba-p/3866526).
0 commit comments