Microsoft.Insights アラートルール
Bicep リソース定義
alertrules リソースの種類は、次を対象とする操作でデプロイできます。
- リソース グループ - リソース グループのデプロイ コマンドに関するページを参照してください
各 API バージョンの変更されたプロパティの一覧については、「 変更ログ」を参照してください。
リソース形式
Microsoft.Insights/alertrules リソースを作成するには、次の Bicep をテンプレートに追加します。
resource symbolicname 'Microsoft.Insights/alertrules@2016-03-01' = {
name: 'string'
location: 'string'
tags: {
tagName1: 'tagValue1'
tagName2: 'tagValue2'
}
properties: {
action: {
'odata.type': 'string'
// For remaining properties, see RuleAction objects
}
actions: [
{
'odata.type': 'string'
// For remaining properties, see RuleAction objects
}
]
condition: {
dataSource: {
legacyResourceId: 'string'
metricNamespace: 'string'
resourceLocation: 'string'
resourceUri: 'string'
'odata.type': 'string'
// For remaining properties, see RuleDataSource objects
}
'odata.type': 'string'
// For remaining properties, see RuleCondition objects
}
description: 'string'
isEnabled: bool
name: 'string'
provisioningState: 'string'
}
}
RuleAction オブジェクト
オブジェクトの種類を指定するには 、odata.type プロパティを設定します。
Microsoft.Azure.Management.Insights.Models.RuleEmailAction の場合は、次を使用します。
'odata.type': 'Microsoft.Azure.Management.Insights.Models.RuleEmailAction'
customEmails: [
'string'
]
sendToServiceOwners: bool
Microsoft.Azure.Management.Insights.Models.RuleWebhookAction の場合は、次を使用します。
'odata.type': 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction'
properties: {}
serviceUri: 'string'
RuleCondition オブジェクト
オブジェクトの種類を指定するには 、odata.type プロパティを設定します。
Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition の場合は、次の値を使用します。
'odata.type': 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition'
failedLocationCount: int
windowSize: 'string'
Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition の場合は、次の値を使用します。
'odata.type': 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition'
aggregation: {
operator: 'string'
threshold: int
windowSize: 'string'
}
Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition の場合は、次の値を使用します。
'odata.type': 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition'
operator: 'string'
threshold: int
timeAggregation: 'string'
windowSize: 'string'
RuleDataSource オブジェクト
オブジェクトの種類を指定するには 、odata.type プロパティを設定します。
Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource の場合は、次の値を使用します。
'odata.type': 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource'
claims: {
emailAddress: 'string'
}
eventName: 'string'
eventSource: 'string'
level: 'string'
operationName: 'string'
resourceGroupName: 'string'
resourceProviderName: 'string'
status: 'string'
subStatus: 'string'
Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource の場合は、次の値を使用します。
'odata.type': 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource'
metricName: 'string'
プロパティ値
alertrules
名前 | 説明 | 値 |
---|---|---|
name | リソース名 | string (必須) |
location | リソースの場所 | string (必須) |
tags | リソース タグ | タグ名と値のディクショナリ。 「テンプレートのタグ」を参照してください |
properties | リソースのアラート ルールのプロパティ。 | AlertRule (必須) |
AlertRule
名前 | 説明 | 値 |
---|---|---|
action | アラート ルールがアクティブになったとき、およびアラート条件が解決されたときに実行されるアクション。 | RuleAction |
actions | アラート ルールがアクティブになったとき、およびアラート条件が解決されたときに実行されるアクションの配列。 | RuleAction[] |
condition | アラート ルールがアクティブ化される条件。 | RuleCondition (必須) |
description | アラート メールに含まれるアラート ルールの説明。 | string |
isEnabled | アラート ルールが有効になっているかどうかを示す フラグ。 | bool (必須) |
name | アラート ルールの名前。 | string (必須) |
provisioningState | プロビジョニング状態。 | string |
RuleAction
名前 | 説明 | 値 |
---|---|---|
odata.type | オブジェクトの種類を設定する | Microsoft.Azure.Management.Insights.Models.RuleEmailAction Microsoft.Azure.Management.Insights.Models.RuleWebhookAction (必須) |
RuleEmailAction
名前 | 説明 | 値 |
---|---|---|
odata.type | は、アクションの種類を指定します。 アクションには、RuleEmailAction と RuleWebhookAction の 2 種類があります。 | 'Microsoft.Azure.Management.Insights.Models.RuleEmailAction' (必須) |
customEmails | アラートのアクティブ化を通知する管理者のカスタム 電子メール アドレスの一覧。 | string[] |
sendToServiceOwners | アラートがアクティブ化されたときにサービスの管理者 (サービスと共同管理者) に通知する必要があるかどうか。 | [bool] |
RuleWebhookAction
名前 | 説明 | 値 |
---|---|---|
odata.type | は、アクションの種類を指定します。 アクションには、RuleEmailAction と RuleWebhookAction の 2 種類があります。 | 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction' (必須) |
properties | post 操作に含めるカスタム プロパティのディクショナリ。 これらのデータは Webhook ペイロードに追加されます。 | object |
serviceUri | アラートがアクティブ化または解決されたときに通知を投稿するサービス URI。 | string |
RuleCondition
名前 | 説明 | 値 |
---|---|---|
dataSource | ルールがデータを収集するリソース。 この型の場合、dataSource は常に RuleMetricDataSource 型になります。 | RuleDataSource |
odata.type | オブジェクトの種類を設定する | Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition (必須) |
RuleDataSource
名前 | 説明 | 値 |
---|---|---|
legacyResourceId | ルールが監視するリソースのレガシ リソース識別子。 注: このプロパティは、既存のルールに対して更新できません。 | string |
metricNamespace | メトリックの名前空間。 | string |
resourceLocation | リソースの場所。 | string |
resourceUri | ルールが監視するリソースのリソース識別子。 注: このプロパティは、既存のルールに対して更新できません。 | string |
odata.type | オブジェクトの種類を設定する | Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource (必須) |
RuleManagementEventDataSource
名前 | 説明 | 値 |
---|---|---|
odata.type | は、データ ソースの種類を指定します。 ルール データ ソースには、RuleMetricDataSource と RuleManagementEventDataSource の 2 種類があります。 | 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' (必須) |
claims | 要求。 | RuleManagementEventClaimsDataSource |
eventName | イベント名。 | string |
eventSource | イベント ソース。 | string |
レベル | レベルを指定します。 | string |
operationName | 確認する必要がある操作の名前。 名前を指定しない場合は、すべての操作が一致します。 | string |
resourceGroupName | リソース グループ名。 | string |
resourceProviderName | リソース プロバイダー名。 | string |
status | 確認する必要がある操作の状態。 状態を指定しない場合は、すべての状態が一致します。 | string |
subStatus | サブステータス。 | string |
RuleManagementEventClaimsDataSource
名前 | 説明 | 値 |
---|---|---|
emailAddress | 電子メール アドレス。 | string |
RuleMetricDataSource
名前 | 説明 | 値 |
---|---|---|
odata.type | は、データ ソースの種類を指定します。 ルール データ ソースには、RuleMetricDataSource と RuleManagementEventDataSource の 2 種類があります。 | 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' (必須) |
metricName | ルールが監視する内容を定義するメトリックの名前。 | string |
LocationThresholdRuleCondition
名前 | 説明 | 値 |
---|---|---|
odata.type | は条件の種類を指定します。 これは、ManagementEventRuleCondition (管理イベントの発生)、LocationThresholdRuleCondition (Web テストの失敗数に基づく)、ThresholdRuleCondition (メトリックのしきい値に基づく) の 3 種類のいずれかです。 | 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition' (必須) |
failedLocationCount | アラートのアクティブ化に失敗する必要がある場所の数。 | int (必須) 制約: 最小値 = 0 |
windowSize | しきい値に基づいてアラート アクティビティを監視するために使用される期間 (ISO 8601 期間形式)。 指定する場合は、5 分から 1 日の間である必要があります。 | string |
ManagementEventRuleCondition
名前 | 説明 | 値 |
---|---|---|
odata.type | は条件の種類を指定します。 これは、ManagementEventRuleCondition (管理イベントの発生)、LocationThresholdRuleCondition (Web テストの失敗数に基づく)、ThresholdRuleCondition (メトリックのしきい値に基づく) の 3 種類のいずれかです。 | 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition' (必須) |
aggregation | 収集されるデータを時間の経過と同時に、アラートをアクティブ化するタイミングを組み合わせる方法。 管理イベントのアラートの集計は省略可能です。指定しない場合は、すべてのイベントによってアラートがアクティブ化されます。 | ManagementEventAggregationCondition |
ManagementEventAggregationCondition
名前 | 説明 | 値 |
---|---|---|
operator | 条件演算子。 | 'GreaterThan' 'GreaterThanOrEqual' 'LessThan' 'LessThanOrEqual' |
threshold | アラートを有効にするしきい値。 | INT |
windowSize | しきい値に基づいてアラート アクティビティを監視するために使用される期間 (ISO 8601 期間形式)。 指定する場合は、5 分から 1 日の間である必要があります。 | string |
ThresholdRuleCondition
名前 | 説明 | 値 |
---|---|---|
odata.type | は条件の種類を指定します。 これは、ManagementEventRuleCondition (管理イベントの発生)、LocationThresholdRuleCondition (Web テストの失敗数に基づく)、ThresholdRuleCondition (メトリックのしきい値に基づく) の 3 種類のいずれかです。 | 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition' (必須) |
operator | データとしきい値の比較に使用される演算子。 | 'GreaterThan' 'GreaterThanOrEqual' 'LessThan' 'LessThanOrEqual' (必須) |
threshold | アラートをアクティブにするしきい値。 | int (必須) |
timeAggregation | 時間集計演算子。 収集されるデータを時間の経過と同時に組み合わせる方法。 既定値は、メトリックの PrimaryAggregationType です。 | 'Average' 'Last' 'Maximum' 'Minimum' 'Total' |
windowSize | しきい値に基づいてアラート アクティビティを監視するために使用される期間 (ISO 8601 期間形式)。 指定する場合は、5 分から 1 日の間である必要があります。 | string |
クイック スタート テンプレート
次のクイックスタート テンプレートでは、このリソースの種類をデプロイします。
Template | 説明 |
---|---|
仮想マシンに対する DDoS 攻撃 |
これにより、仮想マシン、OMS、その他のネットワーク リソースがデプロイされます。 guidleines に従って DDoS 攻撃を実行し、DDoS 攻撃を検出するシナリオを実行します。 |
ARM テンプレート リソース定義
alertrules リソースの種類は、次をターゲットとする操作でデプロイできます。
- リソース グループ - リソース グループのデプロイ コマンドを参照してください
各 API バージョンの変更されたプロパティの一覧については、「 変更ログ」を参照してください。
リソース形式
Microsoft.Insights/alertrules リソースを作成するには、次の JSON をテンプレートに追加します。
{
"type": "Microsoft.Insights/alertrules",
"apiVersion": "2016-03-01",
"name": "string",
"location": "string",
"tags": {
"tagName1": "tagValue1",
"tagName2": "tagValue2"
},
"properties": {
"action": {
"odata.type": "string"
// For remaining properties, see RuleAction objects
},
"actions": [
{
"odata.type": "string"
// For remaining properties, see RuleAction objects
}
],
"condition": {
"dataSource": {
"legacyResourceId": "string",
"metricNamespace": "string",
"resourceLocation": "string",
"resourceUri": "string",
"odata.type": "string"
// For remaining properties, see RuleDataSource objects
},
"odata.type": "string"
// For remaining properties, see RuleCondition objects
},
"description": "string",
"isEnabled": "bool",
"name": "string",
"provisioningState": "string"
}
}
RuleAction オブジェクト
オブジェクトの種類を指定するには、 odata.type プロパティを設定します。
Microsoft.Azure.Management.Insights.Models.RuleEmailAction の場合は、次の値を使用します。
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleEmailAction",
"customEmails": [ "string" ],
"sendToServiceOwners": "bool"
Microsoft.Azure.Management.Insights.Models.RuleWebhookAction の場合は、次の値を使用します。
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction",
"properties": {},
"serviceUri": "string"
RuleCondition オブジェクト
オブジェクトの種類を指定するには、 odata.type プロパティを設定します。
Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition の場合は、次の値を使用します。
"odata.type": "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition",
"failedLocationCount": "int",
"windowSize": "string"
Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition の場合は、次の値を使用します。
"odata.type": "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition",
"aggregation": {
"operator": "string",
"threshold": "int",
"windowSize": "string"
}
Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition の場合は、次の値を使用します。
"odata.type": "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition",
"operator": "string",
"threshold": "int",
"timeAggregation": "string",
"windowSize": "string"
RuleDataSource オブジェクト
オブジェクトの種類を指定するには、 odata.type プロパティを設定します。
Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource の場合は、次の値を使用します。
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource",
"claims": {
"emailAddress": "string"
},
"eventName": "string",
"eventSource": "string",
"level": "string",
"operationName": "string",
"resourceGroupName": "string",
"resourceProviderName": "string",
"status": "string",
"subStatus": "string"
Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource の場合は、次の値を使用します。
"odata.type": "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource",
"metricName": "string"
プロパティ値
alertrules
名前 | 説明 | 値 |
---|---|---|
type | リソースの種類 | 'Microsoft.Insights/alertrules' |
apiVersion | リソース API のバージョン | '2016-03-01' |
name | リソース名 | string (必須) |
location | リソースの場所 | string (必須) |
tags | リソース タグ | タグ名と値のディクショナリ。 「テンプレートのタグ」を参照してください |
properties | リソースのアラート ルールのプロパティ。 | AlertRule (必須) |
AlertRule
名前 | 説明 | 値 |
---|---|---|
action | アラート ルールがアクティブになったとき、およびアラート条件が解決されたときに実行されるアクション。 | RuleAction |
actions | アラート ルールがアクティブになったとき、およびアラート条件が解決されたときに実行されるアクションの配列。 | RuleAction[] |
condition | アラート ルールがアクティブ化される条件。 | RuleCondition (必須) |
description | アラート メールに含まれるアラート ルールの説明。 | string |
isEnabled | アラート ルールが有効になっているかどうかを示す フラグ。 | bool (必須) |
name | アラート ルールの名前。 | string (必須) |
provisioningState | プロビジョニング状態。 | string |
RuleAction
名前 | 説明 | 値 |
---|---|---|
odata.type | オブジェクトの種類を設定する | Microsoft.Azure.Management.Insights.Models.RuleEmailAction Microsoft.Azure.Management.Insights.Models.RuleWebhookAction (必須) |
RuleEmailAction
名前 | 説明 | 値 |
---|---|---|
odata.type | は、アクションの種類を指定します。 アクションには、RuleEmailAction と RuleWebhookAction の 2 種類があります。 | 'Microsoft.Azure.Management.Insights.Models.RuleEmailAction' (必須) |
customEmails | アラートのアクティブ化を通知する管理者のカスタム 電子メール アドレスの一覧。 | string[] |
sendToServiceOwners | アラートがアクティブ化されたときにサービスの管理者 (サービスと共同管理者) に通知する必要があるかどうか。 | [bool] |
RuleWebhookAction
名前 | 説明 | 値 |
---|---|---|
odata.type | は、アクションの種類を指定します。 アクションには、RuleEmailAction と RuleWebhookAction の 2 種類があります。 | 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction' (必須) |
properties | post 操作に含めるカスタム プロパティのディクショナリ。 これらのデータは Webhook ペイロードに追加されます。 | object |
serviceUri | アラートがアクティブ化または解決されたときに通知を投稿するサービス URI。 | string |
RuleCondition
名前 | 説明 | 値 |
---|---|---|
dataSource | ルールがデータを収集するリソース。 この型の場合、dataSource は常に RuleMetricDataSource 型になります。 | RuleDataSource |
odata.type | オブジェクトの種類を設定する | Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition (必須) |
RuleDataSource
名前 | 説明 | 値 |
---|---|---|
legacyResourceId | ルールが監視するリソースのレガシ リソース識別子。 注: このプロパティは、既存のルールに対して更新できません。 | string |
metricNamespace | メトリックの名前空間。 | string |
resourceLocation | リソースの場所。 | string |
resourceUri | ルールが監視するリソースのリソース識別子。 注: このプロパティは、既存のルールに対して更新できません。 | string |
odata.type | オブジェクトの種類を設定する | Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource (必須) |
RuleManagementEventDataSource
名前 | 説明 | 値 |
---|---|---|
odata.type | は、データ ソースの種類を指定します。 ルール データ ソースには、RuleMetricDataSource と RuleManagementEventDataSource の 2 種類があります。 | 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' (必須) |
claims | クレーム。 | RuleManagementEventClaimsDataSource |
eventName | イベント名。 | string |
eventSource | イベント ソース。 | string |
レベル | レベル。 | string |
operationName | 確認する必要がある操作の名前。 名前を指定しない場合は、すべての操作が一致します。 | string |
resourceGroupName | リソース グループ名。 | string |
resourceProviderName | リソース プロバイダー名。 | string |
status | 確認する必要がある操作の状態。 状態を指定しない場合は、すべての状態が一致します。 | string |
subStatus | サブステータス。 | string |
RuleManagementEventClaimsDataSource
名前 | 説明 | 値 |
---|---|---|
emailAddress | 電子メール アドレス。 | string |
RuleMetricDataSource
名前 | 説明 | 値 |
---|---|---|
odata.type | は、データ ソースの種類を指定します。 ルール データ ソースには、RuleMetricDataSource と RuleManagementEventDataSource の 2 種類があります。 | 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' (必須) |
metricName | ルールが監視する内容を定義するメトリックの名前。 | string |
LocationThresholdRuleCondition
名前 | 説明 | 値 |
---|---|---|
odata.type | は条件の種類を指定します。 これは、ManagementEventRuleCondition (管理イベントの発生)、LocationThresholdRuleCondition (Web テストの失敗の数に基づく)、ThresholdRuleCondition (メトリックのしきい値に基づく) の 3 種類のいずれかです。 | 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition' (必須) |
failedLocationCount | アラートのアクティブ化に失敗する必要がある場所の数。 | int (必須) 制約: 最小値 = 0 |
windowSize | しきい値に基づいてアラート アクティビティを監視するために使用される期間 (ISO 8601 期間形式)。 指定する場合は、5 分から 1 日の間にする必要があります。 | string |
ManagementEventRuleCondition
名前 | 説明 | 値 |
---|---|---|
odata.type | は条件の種類を指定します。 これは、ManagementEventRuleCondition (管理イベントの発生)、LocationThresholdRuleCondition (Web テストの失敗の数に基づく)、ThresholdRuleCondition (メトリックのしきい値に基づく) の 3 種類のいずれかです。 | 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition' (必須) |
aggregation | 収集されるデータを時間の経過とタイミングで組み合わせる方法と、アラートがアクティブ化されるタイミング。 管理イベントのアラートの集計は省略可能です。指定しない場合は、すべてのイベントによってアラートがアクティブ化されます。 | ManagementEventAggregationCondition |
ManagementEventAggregationCondition
名前 | 説明 | 値 |
---|---|---|
operator | 条件演算子。 | 'GreaterThan' 'GreaterThanOrEqual' 'LessThan' 'LessThanOrEqual' |
threshold | アラートを有効にするしきい値。 | INT |
windowSize | しきい値に基づいてアラート アクティビティを監視するために使用される期間 (ISO 8601 期間形式)。 指定する場合は、5 分から 1 日の間にする必要があります。 | string |
ThresholdRuleCondition
名前 | 説明 | 値 |
---|---|---|
odata.type | は条件の種類を指定します。 これは、ManagementEventRuleCondition (管理イベントの発生)、LocationThresholdRuleCondition (Web テストの失敗の数に基づく)、ThresholdRuleCondition (メトリックのしきい値に基づく) の 3 種類のいずれかです。 | 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition' (必須) |
operator | データとしきい値の比較に使用される演算子。 | 'GreaterThan' 'GreaterThanOrEqual' 'LessThan' 'LessThanOrEqual' (必須) |
threshold | アラートをアクティブにするしきい値。 | int (必須) |
timeAggregation | 時間集計演算子。 収集されるデータを時間の経過と同時に組み合わせる方法。 既定値は、メトリックの PrimaryAggregationType です。 | 'Average' 'Last' 'Maximum' 'Minimum' 'Total' |
windowSize | しきい値に基づいてアラート アクティビティを監視するために使用される期間 (ISO 8601 期間形式)。 指定する場合は、5 分から 1 日の間にする必要があります。 | string |
クイック スタート テンプレート
次のクイックスタート テンプレートでは、このリソースの種類をデプロイします。
Template | 説明 |
---|---|
仮想マシンに対する DDoS 攻撃 |
これにより、仮想マシン、OMS、およびその他のネットワーク リソースがデプロイされます。 guidleines に従って DDoS 攻撃を実行し、DDoS 攻撃の検出シナリオを実行します。 |
Terraform (AzAPI プロバイダー) リソース定義
alertrules リソースの種類は、次を対象とする操作でデプロイできます。
- リソース グループ
各 API バージョンの変更されたプロパティの一覧については、「 変更ログ」を参照してください。
リソース形式
Microsoft.Insights/alertrules リソースを作成するには、次の Terraform をテンプレートに追加します。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Insights/alertrules@2016-03-01"
name = "string"
location = "string"
parent_id = "string"
tags = {
tagName1 = "tagValue1"
tagName2 = "tagValue2"
}
body = jsonencode({
properties = {
action = {
odata.type = "string"
// For remaining properties, see RuleAction objects
}
actions = [
{
odata.type = "string"
// For remaining properties, see RuleAction objects
}
]
condition = {
dataSource = {
legacyResourceId = "string"
metricNamespace = "string"
resourceLocation = "string"
resourceUri = "string"
odata.type = "string"
// For remaining properties, see RuleDataSource objects
}
odata.type = "string"
// For remaining properties, see RuleCondition objects
}
description = "string"
isEnabled = bool
name = "string"
provisioningState = "string"
}
})
}
RuleAction オブジェクト
オブジェクトの種類を指定するには 、odata.type プロパティを設定します。
Microsoft.Azure.Management.Insights.Models.RuleEmailAction の場合は、次を使用します。
odata.type = "Microsoft.Azure.Management.Insights.Models.RuleEmailAction"
customEmails = [
"string"
]
sendToServiceOwners = bool
Microsoft.Azure.Management.Insights.Models.RuleWebhookAction の場合は、次を使用します。
odata.type = "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction"
properties = {}
serviceUri = "string"
RuleCondition オブジェクト
オブジェクトの種類を指定するには 、odata.type プロパティを設定します。
Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition の場合は、次の値を使用します。
odata.type = "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition"
failedLocationCount = int
windowSize = "string"
Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition の場合は、次の値を使用します。
odata.type = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition"
aggregation = {
operator = "string"
threshold = int
windowSize = "string"
}
Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition の場合は、次の値を使用します。
odata.type = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition"
operator = "string"
threshold = int
timeAggregation = "string"
windowSize = "string"
RuleDataSource オブジェクト
オブジェクトの種類を指定するには 、odata.type プロパティを設定します。
Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource の場合は、次の値を使用します。
odata.type = "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource"
claims = {
emailAddress = "string"
}
eventName = "string"
eventSource = "string"
level = "string"
operationName = "string"
resourceGroupName = "string"
resourceProviderName = "string"
status = "string"
subStatus = "string"
Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource の場合は、次の値を使用します。
odata.type = "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource"
metricName = "string"
プロパティ値
alertrules
名前 | 説明 | 値 |
---|---|---|
type | リソースの種類 | "Microsoft.Insights/alertrules@2016-03-01" |
name | リソース名 | string (必須) |
location | リソースの場所 | string (必須) |
parent_id | リソース グループにデプロイするには、そのリソース グループの ID を使用します。 | string (必須) |
tags | リソース タグ | タグ名と値のディクショナリ。 |
properties | リソースのアラート ルールのプロパティ。 | AlertRule (必須) |
AlertRule
名前 | 説明 | 値 |
---|---|---|
action | アラート ルールがアクティブになったとき、およびアラート条件が解決されたときに実行されるアクション。 | RuleAction |
actions | アラート ルールがアクティブになったとき、およびアラート条件が解決されたときに実行されるアクションの配列。 | RuleAction[] |
condition | アラート ルールがアクティブ化される条件。 | RuleCondition (必須) |
description | アラート メールに含まれるアラート ルールの説明。 | string |
isEnabled | アラート ルールが有効になっているかどうかを示すフラグ。 | bool (必須) |
name | アラート ルールの名前。 | string (必須) |
provisioningState | プロビジョニングの状態。 | string |
RuleAction
名前 | 説明 | 値 |
---|---|---|
odata.type | オブジェクトの種類を設定する | Microsoft.Azure.Management.Insights.Models.RuleEmailAction Microsoft.Azure.Management.Insights.Models.RuleWebhookAction (必須) |
RuleEmailAction
名前 | 説明 | 値 |
---|---|---|
odata.type | は、アクションの種類を指定します。 アクションには、RuleEmailAction と RuleWebhookAction の 2 種類があります。 | "Microsoft.Azure.Management.Insights.Models.RuleEmailAction" (必須) |
customEmails | アラートのアクティブ化を通知する管理者のカスタム 電子メール アドレスの一覧。 | string[] |
sendToServiceOwners | アラートがアクティブ化されたときにサービスの管理者 (サービスと共同管理者) に通知する必要があるかどうか。 | [bool] |
RuleWebhookAction
名前 | 説明 | 値 |
---|---|---|
odata.type | は、アクションの種類を指定します。 アクションには、RuleEmailAction と RuleWebhookAction の 2 種類があります。 | "Microsoft.Azure.Management.Insights.Models.RuleWebhookAction" (必須) |
properties | post 操作に含めるカスタム プロパティのディクショナリ。 これらのデータは Webhook ペイロードに追加されます。 | object |
serviceUri | アラートがアクティブ化または解決されたときに通知を投稿するサービス URI。 | string |
RuleCondition
名前 | 説明 | 値 |
---|---|---|
dataSource | ルールがデータを収集するリソース。 この型の場合、dataSource は常に RuleMetricDataSource 型になります。 | RuleDataSource |
odata.type | オブジェクトの種類を設定する | Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition (必須) |
RuleDataSource
名前 | 説明 | 値 |
---|---|---|
legacyResourceId | ルールが監視するリソースのレガシ リソース識別子。 注: このプロパティは、既存のルールに対して更新できません。 | string |
metricNamespace | メトリックの名前空間。 | string |
resourceLocation | リソースの場所。 | string |
resourceUri | ルールが監視するリソースのリソース識別子。 注: このプロパティは、既存のルールに対して更新できません。 | string |
odata.type | オブジェクトの種類を設定する | Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource (必須) |
RuleManagementEventDataSource
名前 | 説明 | 値 |
---|---|---|
odata.type | は、データ ソースの種類を指定します。 ルール データ ソースには、RuleMetricDataSource と RuleManagementEventDataSource の 2 種類があります。 | "Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource" (必須) |
claims | クレーム。 | RuleManagementEventClaimsDataSource |
eventName | イベント名。 | string |
eventSource | イベント ソース。 | string |
レベル | レベル。 | string |
operationName | 確認する必要がある操作の名前。 名前を指定しない場合は、すべての操作が一致します。 | string |
resourceGroupName | リソース グループ名。 | string |
resourceProviderName | リソース プロバイダー名。 | string |
status | 確認する必要がある操作の状態。 状態を指定しない場合は、すべての状態が一致します。 | string |
subStatus | サブステータス。 | string |
RuleManagementEventClaimsDataSource
名前 | 説明 | 値 |
---|---|---|
emailAddress | 電子メール アドレス。 | string |
RuleMetricDataSource
名前 | 説明 | 値 |
---|---|---|
odata.type | は、データ ソースの種類を指定します。 ルール データ ソースには、RuleMetricDataSource と RuleManagementEventDataSource の 2 種類があります。 | "Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource" (必須) |
metricName | ルールが監視する内容を定義するメトリックの名前。 | string |
LocationThresholdRuleCondition
名前 | 説明 | 値 |
---|---|---|
odata.type | は条件の種類を指定します。 これは、ManagementEventRuleCondition (管理イベントの発生)、LocationThresholdRuleCondition (Web テストの失敗の数に基づく)、ThresholdRuleCondition (メトリックのしきい値に基づく) の 3 種類のいずれかです。 | "Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition" (必須) |
failedLocationCount | アラートのアクティブ化に失敗する必要がある場所の数。 | int (必須) 制約: 最小値 = 0 |
windowSize | しきい値に基づいてアラート アクティビティを監視するために使用される期間 (ISO 8601 期間形式)。 指定する場合は、5 分から 1 日の間にする必要があります。 | string |
ManagementEventRuleCondition
名前 | 説明 | 値 |
---|---|---|
odata.type | は条件の種類を指定します。 これは、ManagementEventRuleCondition (管理イベントの発生)、LocationThresholdRuleCondition (Web テストの失敗の数に基づく)、ThresholdRuleCondition (メトリックのしきい値に基づく) の 3 種類のいずれかです。 | "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition" (必須) |
aggregation | 収集されるデータを時間の経過とタイミングで組み合わせる方法と、アラートがアクティブ化されるタイミング。 管理イベントのアラートの集計は省略可能です。指定しない場合は、すべてのイベントによってアラートがアクティブ化されます。 | ManagementEventAggregationCondition |
ManagementEventAggregationCondition
名前 | 説明 | 値 |
---|---|---|
operator | 条件演算子。 | "GreaterThan" "GreaterThanOrEqual" "LessThan" "LessThanOrEqual" |
threshold | アラートを有効にするしきい値。 | INT |
windowSize | しきい値に基づいてアラート アクティビティを監視するために使用される期間 (ISO 8601 期間形式)。 指定する場合は、5 分から 1 日の間にする必要があります。 | string |
ThresholdRuleCondition
名前 | 説明 | 値 |
---|---|---|
odata.type | は条件の種類を指定します。 これは、ManagementEventRuleCondition (管理イベントの発生)、LocationThresholdRuleCondition (Web テストの失敗の数に基づく)、ThresholdRuleCondition (メトリックのしきい値に基づく) の 3 種類のいずれかです。 | "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition" (必須) |
operator | データとしきい値の比較に使用される演算子。 | "GreaterThan" "GreaterThanOrEqual" "LessThan" "LessThanOrEqual" (必須) |
threshold | アラートをアクティブにするしきい値。 | int (必須) |
timeAggregation | 時間集計演算子。 収集されるデータを時間の経過と同時に組み合わせる方法。 既定値は、メトリックの PrimaryAggregationType です。 | "Average" "Last" "Maximum" "最小" "Total" |
windowSize | しきい値に基づいてアラート アクティビティを監視するために使用される期間 (ISO 8601 期間形式)。 指定する場合は、5 分から 1 日の間にする必要があります。 | string |
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示