Alert Management API
{ urn:com.soa.alert.admin } AlertService
The API used to report and manage alerts.
POST/alertsAdd Alert
Adds/reports an alert. An alert is defined by its type, a code, and a source. The alert's type is a numeric value, 0 is for a basic alert, 1 is for a service alert, and 3 is for an SLA alert. The alert code identifies a particular event or condition that has been detected. The source of the alert is the entity the alert is about. There are several types of alert sources which are identified with a numeric value.
- unknown
- service
- operation
- contract
- organization
- endpoint
- container
Each type of source may have a different type of identifier or key used in the source property. The sourceName property provides a functional area that can be used to group or categorize the alerts. An alert may also be tied to a transaction, or action performed in the system. The most common transaction to be associated with alerts is an operation invocation.
The following example illustrates adding a service alert:
Request:
POST /rest/alerts HTTP/1.1
Content-Type: application/json
{
"alertType" : "1",
"alertCode" : "1000000",
"description" : "Problem executing custom policy.",
"generatedAt" : "2015-05-01T16:21:18",
"source" : {
"sourceType" : "1",
"source" : "uddi:f996a248-f061-11e4-924f-f8246128b60a",
"sourceName" : "General"
}
"transaction" : {
"OperationInvocation" : {
"operationName" : "op1",
"operationKey" : "uddi:f996a248-f061-11e4-924f-f8246128b61b",
"serviceName" : "Service1",
"serviceKey"uddi:f996a248-f061-11e4-924f-f8246128b60a",
"contractName" : "Anonymous Access",
"contractKey" : "uddi:f996a248-f061-11e4-924f-f8246128b53c",
"organizationKey" : "uddi:f996a248-f061-11e4-924f-f8246127d45a
}
}
}
Response:
HTTP/1.1 200 OK
{
"id" : "1010",
"alertType" : "1",
"alertCode" : "1000000",
"alertCodeInfo" : {
"severity" : "2",
"description" : "Policy enforcement failure",
"componentName" : "Policy Handler Framework",
"subsystemName" : "General",
"sendEmailEnabled" : "true",
"snmpTrapEnabled" : "false"
}
"description" : "Problem executing custom policy.",
"generatedAt" : "2015-05-01T16:21:18"
"source" : {
"sourceType" : "1",
"source" : "uddi:f996a248-f061-11e4-924f-f8246128b60a",
"sourceName" : "General\
}
"transaction" : {
"OperationInvocation" : {
"operationName" : "op1",
"operationKey" : "uddi:f996a248-f061-11e4-924f-f8246128b61b",
"serviceName" : "Service1",
"serviceKey"uddi:f996a248-f061-11e4-924f-f8246128b60a",
"contractName" : "Anonymous Access",
"contractKey" : "uddi:f996a248-f061-11e4-924f-f8246128b53c",
"organizationKey" : "uddi:f996a248-f061-11e4-924f-f8246127d45a
}
}
"workflow" : {
"state" : "UNOBSERVED
"receivedAt" : "2015-05-01T16:21:18",
}
"alertDispatchStatus" : {
"dispatched" : "false"
}
}
Note the id property is not provided in the request but is provided in the response message. The id can then be used when performing workflow actions. Additional information about the alert derived from the alert code specified is added by the system. Of note the severity of the alert is dictated by the alert code. The severity is a numeric value and may be one of the following:
- CRITICAL
- MAJOR
- MINOR
- NORMAL
- CLEAR
The workflow is also auto-generated and provided in the response where it indicates the initial state and when the system received the record. And finally a dispatch status may be added if the alert code requires any sort of dispatch.
Parameters
AlerstDispatchStatus {
EmailStatus {
SnmpStatus {
CommandStatus {
alertWorkflow {
alertComment {
alertCodeInfo {
alertSlaInfo {
alertSource {
alertTransaction {
Reponse
AlerstDispatchStatus {
EmailStatus {
SnmpStatus {
CommandStatus {
alertWorkflow {
alertComment {
alertCodeInfo {
alertSlaInfo {
alertSource {
alertTransaction {
GET/alertsGet Alerts
Retrieves the alerts meeting the given criteria. The following usage example illustrates a query for all UNOBSERVED alerts reported against service with the key uddi:f996a248-f061-11e4-924f-f8246128b60a with a severity of MAJOR or CRITICAL that were generated between 2015-05-01T16:21:17 and now. It also illustrates paging by asking for records starting from position 50 and to only return 50 records.
Request:
GET /rest/alerts?state=UNOBSERVED&source=uddi:f996a248-f061-11e4-924f-f8246128b60a&severity=1&severity=2&from=2015-05-01T16:21:17&start=50&count=50 HTTP/1.1
Response:
HTTP/1.1 200 OK
{
"totalCount" : "50",
"records" : [
{
"id" : "1010",
"alertType" : "1",
"alertCode" : "1000000",
"alertCodeInfo" : {
"severity" : "2",
"description" : "Policy enforcement failure",
"componentName" : "Policy Handler Framework",
"subsystemName" : "General",
"sendEmailEnabled" : "true",
"snmpTrapEnabled" : "false"
}
"description" : "Problem executing custom policy.",
"generatedAt" : "2015-05-01T16:21:18"
"source" : {
"sourceType" : "1",
"source" : "uddi:f996a248-f061-11e4-924f-f8246128b60a",
"sourceName" : "General\
}
"transaction" : {
"OperationInvocation" : {
"operationName" : "op1",
"operationKey" : "uddi:f996a248-f061-11e4-924f-f8246128b61b",
"serviceName" : "Service1",
"serviceKey"uddi:f996a248-f061-11e4-924f-f8246128b60a",
"contractName" : "Anonymous Access",
"contractKey" : "uddi:f996a248-f061-11e4-924f-f8246128b53c",
"organizationKey" : "uddi:f996a248-f061-11e4-924f-f8246127d45a
}
}
"workflow" : {
"state" : "UNOBSERVED
"receivedAt" : "2015-05-01T16:21:18",
}
"alertDispatchStatus" : {
"dispatched" : "false"
}
},
... not shown for brevity ...
],
"listIncomplete" : "true"
}
The listIncomplete field in the response indicates there are more records beyond the 50 that match the given criteria.
Parameters
Reponse
alert {
AlerstDispatchStatus {
EmailStatus {
SnmpStatus {
CommandStatus {
alertWorkflow {
alertComment {
alertCodeInfo {
alertSlaInfo {
alertSource {
alertTransaction {