Get alerts
/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
- application/json
-
entityId(optional): string
Returns the alerts with matching entity ID. It can not be be used in conjunction with entityType parameter.
-
entityName(optional): array
Collection Format:
multi
Returns the alerts for entity that matches passed in entityType and entityName parameters. -
entityType(optional): array
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. -
eventType(optional): array
Collection Format:
multi
Returns the alerts whose event type is a member of the passed in list.-
[0]:
string
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" ]
-
[0]:
string
-
keyword(optional): string
Returns the alerts whose message matches the passed in key word.
-
limit(optional): integer(int32)
the number of entries in the result to be returend in one REST callDefault Value:
50
-
memberDetails(optional): boolean
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
-
offset(optional): integer(int32)
the offset into the result list when doing a query with limitDefault Value:
0
-
serviceType(optional): array
Collection Format:
multi
Returns the alerts whose service type is member of the passed in list.-
[0]:
string
Allowed Values:
[ "APM", "Monitoring", "Log Analytics", "Agent", "ITAnalytics", "Compliance", "Orchestration", "SecurityAnalytics" ]
-
[0]:
string
-
severity(optional): array
Collection Format:
multi
Returns the alerts whose severity is member of the passed in list.-
[0]:
string
Allowed Values:
[ "FATAL", "CRITICAL", "WARNING", "CLEAR" ]
-
[0]:
string
-
since(optional): string
Returns the alerts that were last created or updated during the time period specified via since and until parameters.
-
status(optional): string
the status of the alert to be looked upAllowed Values:
[ "open", "closed", "both" ]
-
until(optional): string
Returns the alerts that were last created or updated during the time period specified via since and until parameters.
Response
- application/json
200 Response
object
It is describing the list of alert summaries returned in response to an alert tickets request.
-
count:
integer(int32)
The number of items in the list
-
hasMore:
boolean
Default Value:
false
Indicates if there are more items -
items:
array items
The items
-
nextLink(optional):
string
The link to get the next chunk of items (if paging)
-
previousLink(optional):
string
The link to the previous chunk of items (if paging)
array
-
Array of:
object 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.
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.
-
alertId:
string
The id of the alertExample:
62965132339213727047162539738389170623
-
canonicalLink(optional):
string
The link to get this alert summaryExample:
/serviceapi/eventServices/alerts/62965132339213727047162539738389170623
-
clearLink(optional):
string
The link to clear this alert. It is populated when isAutoClose property is false for the alertExample:
/serviceapi/eventServices/alerts/62965132339213727047162539738389170623
-
creationTime:
string
The creation time (in UTC) of this alertExample:
2020-09-02T19:41:53.281Z
-
entityId(optional):
string
The id of the associated entityExample:
FCF117D21649E34D141B0A160F28C494
-
entityName(optional):
string
The display name of the associated entityExample:
myhost.mydomain.com
-
entityType(optional):
string
The entity type of the associated entityExample:
omc_host_linux
-
entityTypeDisplayName(optional):
string
The entity type display name of the associated entityExample:
Host (Linux)
-
eventName(optional):
string
The name of the event associated with this alertExample:
HOST_Memory:logicalMemoryUtilizationPercent
-
eventType:
string
The event type of the alertExample:
omc_metric_alert
-
eventTypeDisplayName(optional):
string
The display name of the event type for the alertExample:
Fixed Threshold
-
firstEventTime:
string
The time (in UTC) of the first event associated with this alertExample:
2020-09-02T19:41:47.000Z
-
hasTicket(optional):
boolean
True if the alert is associated with a ticketExample:
true
-
imported(optional):
boolean
False if the alert was detected by Oracle Management Cloud. True if was uploaded from an external system, such as Oracle Enterprise Manager.Example:
false
-
isAutoClose:
boolean
True if the system can detect and update clearing of the alertExample:
true
-
lastUpdatedTime:
string
The last time (in UTC) this alert was updatedExample:
2020-09-02T19:51:56.032Z
-
latestEventTime:
string
The time (in UTC) of the latest event associated with this alertExample:
2020-09-02T19:41:47.000Z
-
message:
string
The alert messageExample:
Logical Memory Utilization for myhost.mydomain.com is 92.78 %; it is greater than expected value of 80 % for 10 minutes
-
open(optional):
boolean
True if the alert's is still open. False if the alert's severity is CLEARExample:
/serviceapi/eventServices/alerts/62965132339213727047162539738389170623
-
severity:
string
Allowed Values:
[ "FATAL", "CRITICAL", "WARNING", "CLEAR" ]
The severity of the alertExample:CRITICAL
400 Response
object
When invalid alert API request is received, alert system returns this response.
-
errorCode:
string
The alert system's internal error code
-
errorMessage:
string
The alert system's internal error message
-
httpMessage:
string
The http error message
-
httpStatusCode:
string
Default Value:
400
The http status code
500 Response
object
When alert system runs into unhandled exception, it returns this response.
-
errorCode:
string
Default Value:
general_error
The alert system's error code for unhandled exception -
errorMessage:
string
Default Value:
Internal Server Error
The alert system's error message for unhandled exception -
httpMessage:
string
Default Value:
Internal Server Error
The http error message -
httpStatusCode:
string
Default Value:
500
The http status code
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