Alert Ingestion
About Alert Ingestion
Alert ingestion requires that you create an alert profile and ingest one or more assets before you ingest alerts into Predix Essentials.
Ingest Alerts
You must first create at least one alert profile and ingest one or more assets before you ingest alerts into Predix Essentials.
Before You Begin
- Ingestion payload for alerts in JSON format.
- OAuth token to ingest alerts.Important: Make sure you have a valid unexpired token. Tokens are client-specific and usually expire within a set time.
- From the Setup section, obtain the following information:
- Client ID
- Alert ingestion URL
- Username
- Ingestion password that was created during initial tenant setup.
- Access to a REST client such as Postman or Advanced REST client.
About This Task
You can use the alerts REST service endpoint to perform bulk alert ingestion from your source system.
Procedure
Results
On successful acceptance, you receive a 202 Accepted in the JSON response. Note that the ingestion occurs asynchronously, which means that your request is queued for the server to process it. Check the ingestion progress through HTTP GET
to verify ingestion success. Save the uuid from the JSON response for tracking purposes.
Example
HTTP/1.1 202 Accepted
Content-Type: application/json
Content-Length: 158
{
"uuid" : "8C3D72213EC44D7697A8C465F858F59E",
"links" : [ {
"rel" : "status",
"href" : "/v1/jobs/8C3D72213EC44D7697A8C465F858F59E/status"
} ]
}
What To Do Next
Use a GET method to track the ingestion progress:
- In the REST client, select the GET method.
- In the Host value field, enter the following:
https://apm-event-ingestor-alerts-svc-preprod.run.asv-pr.ice.predix.io/v1/jobs/8C3D72213EC44D7697A8C465F858F59E/status
Note:This should be the Alerts ingestion URL obtained from the Setup page appended to/<UUID>/status
. For example, if the following is the response from your alert ingestion:
then the URL to make a GET call to track the ingestion progress would be: https://apm-event-ingestor-alerts-svc-preprod.preprod-app-api.aws-usw02-pr.predix.io/v1/jobs/%7BtaskUuid%7D/status{ "uuid" : "8C3D72213EC44D7697A8C465F858F59E", "links" : [ { "rel" : "status", "href" : "/v1/jobs/8C3D72213EC44D7697A8C465F858F59E/status" }] }
- Append the URL, with the uuid value that you obtained in the JSON response from the earlier
POST
method. It should look similar to the example above. - In the Header field, enter the Authorization token and tenant_uuid.
- Select Send.You should receive a sample response as shown below:
HTTP/1.1 200 OK Content-Type: application/json Content-Length: 155 { "id" : 5061, "uuid" : "8C3D72213EC44D7697A8C465F858F59E", "taskStatusList" : [ { "status" : "PENDING", "taskId" : "smartSignalTask" } ] }
Alert Ingestion HTTP Status Codes
Having the HTTP Status Codes available can help you understand ingestion issues that may arise.
The following are the possible HTTP status codes for alert ingestion. The codes help you find possible ingestion issues.
Status Code | Meaning |
---|---|
200 OK | The request completed successfully without errors. |
202 Accepted | A new resource has been created successfully. Check the Location header in the response to get information on the resource URI . |
204 No Content | An update to an existing resource has been applied successfully. |
400 Bad Request | The request was not formatted appropriately. Review the response body for additional information on the type of error that occurred. For example, the request may contain invalid query syntax or operators. |
401 Unauthorized | The request has failed authentication as the provided credentials are either invalid or were not provided. This could also happen when the token has expired. |
404 Not Found | The requested resource could not be found. It could mean that your request was not created on the server side. |