Alerts - Get Enrichments
Pobieranie wzbogaceń alertu.
GET https://management.azure.com/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/enrichments/default?api-version=2023-07-12-preview
Parametry identyfikatora URI
Nazwa | W | Wymagane | Typ | Opis |
---|---|---|---|---|
alert
|
path | True |
string |
Unikatowy identyfikator wystąpienia alertu. |
scope
|
path | True |
string |
zakres w tym miejscu to resourceId, dla którego jest tworzony alert. |
api-version
|
query | True |
string |
Wersja interfejsu API do użycia dla tej operacji. |
Odpowiedzi
Nazwa | Typ | Opis |
---|---|---|
200 OK |
OK. Zwraca wzbogaceń określonego alertu. |
|
Other Status Codes |
Odpowiedź na błąd opisująca, dlaczego operacja nie powiodła się. |
Przykłady
Resolve
Przykładowe żądanie
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
Przykładowa odpowiedź
{
"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"
}
Definicje
Nazwa | Opis |
---|---|
alert |
Właściwości elementu wzbogacania alertu. |
alert |
Wzbogacanie alertu. |
Error |
Dodatkowe informacje o błędzie zarządzania zasobami. |
Error |
Szczegóły błędu. |
Error |
Odpowiedź na błąd |
alertEnrichmentProperties
Właściwości elementu wzbogacania alertu.
Nazwa | Typ | Opis |
---|---|---|
alertId |
string |
Unikatowy identyfikator (GUID) alertu, dla którego pobierane są wzbogacania. |
enrichments |
alert |
Szczegóły wzbogacania |
alertEnrichmentResponse
Wzbogacanie alertu.
Nazwa | Typ | Opis |
---|---|---|
id |
string |
Identyfikator zasobu platformy Azure |
name |
string |
Nazwa zasobu platformy Azure |
properties |
Właściwości elementu wzbogacania alertu. |
|
type |
string |
Typ zasobu platformy Azure |
ErrorAdditionalInfo
Dodatkowe informacje o błędzie zarządzania zasobami.
Nazwa | Typ | Opis |
---|---|---|
info |
object |
Dodatkowe informacje. |
type |
string |
Dodatkowy typ informacji. |
ErrorDetail
Szczegóły błędu.
Nazwa | Typ | Opis |
---|---|---|
additionalInfo |
Dodatkowe informacje o błędzie. |
|
code |
string |
Kod błędu. |
details |
Szczegóły błędu. |
|
message |
string |
Komunikat o błędzie. |
target |
string |
Element docelowy błędu. |
ErrorResponse
Odpowiedź na błąd
Nazwa | Typ | Opis |
---|---|---|
error |
Obiekt error. |