Get alerts

get

/serviceapi/eventServices/alerts

Retrieves the alert summaries according to the given alert parameters in the path.

Alerts can be searched by filtering over various attributes of the alert.

Request

Supported Media Types
Query Parameters
  • Returns the alerts with matching entity ID. It can not be be used in conjunction with entityType parameter.
  • Collection Format: multi
    Returns the alerts for entity that matches passed in entityType and entityName parameters.
  • Collection Format: multi
    Returns the alerts for entities, whose entity type is member of the passed in list. It can not be used in conjunction with entityId parameter. If entityName parameter is specified, list for this parameter must contain single value.
  • Collection Format: multi
    Returns the alerts whose event type is a member of the passed in list.
    • Allowed Values: [ "omc_me_availability", "omc_metric_alert", "omc_metric_error", "omc_metricEarlyWarning", "omc_metricAnomaly", "omc_itaForecastViolation", "omc_itaDBEnableStatus", "omc_itaConfig", "omc_apm_thr_violation", "omc_smaThreatEvent" ]
  • Returns the alerts whose message matches the passed in key word.
  • the number of entries in the result to be returend in one REST call
    Default Value: 50
  • If set to true, the alert details of the member entities would be included in the response. It can be optionally specified when entityId or entityName parameter is passed in.
    Default Value: false
  • the offset into the result list when doing a query with limit
    Default Value: 0
  • Collection Format: multi
    Returns the alerts whose service type is member of the passed in list.
    • Allowed Values: [ "APM", "Monitoring", "Log Analytics", "Agent", "ITAnalytics", "Compliance", "Orchestration", "SecurityAnalytics" ]
  • Collection Format: multi
    Returns the alerts whose severity is member of the passed in list.
    • Allowed Values: [ "FATAL", "CRITICAL", "WARNING", "CLEAR" ]
  • Returns the alerts that were last created or updated during the time period specified via since and until parameters.
  • the status of the alert to be looked up
    Allowed Values: [ "open", "closed", "both" ]
  • Returns the alerts that were last created or updated during the time period specified via since and until parameters.
Back to Top

Response

Supported Media Types

200 Response

query was successful
Body ()
Root Schema : ItemListAlertSummaries
Type: object

It is describing the list of alert summaries returned in response to an alert tickets request.

Show Source
Nested Schema : items
Type: array
The items
Show Source
  • AlertSummary

    The alert summary has various properties about an alert managed in Oracle Management Cloud. An alert represents a series of events that occur over time. An alert is uniquely identified by its id. The alert is initially created when an event with a non CLEAR severity is first detected over some aspect of the associated entity. The alert's severity changes over time based on newer events. The alert is finally cleared based on an event with CLEAR severity.

Nested Schema : AlertSummary
Type: object

The alert summary has various properties about an alert managed in Oracle Management Cloud. An alert represents a series of events that occur over time. An alert is uniquely identified by its id. The alert is initially created when an event with a non CLEAR severity is first detected over some aspect of the associated entity. The alert's severity changes over time based on newer events. The alert is finally cleared based on an event with CLEAR severity.

Show Source

400 Response

invalid query submitted
Body ()
Root Schema : InvalidRequest
Type: object

When invalid alert API request is received, alert system returns this response.

Show Source

500 Response

encountered unhandled exception
Body ()
Root Schema : UnhandledException
Type: object

When alert system runs into unhandled exception, it returns this response.

Show Source
Back to Top

Examples

Get open alerts

curl -u ${OMC_USERNAME}:${PASSWORD} -X GET "https://serverurl/serviceapi/eventServices/alerts?limit=1"

The response might look like the following:

{
    {
      "items": 
      [
        {
          "alertId": "62965132339213727047162539738389170623",
          "entityId": "87B65F77DE4F200AE5374A2D38B5E31F",
          "entityName": "myhost.mydomain.com",
          "entityDisplayName": "my host",
          "entityType": "omc_host_linux",
          "entityTypeDisplayName": "Host (Linux)",
          "eventType": "omc_metric_alert",
          "eventTypeDisplayName": "Fixed Threshold",
          "message": "Logical Memory Utilization for myhost.mydomain.com is 92.78 %; it is greater than expected value of 80 % for 10 minutes",
          "severity": "WARNING",
          "canonicalLink": "serviceapi/eventServices/alerts/62965132339213727047162539738389170623",
          "serviceType": "Monitoring",
          "open": true,
          "isAutoClose": true,
          "eventName": "HOST_Memory:logicalMemoryUtilizationPercent",
          "imported": false,
          "hasTicket": false,
          "creationTime": "2020-09-01T08:40:02.946Z",
          "lastUpdatedTime": "2020-09-09T17:13:08.463Z",
          "firstEventTime": "2020-09-01T08:38:55.472Z",
          "latestEventTime": "2020-09-01T08:38:55.472Z"
        }
      ],
      "hasMore": true,
      "count": 1,
      "nextLink": "/serviceapi/eventServices/alerts?limit=1&offset=1"
  }
}

Get open alerts for entities of omc_host_linux type

curl -u ${OMC_USERNAME}:${PASSWORD} -X GET "https://serverurl/serviceapi/eventServices/alerts?entityType=omc_host_linux&limit=1"

The response might look like the following:

{
    {
      "items": 
      [
        {
          "alertId": "62965132339213727047162539738389170623",
          "entityId": "87B65F77DE4F200AE5374A2D38B5E31F",
          "entityName": "myhost.mydomain.com",
          "entityDisplayName": "my host",
          "entityType": "omc_host_linux",
          "entityTypeDisplayName": "Host (Linux)",
          "eventType": "omc_metric_alert",
          "eventTypeDisplayName": "Fixed Threshold",
          "message": "Logical Memory Utilization for myhost.mydomain.com is 92.78 %; it is greater than expected value of 80 % for 10 minutes",
          "severity": "WARNING",
          "canonicalLink": "serviceapi/eventServices/alerts/62965132339213727047162539738389170623",
          "serviceType": "Monitoring",
          "open": true,
          "isAutoClose": true,
          "eventName": "HOST_Memory:logicalMemoryUtilizationPercent",
          "imported": false,
          "hasTicket": false,
          "creationTime": "2020-09-01T08:40:02.946Z",
          "lastUpdatedTime": "2020-09-09T17:13:08.463Z",
          "firstEventTime": "2020-09-01T08:38:55.472Z",
          "latestEventTime": "2020-09-01T08:38:55.472Z"
        }
      ],
      "hasMore": true,
      "count": 1,
      "nextLink": "/serviceapi/eventServices/alerts?limit=1&offset=1"
  }
}

Get both open and closed alerts for entities of omc_host_linux type

curl -u ${OMC_USERNAME}:${PASSWORD} -X GET "https://serverurl/serviceapi/eventServices/alerts?status=both&entityType=omc_host_linux&limit=1"

The response might look like the following:

{
    {
      "items": 
      [
        {
          "alertId": "62965132339213727047162539738389170623",
          "entityId": "87B65F77DE4F200AE5374A2D38B5E31F",
          "entityName": "myhost.mydomain.com",
          "entityDisplayName": "my host",
          "entityType": "omc_host_linux",
          "entityTypeDisplayName": "Host (Linux)",
          "eventType": "omc_metric_alert",
          "eventTypeDisplayName": "Fixed Threshold",
          "message": "Logical Memory Utilization for myhost.mydomain.com is 92.78 %; it is greater than expected value of 80 % for 10 minutes",
          "severity": "WARNING",
          "canonicalLink": "serviceapi/eventServices/alerts/62965132339213727047162539738389170623",
          "serviceType": "Monitoring",
          "open": true,
          "isAutoClose": true,
          "eventName": "HOST_Memory:logicalMemoryUtilizationPercent",
          "imported": false,
          "hasTicket": false,
          "creationTime": "2020-09-01T08:40:02.946Z",
          "lastUpdatedTime": "2020-09-09T17:13:08.463Z",
          "firstEventTime": "2020-09-01T08:38:55.472Z",
          "latestEventTime": "2020-09-01T08:38:55.472Z"
        }
      ],
      "hasMore": true,
      "count": 1,
      "nextLink": "/serviceapi/eventServices/alerts?limit=1&offset=1"
  }
}

Get open alerts for entity with id: 87B65F77DE4F200AE5374A2D38B5E31F

curl -u ${OMC_USERNAME}:${PASSWORD} -X GET "https://serverurl/serviceapi/eventServices/alerts?entityId=87B65F77DE4F200AE5374A2D38B5E31F"

The response might look like the following:

{
    {
      "items": 
      [
        {
          "alertId": "62965132339213727047162539738389170623",
          "entityId": "87B65F77DE4F200AE5374A2D38B5E31F",
          "entityName": "myhost.mydomain.com",
          "entityDisplayName": "my host",
          "entityType": "omc_host_linux",
          "entityTypeDisplayName": "Host (Linux)",
          "eventType": "omc_metric_alert",
          "eventTypeDisplayName": "Fixed Threshold",
          "message": "Logical Memory Utilization for myhost.mydomain.com is 92.78 %; it is greater than expected value of 80 % for 10 minutes",
          "severity": "WARNING",
          "canonicalLink": "serviceapi/eventServices/alerts/62965132339213727047162539738389170623",
          "serviceType": "Monitoring",
          "open": true,
          "isAutoClose": true,
          "eventName": "HOST_Memory:logicalMemoryUtilizationPercent",
          "imported": false,
          "hasTicket": false,
          "creationTime": "2020-09-01T08:40:02.946Z",
          "lastUpdatedTime": "2020-09-09T17:13:08.463Z",
          "firstEventTime": "2020-09-01T08:38:55.472Z",
          "latestEventTime": "2020-09-01T08:38:55.472Z"
        }
      ],
      "hasMore": false,
      "count": 1
  }
}
Back to Top