Alerts - List Enrichments
List the enrichments of an alert. It returns a collection of one object named default.
GET https://management.azure.com/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/enrichments?api-version=2023-07-12-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
alert
|
path | True |
string |
Unique ID of an alert instance. |
scope
|
path | True |
string |
scope here is resourceId for which alert is created. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK. Returns the enrichments of the specified alert. |
|
Other Status Codes |
Error response describing why the operation failed. |
Examples
Resolve
Sample Request
GET https://management.azure.com/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502101/enrichments?api-version=2023-07-12-preview
Sample Response
{
"value": [
{
"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",
"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"
}
]
}
}
]
}
Definitions
Name | Description |
---|---|
alert |
Properties of the alert enrichment item. |
alert |
The alert's enrichments. |
alert |
List the alert's enrichments. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
alertEnrichmentProperties
Properties of the alert enrichment item.
Name | Type | Description |
---|---|---|
alertId |
string |
Unique Id (GUID) of the alert for which the enrichments are being retrieved. |
enrichments |
alert |
Enrichment details |
alertEnrichmentResponse
The alert's enrichments.
Name | Type | Description |
---|---|---|
id |
string |
Azure resource Id |
name |
string |
Azure resource name |
properties |
Properties of the alert enrichment item. |
|
type |
string |
Azure resource type |
alertEnrichmentsList
List the alert's enrichments.
Name | Type | Description |
---|---|---|
nextLink |
string |
Request URL that can be used to query next page. |
value |
List the alert's enrichments |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |