你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Alerts - Get Enrichments
获取警报的扩充。
GET https://management.azure.com/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/enrichments/default?api-version=2023-07-12-preview
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
alert
|
path | True |
string |
警报实例的唯一 ID。 |
scope
|
path | True |
string |
此处的范围是为其创建警报的 resourceId。 |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
没问题。 返回指定警报的扩充。 |
|
Other Status Codes |
描述操作失败原因的错误响应。 |
示例
Resolve
Sample Request
GET https://management.azure.com/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502101/enrichments/default?api-version=2023-07-12-preview
Sample Response
{
"properties": {
"alertId": "66114d64-d9d9-478b-95c9-b789d6502101",
"enrichments": [
{
"title": "Number of OOM killed events by container",
"description": "Enrichment description",
"status": "Succeeded",
"type": "PrometheusInstantQuery",
"grafanaExplorePath": "/explore?left=%7B%22datasource%22...",
"linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...",
"datasources": [
"/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw"
],
"query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace1'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0",
"time": "2015-07-01T20:10:51.781Z"
},
{
"title": "Number of OOM killed events by container",
"description": "Enrichment description",
"status": "Succeeded",
"type": "PrometheusRangeQuery",
"linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...",
"grafanaExplorePath": "/explore?left=%7B%22datasource%22...",
"datasources": [
"/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw"
],
"query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0",
"start": "2015-07-01T20:10:51.781Z",
"end": "2015-07-01T20:20:51.781Z",
"step": "PT15S"
},
{
"title": "Number of OOM killed events by container",
"description": "Enrichment description",
"status": "Failed",
"type": "PrometheusRangeQuery",
"linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...",
"grafanaExplorePath": "/explore?left=%7B%22datasource%22...",
"errorMessage": "Calling Prometheus query API failed",
"datasources": [
"/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw"
],
"query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0",
"start": "2015-07-01T20:10:51.781Z",
"end": "2015-07-01T20:20:51.781Z",
"step": "PT15S"
}
]
},
"id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502101/enrichments/default",
"type": "Microsoft.AlertsManagement/alerts/enrichments",
"name": "default"
}
定义
名称 | 说明 |
---|---|
alert |
警报扩充项的属性。 |
alert |
警报的扩充。 |
Error |
资源管理错误附加信息。 |
Error |
错误详细信息。 |
Error |
错误响应 |
alertEnrichmentProperties
警报扩充项的属性。
名称 | 类型 | 说明 |
---|---|---|
alertId |
string |
要为其检索扩充的警报的唯一 ID (GUID) 。 |
enrichments |
alert |
扩充详细信息 |
alertEnrichmentResponse
警报的扩充。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
Azure 资源 ID |
name |
string |
Azure 资源名称 |
properties |
警报扩充项的属性。 |
|
type |
string |
Azure 资源类型 |
ErrorAdditionalInfo
资源管理错误附加信息。
名称 | 类型 | 说明 |
---|---|---|
info |
object |
其他信息。 |
type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
additionalInfo |
错误附加信息。 |
|
code |
string |
错误代码。 |
details |
错误详细信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
ErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |