次の方法で共有


Azure portal を使用して、Azure SQL Database と Azure Synapse Analytics のアラートを作成します

Applies to:Azure SQL DatabaseAzure Synapse Analytics

この記事では、Azure portal を使用して、Azure SQL データベースと Azure Synapse Analytics の専用 SQL プールのアラートを設定する方法について説明します。 あるメトリック (データベース サイズや CPU 使用率など) がしきい値に達したら、アラートはユーザーに電子メールを送信するか、または Web フックを呼び出すことができます。

新しいアラート ルールを設定する

監視メトリック、イベント、Azure サービスに基づいて通知を受け取ることができます。

  • Metric values - The alert triggers when the value of a specified metric crosses a threshold you assign. For more information, see Metric alerts.
  • アクティビティ ログ イベント - アラートは、" すべて " のイベントに対して、または特定数のイベントが発生したときにのみトリガーされます。 詳細については、「アクティビティ ログ アラート」をご覧ください。
  • Resource health - An alert related to the resource health status events, including whether the event was platform or user-initiated. 詳細については、「リソース正常性アラート」をご覧ください。

アラートがトリガーされたときに実行するアクションの種類は、次のように多数構成できます。

  • サービスの管理者および共同管理者に電子メール通知を送信する
  • 指定した追加のメール (Azure Resource Manager ロールを含む) にメールを送信します。
  • 音声ガイドに従って電話をかける
  • 電話番号にテキスト メッセージを送信する
  • Azure mobile app の通知を送信する
  • Automation Runbook を開始する
  • Azure 関数を呼び出す
  • Event Hubs アクションを開始する
  • ITSM 互換チケットを作成する
  • ロジック アプリのアクションを選択する
  • Webhook またはセキュリティで保護された Webhook を呼び出す

アラート ルールを構成したり、その情報を取得したりするには、以下を使用します。

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. テキストとアイコンは、リソースごとに多少異なる場合があります。
  3. Select the + Create button, then Alert rule.
  4. [アラート ルールの作成] ページで、スコープは個々のリソースに対して自動的に構成されます。

    Note

    多数の独立したアラートが発生しないように、サブスクリプション、リソース グループ、または Azure SQL データベース論理サーバー内の種類のすべてのリソースに対してアラートを構成できます。 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. そのシグナルのこのリソースの最近のアクティビティのプレビューも表示されます。

  4. Configure a Threshold type to determine when the alert will take action. Choose Aggregation type, Operator, and Threshold value as desired. 一般的なしきい値は、静的、最大、より大きい、80% です。

    Field Description
    Threshold 静的な値または動的な値に基づいてしきい値を評価する必要があるかどうかを選択します。
    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. メトリック アラートに対する動的しきい値の使用に関する詳細についてご確認ください。
    Operator メトリックの値をしきい値と比較するための演算子を選択します。
    動的しきい値を使用する場合、同じアラート ルールで上限と下限の両方に対するメトリックの動作に基づいて調整されたしきい値を使用できます。 次のいずれかの演算子を選択します。
    - 上限しきい値より大きい、または下限しきい値より小さい (既定値)
    - 上限しきい値より大きい
    - 下限しきい値より小さい
    Aggregation type データ ポイントに適用する集計関数 (Sum、Count、Average、Min、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. 感度レベルは、アラートをトリガーするために必要なメトリック系列パターンからの偏差の量に影響します。
    - High: Thresholds are tight and close to the metric series pattern. アラート ルールは最小の偏差でトリガーされ、アラートは増えます。
    - Medium: Thresholds are less tight and more balanced. 高感度 (既定) の場合より警告が少なくなります。
    - Low: Thresholds are loose, allowing greater deviation from the metric series pattern. アラート ルールは大きい偏差でのみトリガーされ、アラートは減ります。
    Aggregation granularity 集計型関数を使ってデータ ポイントをグループ化するために使用する間隔を選択します。 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.
    評価の頻度 アラート: ルールの実行頻度を選択します。 評価のスライディング ウィンドウを生成するため、集計の粒度より小さい頻度を選択します。
  5. [評価するタイミング] で、評価の目的の頻度を決定します。 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. [次へ: アクション]> を選択します。

新しいアラート ルールの作成

  1. Select an existing Action group from the Select action groups pane, or Create action group in your subscription. アクション グループを使用して、アラート条件が発生したときに実行するアクションを定義できます。 このアクションでは、アラートをトリガーしたときに行うこと (メールを送るなど) を定義します。
    1. または、クイック アクションの使用機能を使用して新しいアクション グループを作成し、メールまたは Azure mobile app 通知ターゲットを指定します。
  2. [Next: Details](次へ: 詳細)> を選択します。
  3. 既定では、アラート ルールの重大度は 3 - 情報提供です。 You can adjust the alert rule's Severity as desired.
  4. アラート ルール名を指定します。 省略できますが、説明を入力することをお勧めします。
  5. Under Advanced options:
    1. アラート ルールの作成が完了したらすぐにその実行が開始されるように、必ず [作成時に有効化] を選択します。
    2. [アラートの自動解決] オプションは、既定で有効になっています。 これにより、アラートがステートフルになります。つまり、条件が満たされなくなった場合にアラートが解決されます。
  6. タグ>を選択します。
  7. Azure タグの使用を検討します。 たとえば、リソースを作成したユーザーを識別する "Owner" または "CreatedBy" タグ、このリソースが運用や開発などの環境にあるかどうかを識別する "Environment" タグなどです。詳細については、「Azure リソースの名前付けおよびタグ付けの戦略を作成する」を参照してください。
  8. [Review + create](レビュー + 作成) を選択します。
  9. Select Create. 間もなく、アラートがアクティブになります。

アラート ルールの管理

Note

わずらわしいアラートを表示しないようにする場合は、アクション ルールを使用したアラートの非表示に関する記述を参照してください。

Existing alerts need to be managed from the Alerts menu in the Azure portal resource menu. 既存のアラートを表示、中断、アクティブ化、変更および削除するには、次のようにします。

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

    cpu という新しいアラートを示す Azure portal のスクリーンショット。

  2. 管理する既存のアラート ルールを個別に選択します。 既存のアクティブなルールを、好みに合わせて変更および調整することができます。 アクティブなルールは、削除せずに中断することもできます。