Host Log Monitoring API - GET analysis job status

Gets the status of the specified log analysis job.

The request produces an application/json payload.

GET
  • Managed https://{your-domain}/e/{your-environment-id}/api/v1/entity/infrastructure/hosts/{hostId}/logs/jobs/{jobId}
  • SaaS https://{your-environment-id}.live.dynatrace.com/api/v1/entity/infrastructure/hosts/{hostId}/logs/jobs/{jobId}

Parameters

Parameter Type Description In Required
hostId string

The entity ID of the required host.

path required
jobId string

The ID of the required log analysis job.

You can retrieve it from the response of the POST /entity/infrastructure/hosts/{hostId}/logs/{logPath} request.

path required

Response format

The LogJobStatusResult object

The status the log analysis job.

Element Type Description
logAnalysisStatus string

The status of the log analysis job.

  • READY: the job has successfully finished.
  • FAILED: The job has failed. See the value of the logHandlingError for the failure cause.
statusChangeTimestamp integer

The timestamp of the last status change, in UTC milliseconds.

logHandlingError string

The cause of the job failure.

A successful job has the NONE value.

recordsTotal integer

The number of analyzed log entries.

sortableFields string[]

The map of the log entry sortable fields.

filterableFields string[]

The map of the log entry filterable fields.

Example

In this example the request inquires the status of the log analysis job with the ID 32502e45-ed3d-47b9-b150-23e787ee285e.

The API token is passed in the Authorization header.

The response shows that the job has completed successfully—the logAnalysisStatus has the READY value—and it has analyzed 36 log entries.

Curl

curl -X GET \
  https://mySampleEnv.live.dynatrace.com/api/v1/entity/infrastructure/hosts/HOST-FE05D86A03025CAA/logs/jobs/32502e45-ed3d-47b9-b150-23e787ee285e \
  -H 'Authorization: Api-Token abcdefjhij1234567890'

Request URL

https://mySampleEnv.live.dynatrace.com/api/v1/entity/infrastructure/hosts/HOST-FE05D86A03025CAA/logs/jobs/32502e45-ed3d-47b9-b150-23e787ee285e

Response content

{
  "logAnalysisStatus": "READY",
  "statusChangeTimestamp": 1537960347033,
  "logHandlingError": "NONE",
  "recordsTotal": 36
}

Response code

200