Microsoft.Insights alertrules
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 | 資源名稱 | 字串 (必要) |
location | 資源位置 | 字串 (必要) |
tags | 資源標籤 | 標記名稱和值的字典。 請參閱 範本中的標記 |
properties | 資源的警示規則屬性。 | AlertRule (必要) |
AlertRule
名稱 | 描述 | 值 |
---|---|---|
動作 | 當警示規則變成作用中時,以及解決警示條件時所執行的動作。 | RuleAction |
動作 | 當警示規則變成作用中時,以及解決警示條件時所執行的動作陣列。 | RuleAction[] |
condition (條件) | 導致啟動警示規則的條件。 | RuleCondition (必要) |
description | 警示電子郵件中將包含的警示規則描述。 | 字串 |
isEnabled | 指出是否啟用警示規則的旗標。 | bool (必要) |
NAME | 警示規則的名稱。 | 字串 (必要) |
provisioningState | 布建狀態。 | 字串 |
RuleAction
名稱 | 描述 | 值 |
---|---|---|
odata.type | 設定物件類型 | Microsoft.Azure.Management.Insights.Models.RuleEmailAction Microsoft.Azure.Management.Insights.Models.RuleWebhookAction (必要) |
RuleEmailAction
名稱 | 描述 | 值 |
---|---|---|
odata.type | 指定動作的類型。 有兩種類型的動作:RuleEmailAction 和 RuleWebhookAction。 | 'Microsoft.Azure.Management.Insights.Models.RuleEmailAction' (必要) |
customEmails | 系統管理員自訂電子郵件地址清單,以通知警示的啟用。 | string[] |
sendToServiceOwners | 啟動警示時,是否應該通知服務的系統管理員 (服務和共同管理員)。 | bool |
RuleWebhookAction
名稱 | 描述 | 值 |
---|---|---|
odata.type | 指定動作的類型。 有兩種類型的動作:RuleEmailAction 和 RuleWebhookAction。 | 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction' (必要) |
properties | 要包含在 post 作業中的自訂屬性字典。 這些資料會附加至 Webhook 承載。 | object |
serviceUri | 當警示啟動或解決時,要張貼通知的服務 URI。 | 字串 |
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 | 規則所監視之資源的舊版資源識別碼。 注意:無法更新現有規則的這個屬性。 | 字串 |
metricNamespace | 計量的命名空間。 | 字串 |
resourceLocation | 資源的位置。 | 字串 |
resourceUri | 規則所監視之資源的資源識別碼。 注意:無法更新現有規則的這個屬性。 | 字串 |
odata.type | 設定物件類型 | Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource (必要) |
RuleManagementEventDataSource
名稱 | 描述 | 值 |
---|---|---|
odata.type | 指定資料來源的類型。 規則資料來源有兩種類型:RuleMetricDataSource 和 RuleManagementEventDataSource | 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' (必要) |
claims | 宣告。 | RuleManagementEventClaimsDataSource |
eventName | 事件名稱。 | 字串 |
eventSource | 事件來源。 | 字串 |
等級 | 層級。 | 字串 |
operationName | 應檢查的作業名稱。 如果未提供名稱,則任何作業都相符。 | 字串 |
resourceGroupName | 資源組名。 | 字串 |
resourceProviderName | 資源提供者名稱。 | 字串 |
status | 應檢查的作業狀態。 如果未提供狀態,則任何狀態都相符。 | 字串 |
子狀態 | 子狀態。 | 字串 |
RuleManagementEventClaimsDataSource
名稱 | 描述 | 值 |
---|---|---|
emailAddress | 電子郵件地址。 | 字串 |
RuleMetricDataSource
名稱 | 描述 | 值 |
---|---|---|
odata.type | 指定資料來源的類型。 規則資料來源有兩種類型:RuleMetricDataSource 和 RuleManagementEventDataSource | 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' (必要) |
metricName | 定義規則監視之計量的名稱。 | 字串 |
LocationThresholdRuleCondition
名稱 | 描述 | 值 |
---|---|---|
odata.type | 會指定條件的類型。 這可以是下列三種類型之一:ManagementEventRuleCondition () 、LocationThresholdRuleCondition (,根據 Web 測試) 的失敗數目,以及根據計量) 的臨界值來 (的 ThresholdRuleCondition。 | 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition' (必要) |
failedLocationCount | 必須無法啟動警示的位置數目。 | int (必要) 約束: 最小值 = 0 |
windowSize | ISO 8601 持續時間格式 (期間) ,用來根據閾值監視警示活動。 如果指定,則它必須介於 5 分鐘到 1 天之間。 | 字串 |
ManagementEventRuleCondition
名稱 | 描述 | 值 |
---|---|---|
odata.type | 會指定條件的類型。 這可以是下列三種類型之一:ManagementEventRuleCondition () 、LocationThresholdRuleCondition (,根據 Web 測試) 的失敗數目,以及根據計量) 的臨界值來 (的 ThresholdRuleCondition。 | 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition' (必要) |
aggregation | 收集的資料應該如何隨著時間結合,以及何時啟動警示。 請注意,管理事件警示彙總是選用的 - 若未提供,則任何事件都會導致警示啟動。 | ManagementEventAggregationCondition |
ManagementEventAggregationCondition
名稱 | 描述 | 值 |
---|---|---|
! 運算子之後 | 條件運算子。 | 'GreaterThan' 'GreaterThanOrEqual' 'LessThan' 'LessThanOrEqual' |
threshold | 啟動警示的臨界值。 | int |
windowSize | ISO 8601 持續時間格式 (期間) ,用來根據閾值監視警示活動。 如果指定,則它必須介於 5 分鐘到 1 天之間。 | 字串 |
ThresholdRuleCondition
名稱 | 描述 | 值 |
---|---|---|
odata.type | 會指定條件的類型。 這可以是下列三種類型之一:ManagementEventRuleCondition () 、LocationThresholdRuleCondition (,根據 Web 測試) 的失敗數目,以及根據計量) 的臨界值來 (的 ThresholdRuleCondition。 | 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition' (必要) |
! 運算子之後 | 用來比較資料和閾值的運算子。 | 'GreaterThan' 'GreaterThanOrEqual' 'LessThan' 'LessThanOrEqual' (必要) |
threshold | 啟動警示的臨界值。 | int (必要) |
timeAggregation | 時間匯總運算子。 收集的資料應該如何隨著時間合併。 預設值為 Metric 的 PrimaryAggregationType。 | 'Average' 'Last' 'Maximum' 'Minimum' 'Total' |
windowSize | ISO 8601 持續時間格式 (期間) ,用來根據閾值監視警示活動。 如果指定,則它必須介於 5 分鐘到 1 天之間。 | 字串 |
快速入門範本
下列快速入門範本會部署此資源類型。
範本 | 描述 |
---|---|
虛擬機器上的 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
名稱 | 描述 | 值 |
---|---|---|
類型 | 資源類型 | 'Microsoft.Insights/alertrules' |
apiVersion | 資源 API 版本 | '2016-03-01' |
NAME | 資源名稱 | 字串 (必要) |
location | 資源位置 | 字串 (必要) |
tags | 資源標籤 | 標記名稱和值的字典。 請參閱 範本中的標記 |
properties | 資源的警示規則屬性。 | AlertRule (必要) |
AlertRule
名稱 | 描述 | 值 |
---|---|---|
動作 | 當警示規則變成作用中時,以及解決警示條件時所執行的動作。 | RuleAction |
動作 | 當警示規則變成作用中時,以及解決警示條件時所執行的動作陣列。 | RuleAction[] |
condition (條件) | 導致啟動警示規則的條件。 | RuleCondition (必要) |
description | 警示電子郵件中將包含的警示規則描述。 | 字串 |
isEnabled | 指出是否啟用警示規則的旗標。 | bool (必要) |
NAME | 警示規則的名稱。 | 字串 (必要) |
provisioningState | 布建狀態。 | 字串 |
RuleAction
名稱 | 描述 | 值 |
---|---|---|
odata.type | 設定物件類型 | Microsoft.Azure.Management.Insights.Models.RuleEmailAction Microsoft.Azure.Management.Insights.Models.RuleWebhookAction (必要) |
RuleEmailAction
名稱 | 描述 | 值 |
---|---|---|
odata.type | 指定動作的類型。 有兩種類型的動作:RuleEmailAction 和 RuleWebhookAction。 | 'Microsoft.Azure.Management.Insights.Models.RuleEmailAction' (必要) |
customEmails | 系統管理員自訂電子郵件地址清單,以通知警示的啟用。 | string[] |
sendToServiceOwners | 啟動警示時,是否應該通知服務的系統管理員 (服務和共同管理員)。 | bool |
RuleWebhookAction
名稱 | 描述 | 值 |
---|---|---|
odata.type | 指定動作的類型。 有兩種類型的動作:RuleEmailAction 和 RuleWebhookAction。 | 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction' (必要) |
properties | 要包含在 post 作業中的自訂屬性字典。 這些資料會附加至 Webhook 承載。 | object |
serviceUri | 當警示啟動或解決時,要張貼通知的服務 URI。 | 字串 |
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 | 規則所監視之資源的舊版資源識別碼。 注意:無法更新現有規則的這個屬性。 | 字串 |
metricNamespace | 計量的命名空間。 | 字串 |
resourceLocation | 資源的位置。 | 字串 |
resourceUri | 規則所監視之資源的資源識別碼。 注意:無法更新現有規則的這個屬性。 | 字串 |
odata.type | 設定物件類型 | Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource 需要 Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource () |
RuleManagementEventDataSource
名稱 | 描述 | 值 |
---|---|---|
odata.type | 指定資料來源的類型。 規則資料來源有兩種類型:RuleMetricDataSource 和 RuleManagementEventDataSource | 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' (必要) |
claims | 宣告。 | RuleManagementEventClaimsDataSource |
eventName | 事件名稱。 | 字串 |
eventSource | 事件來源。 | 字串 |
等級 | 層級。 | 字串 |
operationName | 應檢查的作業名稱。 如果未提供名稱,則任何作業都相符。 | 字串 |
resourceGroupName | 資源組名。 | 字串 |
resourceProviderName | 資源提供者名稱。 | 字串 |
status | 應檢查的作業狀態。 如果未提供狀態,則任何狀態都相符。 | 字串 |
子狀態 | 子狀態。 | 字串 |
RuleManagementEventClaimsDataSource
名稱 | 描述 | 值 |
---|---|---|
emailAddress | 電子郵件地址。 | 字串 |
RuleMetricDataSource
名稱 | 描述 | 值 |
---|---|---|
odata.type | 指定資料來源的類型。 規則資料來源有兩種類型:RuleMetricDataSource 和 RuleManagementEventDataSource | 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' (必要) |
metricName | 定義規則監視之計量的名稱。 | 字串 |
LocationThresholdRuleCondition
名稱 | 描述 | 值 |
---|---|---|
odata.type | 會指定條件的類型。 這可以是下列三種類型之一:ManagementEventRuleCondition (根據計量) 的閾值,發生管理事件) 、LocationThresholdRuleCondition ( () 。 | 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition' (必要) |
failedLocationCount | 必須無法啟動警示的位置數目。 | 需要 int () 約束: 最小值 = 0 |
windowSize | ISO 8601 持續時間格式 (期間) ,用來根據閾值監視警示活動。 如果指定的話,它必須介於 5 分鐘到 1 天之間。 | 字串 |
ManagementEventRuleCondition
名稱 | 描述 | 值 |
---|---|---|
odata.type | 會指定條件的類型。 這可以是下列三種類型之一:ManagementEventRuleCondition (根據計量) 的閾值,發生管理事件) 、LocationThresholdRuleCondition ( () 。 | 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition' (必要) |
aggregation | 收集的資料應該如何隨著時間結合,以及何時啟動警示。 請注意,管理事件警示彙總是選用的 - 若未提供,則任何事件都會導致警示啟動。 | ManagementEventAggregationCondition |
ManagementEventAggregationCondition
名稱 | 描述 | 值 |
---|---|---|
! 運算子之後 | 條件運算子。 | 'GreaterThan' 'GreaterThanOrEqual' 'LessThan' 'LessThanOrEqual' |
threshold | 啟動警示的臨界值。 | int |
windowSize | ISO 8601 持續時間格式 (期間) ,用來根據閾值監視警示活動。 如果指定,則它必須介於 5 分鐘到 1 天之間。 | 字串 |
ThresholdRuleCondition
名稱 | 描述 | 值 |
---|---|---|
odata.type | 會指定條件的類型。 這可以是下列三種類型之一:ManagementEventRuleCondition () 、LocationThresholdRuleCondition (,根據 Web 測試) 的失敗數目,以及根據計量) 的臨界值來 (的 ThresholdRuleCondition。 | 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition' (必要) |
! 運算子之後 | 用來比較資料和閾值的運算子。 | 'GreaterThan' 'GreaterThanOrEqual' 'LessThan' 'LessThanOrEqual' (必要) |
threshold | 啟動警示的臨界值。 | int (必要) |
timeAggregation | 時間匯總運算子。 收集的資料應該如何隨著時間合併。 預設值為 Metric 的 PrimaryAggregationType。 | 'Average' 'Last' 'Maximum' 'Minimum' 'Total' |
windowSize | ISO 8601 持續時間格式 (期間) ,用來根據閾值監視警示活動。 如果指定,則它必須介於 5 分鐘到 1 天之間。 | 字串 |
快速入門範本
下列快速入門範本會部署此資源類型。
範本 | 描述 |
---|---|
虛擬機器上的 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
名稱 | 描述 | 值 |
---|---|---|
類型 | 資源類型 | 「Microsoft.Insights/alertrules@2016-03-01」 |
NAME | 資源名稱 | 字串 (必要) |
location | 資源位置 | 字串 (必要) |
parent_id | 若要部署至資源群組,請使用該資源群組的識別碼。 | 字串 (必要) |
tags | 資源標籤 | 標記名稱和值的字典。 |
properties | 資源的警示規則屬性。 | AlertRule (必要) |
AlertRule
名稱 | 描述 | 值 |
---|---|---|
動作 | 當警示規則變成作用中時,以及解決警示條件時所執行的動作。 | RuleAction |
動作 | 當警示規則變成作用中時,以及解決警示條件時所執行的動作陣列。 | RuleAction[] |
condition (條件) | 導致啟動警示規則的條件。 | RuleCondition (必要) |
description | 警示電子郵件中將包含的警示規則描述。 | 字串 |
isEnabled | 指出是否啟用警示規則的旗標。 | bool (必要) |
NAME | 警示規則的名稱。 | 字串 (必要) |
provisioningState | 布建狀態。 | 字串 |
RuleAction
名稱 | 描述 | 值 |
---|---|---|
odata.type | 設定物件類型 | Microsoft.Azure.Management.Insights.Models.RuleEmailAction Microsoft.Azure.Management.Insights.Models.RuleWebhookAction (必要) |
RuleEmailAction
名稱 | 描述 | 值 |
---|---|---|
odata.type | 指定動作的類型。 有兩種類型的動作:RuleEmailAction 和 RuleWebhookAction。 | 「Microsoft.Azure.Management.Insights.Models.RuleEmailAction」 (必要) |
customEmails | 系統管理員自訂電子郵件地址清單,以通知警示的啟用。 | string[] |
sendToServiceOwners | 啟動警示時,是否應該通知服務的系統管理員 (服務和共同管理員)。 | bool |
RuleWebhookAction
名稱 | 描述 | 值 |
---|---|---|
odata.type | 指定動作的類型。 有兩種類型的動作:RuleEmailAction 和 RuleWebhookAction。 | 「Microsoft.Azure.Management.Insights.Models.RuleWebhookAction」 (必要) |
properties | 要包含在 post 作業中的自訂屬性字典。 這些資料會附加至 Webhook 承載。 | object |
serviceUri | 當警示啟動或解決時,要張貼通知的服務 URI。 | 字串 |
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 | 規則所監視之資源的舊版資源識別碼。 注意:無法更新現有規則的這個屬性。 | 字串 |
metricNamespace | 計量的命名空間。 | 字串 |
resourceLocation | 資源的位置。 | 字串 |
resourceUri | 規則所監視之資源的資源識別碼。 注意:無法更新現有規則的這個屬性。 | 字串 |
odata.type | 設定物件類型 | Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource (必要) |
RuleManagementEventDataSource
名稱 | 描述 | 值 |
---|---|---|
odata.type | 指定資料來源的類型。 規則資料來源有兩種類型:RuleMetricDataSource 和 RuleManagementEventDataSource | 「Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource」 (必要) |
claims | 宣告。 | RuleManagementEventClaimsDataSource |
eventName | 事件名稱。 | 字串 |
eventSource | 事件來源。 | 字串 |
等級 | 層級。 | 字串 |
operationName | 應檢查的作業名稱。 如果未提供名稱,則任何作業都相符。 | 字串 |
resourceGroupName | 資源組名。 | 字串 |
resourceProviderName | 資源提供者名稱。 | 字串 |
status | 應檢查的作業狀態。 如果未提供狀態,則任何狀態都相符。 | 字串 |
子狀態 | 子狀態。 | 字串 |
RuleManagementEventClaimsDataSource
名稱 | 描述 | 值 |
---|---|---|
emailAddress | 電子郵件地址。 | 字串 |
RuleMetricDataSource
名稱 | 描述 | 值 |
---|---|---|
odata.type | 指定資料來源的類型。 規則資料來源有兩種類型:RuleMetricDataSource 和 RuleManagementEventDataSource | 「Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource」 (必要) |
metricName | 定義規則監視之計量的名稱。 | 字串 |
LocationThresholdRuleCondition
名稱 | 描述 | 值 |
---|---|---|
odata.type | 會指定條件的類型。 這可以是下列三種類型之一:ManagementEventRuleCondition (根據計量) 的閾值,發生管理事件) 、LocationThresholdRuleCondition ( () 。 | 「Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition」 (必要) |
failedLocationCount | 必須無法啟動警示的位置數目。 | 需要 int () 約束: 最小值 = 0 |
windowSize | ISO 8601 持續時間格式 (期間) ,用來根據閾值監視警示活動。 如果指定的話,它必須介於 5 分鐘到 1 天之間。 | 字串 |
ManagementEventRuleCondition
名稱 | 描述 | 值 |
---|---|---|
odata.type | 會指定條件的類型。 這可以是下列三種類型之一:ManagementEventRuleCondition (根據計量) 的閾值,發生管理事件) 、LocationThresholdRuleCondition ( () 。 | 「Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition」 (必要) |
aggregation | 收集的資料應該如何隨著時間與警示啟動的時間合併。 請注意,管理事件警示彙總是選用的 - 若未提供,則任何事件都會導致警示啟動。 | ManagementEventAggregationCondition |
ManagementEventAggregationCondition
名稱 | 描述 | 值 |
---|---|---|
! 運算子之後 | 條件運算子。 | 「GreaterThan」 「GreaterThanOrEqual」 「LessThan」 「LessThanOrEqual」 |
threshold | 啟動警示的臨界值。 | int |
windowSize | ISO 8601 持續時間格式 (期間) ,用來根據閾值監視警示活動。 如果指定的話,它必須介於 5 分鐘到 1 天之間。 | 字串 |
ThresholdRuleCondition
名稱 | 描述 | 值 |
---|---|---|
odata.type | 會指定條件的類型。 這可以是下列三種類型之一:ManagementEventRuleCondition (根據計量) 的閾值,發生管理事件) 、LocationThresholdRuleCondition ( () 。 | 「Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition」 (必要) |
! 運算子之後 | 用來比較資料和臨界值的運算子。 | 「GreaterThan」 「GreaterThanOrEqual」 「LessThan」 「LessThanOrEqual」 (必要) |
threshold | 啟動警示的臨界值。 | 需要 int () |
timeAggregation | 時間匯總運算子。 收集的資料應如何隨著時間合併。 預設值為 Metric 的 PrimaryAggregationType。 | 「Average」 「Last」 「最大值」 「最小值」 「Total」 |
windowSize | ISO 8601 持續時間格式 (期間) ,用來根據閾值監視警示活動。 如果指定的話,它必須介於 5 分鐘到 1 天之間。 | 字串 |
意見反應
https://aka.ms/ContentUserFeedback。
即將推出:在 2024 年,我們將隨著內容的意見反應機制逐步淘汰 GitHub 問題,並以新的意見反應系統來取代。 如需詳細資訊,請參閱提交並檢視相關的意見反應