アクティブなアラートに対して構成された Azure Monitor ルールを確認します。
構文
# Query Azure Monitor alerts v1
# Observe the configured Azure Monitor rules for active alerts.
- task: AzureMonitor@1
inputs:
connectedServiceNameARM: # string. Required. Azure subscription.
ResourceGroupName: # string. Required. Resource group.
# Advanced
filterType: 'none' # 'resource' | 'alertrule' | 'none'. Required. Filter type. Default: none.
#resource: # string. Required when filterType = resource. Resource.
#alertRule: # string. Required when filterType = alertrule. Alert rule.
#severity: 'Sev0,Sev1,Sev2,Sev3,Sev4' # 'Sev0' | 'Sev1' | 'Sev2' | 'Sev3' | 'Sev4'. Severity. Default: Sev0,Sev1,Sev2,Sev3,Sev4.
#timeRange: '1h' # '1h' | '1d' | '7d' | '30d'. Time range. Default: 1h.
#alertState: 'Acknowledged,New' # 'New' | 'Acknowledged' | 'Closed'. Alert state. Default: Acknowledged,New.
#monitorCondition: 'Fired' # 'Fired ' | 'Resolved'. Monitor condition. Default: Fired.
入力
Azure サブスクリプション を
string。 必須。
監視する Azure Resource Manager サブスクリプションを選択します。
ResourceGroupName
-
リソース グループの
string。 必須。
サブスクリプションで監視するリソース グループの名前を提供します。
filterType
-
フィルターの種類
string。 必須。 使用できる値: resource (リソース別)、alertrule (アラート ルール別)、none。 既定値: none.
特定のリソースまたはアラート ルールで種類をフィルター処理します。
リソースの resource -
string。
filterType = resourceする場合に必要です。
監視する Azure リソースを選択します。
アラート ルールのを alertRule - する
string。
filterType = alertruleする場合に必要です。
現在構成されているアラート ルールから、状態を照会するアラート ルールを選択します。
既定値は、すべて選択します。
severity
-
重大度
string。 使用できる値: Sev0、Sev1、Sev2、Sev3、Sev4。 既定値: Sev0,Sev1,Sev2,Sev3,Sev4.
重大度でフィルター処理します。
timeRange
-
時間範囲の
string。 使用できる値: 1h (過去 1 時間)、1d (過去 24 時間)、7d (過去 7 日間)、30d (過去 30 日間)。 既定値: 1h.
時間範囲でフィルター処理します。
アラート状態の alertState -
string。 使用できる値: New、Acknowledged、Closed。 既定値: Acknowledged,New.
アラート インスタンスの状態でフィルター処理します。
monitorCondition
-
モニター条件の
string。 使用できる値: Fired (Fired)、Resolved。 既定値: Fired.
基になる条件が定義されたアラート ルールのしきい値を超えたかどうかを表します。
タスク コントロールのオプション
すべてのタスクには、タスク入力に加えて制御オプションがあります。 詳細については、「コントロール オプションと一般的なタスク プロパティを参照してください。
出力変数
なし。
注釈
アクティブなアラートに対して構成された Azure Monitor ルールを確認するには、リリース パイプラインの エージェントレス ジョブ でこのタスクを使用します。
注
このタスクは、リリース パイプラインの エージェントレス ジョブ でのみ使用できます。
サンプリング時にどのアラート ルールもアクティブ化されない場合、タスクは成功します。
このタスクの使用方法の詳細については、「承認とゲートの概要を参照してください。