Share via


Alerts - Get Enrichments

Ottenere gli arricchimenti di un avviso.

GET https://management.azure.com/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/enrichments/default?api-version=2023-07-12-preview

Parametri dell'URI

Nome In Necessario Tipo Descrizione
alertId
path True

string

ID univoco di un'istanza di avviso.

scope
path True

string

l'ambito è resourceId per il quale viene creato l'avviso.

api-version
query True

string

Versione dell'API da usare per questa operazione.

Risposte

Nome Tipo Descrizione
200 OK

alertEnrichmentResponse

OK. Restituisce gli arricchimenti dell'avviso specificato.

Other Status Codes

ErrorResponse

Risposta di errore che descrive perché l'operazione non è riuscita.

Esempio

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"
}

Definizioni

Nome Descrizione
alertEnrichmentProperties

Proprietà dell'elemento di arricchimento degli avvisi.

alertEnrichmentResponse

Arricchimenti dell'avviso.

ErrorAdditionalInfo

Informazioni aggiuntive sulla gestione delle risorse.

ErrorDetail

Dettagli dell'errore.

ErrorResponse

Risposta di errore

alertEnrichmentProperties

Proprietà dell'elemento di arricchimento degli avvisi.

Nome Tipo Descrizione
alertId

string

ID univoco (GUID) dell'avviso per il quale vengono recuperati gli arricchimenti.

enrichments

alertEnrichmentItem[]

Dettagli di arricchimento

alertEnrichmentResponse

Arricchimenti dell'avviso.

Nome Tipo Descrizione
id

string

ID risorsa di Azure

name

string

Nome risorsa di Azure

properties

alertEnrichmentProperties

Proprietà dell'elemento di arricchimento degli avvisi.

type

string

Tipo di risorsa di Azure

ErrorAdditionalInfo

Informazioni aggiuntive sulla gestione delle risorse.

Nome Tipo Descrizione
info

object

Informazioni aggiuntive.

type

string

Tipo di informazioni aggiuntive.

ErrorDetail

Dettagli dell'errore.

Nome Tipo Descrizione
additionalInfo

ErrorAdditionalInfo[]

Informazioni aggiuntive sull'errore.

code

string

Codice di errore.

details

ErrorDetail[]

Dettagli dell'errore.

message

string

Messaggio di errore.

target

string

Destinazione dell'errore.

ErrorResponse

Risposta di errore

Nome Tipo Descrizione
error

ErrorDetail

Oggetto error.