ערוך

שתף באמצעות


Create alerts for Azure SQL Database and Azure Synapse Analytics using the Azure portal

Applies to: Azure SQL Database Azure Synapse Analytics

This article shows you how to set up alerts in Azure SQL Database and Azure Synapse Analytics dedicated SQL pools, using the Azure portal. Alerts can send you an email or call a web hook when some metric (for example database size or CPU usage) reaches the threshold.

Set up new alert rule

You can receive an alert based on monitoring metrics for, or events on, your Azure services.

  • Metric values - The alert triggers when the value of a specified metric crosses a threshold you assign. For more information, see Metric alerts.
  • Activity log events - An alert can trigger on every event, or, only when a certain number of events occur. For more information, see Activity log alerts.
  • Resource health - An alert related to the resource health status events, including whether the event was platform or user-initiated. For more information, see Resource health alerts.

You can configure many action types for an alert to perform when it triggers, including:

  • Send email notifications to the service administrator and coadministrators
  • Send email to additional emails that you specify, including for an Azure Resource Manager Role.
  • Call a phone number with voice prompt
  • Send text message to a phone number
  • Send an Azure mobile app notification
  • Start an automation runbook
  • Call an Azure Function
  • Start an Event Hubs action
  • Create an ITSM-compatible ticket
  • Select a logic app action
  • Call a webhook or a secure webhook

You can configure and get information about alert rules using:

Get started with a new alert rule in the Azure portal

  1. In the Azure portal, locate the resource you are interested in monitoring and select it.
  2. In the resource menu under Monitoring, select Alerts. The text and icon might vary slightly for different resources.
  3. Select the + Create button, then Alert rule.
  4. On the Create an alert rule page, the Scope is automatically configured to the individual resource.

    Note

    To avoid sprawl of many independent alerts, you may want to configure alerts for all resources of a type in a subscription, resource group, or an Azure SQL Database logical server. Use the Scope tab to change the scope of the new alert rule.

Capture activity peaks or sustained resource stress with alerts on the Metrics signal category.

  1. On the Condition tab, select See all signals and Select a signal from the list of Metrics.

  2. Select the desired metric, for example CPU percentage. Select Apply.

  3. After you select a signal, the Alert logic options appear. A preview of recent activity in this resource for that signal is also displayed.

  4. Configure a Threshold type to determine when the alert will take action. Choose Aggregation type, Operator, and Threshold value as desired. A typical threshold is: Static, Maximum, Greater than, 80%.

    Field Description
    Threshold Select if the threshold should be evaluated based on a static value or a dynamic value.
    A static threshold evaluates the rule by using the threshold value that you configure.
    Dynamic thresholds use machine learning algorithms to continuously learn the metric behavior patterns and calculate the appropriate thresholds for unexpected behavior. You can learn more about using dynamic thresholds for metric alerts.
    Operator Select the operator for comparing the metric value against the threshold.
    If you're using dynamic thresholds, alert rules can use tailored thresholds based on metric behavior for both upper and lower bounds in the same alert rule. Select one of these operators:
    - Greater than the upper threshold or lower than the lower threshold (default)
    - Greater than the upper threshold
    - Lower than the lower threshold
    Aggregation type Select the aggregation function to apply on the data points: Sum, Count, Average, Min, or Max.
    Threshold value If you selected a static threshold, enter the threshold value for the condition logic.
    Unit If the selected metric signal supports different units, such as bytes, KB, MB, and GB, and if you selected a static threshold, enter the unit for the condition logic.
    Threshold sensitivity If you selected a dynamic threshold, enter the sensitivity level. The sensitivity level affects the amount of deviation from the metric series pattern that's required to trigger an alert.
    - High: Thresholds are tight and close to the metric series pattern. An alert rule is triggered on the smallest deviation, resulting in more alerts.
    - Medium: Thresholds are less tight and more balanced. There are fewer alerts than with high sensitivity (default).
    - Low: Thresholds are loose, allowing greater deviation from the metric series pattern. Alert rules are only triggered on large deviations, resulting in fewer alerts.
    Aggregation granularity Select the interval that's used to group the data points by using the aggregation type function. Choose an Aggregation granularity (period) that's greater than the Frequency of evaluation to reduce the likelihood of missing the first evaluation period of an added time series.
    Frequency of evaluation Select how often the alert rule is to be run. Select a frequency that's smaller than the aggregation granularity to generate a sliding window for the evaluation.
  5. Under When to evaluate, determine the desired frequency of evaluation. Use the Check every and Lookback period dropdown lists.

  6. Optionally, you can add multiple conditions for this alert, choose the Add condition alert if desired.

  7. Select Next: Actions >.

Create the new alert rule

  1. Select an existing Action group from the Select action groups pane, or Create action group in your subscription. An action group enables you to define the action to be taken when an alert condition occurs. This action defines what happens upon triggering an alert (for example, sending an email).
    1. Alternatively, use the Use quick actions feature to create a new action group and provide an email or Azure mobile app notification target.
  2. Select Next: Details >.
  3. By default, an alert rule's severity is 3 - Informational. You can adjust the alert rule's Severity as desired.
  4. Provide the Alert rule name. Optionally but recommended, provide a description.
  5. Under Advanced options:
    1. Make sure Enable upon creation for the alert rule to start running as soon as you're done creating it.
    2. The Automatically resolve alerts options is enabled by default. This will make the alert stateful, which means that the alert is resolved when the condition isn't met anymore.
  6. Select Next: Tags >.
  7. Consider using Azure tags. For example, the "Owner" or "CreatedBy" tag to identify who created the resource, and the "Environment" tag to identify whether this resource is in production, development, etc. For more information, see Develop your naming and tagging strategy for Azure resources.
  8. Select Review + create.
  9. Select Create. Soon, the alert is active.

Manage alert rules

Note

To suppress noisy alerts, see Suppression of alerts using action rules.

Existing alerts need to be managed from the Alerts menu in the Azure portal resource menu. To view, suspend, activate, modify, and delete existing alerts:

  1. On the Alerts pane of your Azure SQL Database, select Alert rules.

    Screenshot from the Azure portal showing a new alert called cpu.

  2. Select an individual existing alert rule to manage it. Existing active rules can be modified and tuned to your preference. Active rules can also be suspended without being deleted.