• Home
  • Dynatrace API
  • Environment
  • Log Monitoring v1
  • Hosts
  • GET analysis job status

Host logs API v1 - GET analysis job status

Gets the status of the specified log analysis job.

The request produces an application/json payload.

GETManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/v1/entity/infrastructure/hosts/{hostId}/logs/jobs/{jobId}
SaaShttps://{your-environment-id}.live.dynatrace.com/api/v1/entity/infrastructure/hosts/{hostId}/logs/jobs/{jobId}
Environment ActiveGatehttps://{your-activegate-domain}/e/{your-environment-id}/api/v1/entity/infrastructure/hosts/{hostId}/logs/jobs/{jobId}

Authentication

To execute this request, you need an access token with LogExport scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameters

ParameterTypeDescriptionInRequired
hostIdstring

The Dynatrace entity ID of the required host.

pathrequired
jobIdstring

The ID of the required log analysis job.

You can retrieve it from the response of the POST analysis job request.

pathrequired

Response

Response codes

CodeTypeDescription
200LogJobStatusResult

Success

400ErrorEnvelope

Failed. See the response body for details

Response body objects

The LogJobStatusResult object

The status the log analysis job.

ElementTypeDescription
logAnalysisStatusstring

The status of the log analysis job.

The element can hold these values
  • AGENT_PROCESSING
  • CANCELLED
  • CANCEL_PENDING
  • DOWNLOAD
  • FAILED
  • PROCESSING
  • READY
  • TRANSFERRING
  • WAITING
statusChangeTimestampinteger

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

logHandlingErrorstring

The cause of the job failure.

A successful job has the NONE value.

The element can hold these values
  • AGENT_VERSION_NOT_SUPPORTING_DOCKER
  • CANCELLED
  • FILE_ACCESS_DISABLED
  • FILE_NOT_FOUND
  • INCORRECT_DATE_FORMAT
  • INCORRECT_LOG_FILE
  • INTERNAL_PROCESSING_ERROR
  • INVALID_FILTER_QUERY
  • INVALID_SEARCH_QUERY
  • NONE
  • NO_LOG_AGENT
  • PROCESSOR_FILE_PROCESSING_ERROR
  • PROCESSOR_INTERNAL_ERROR
  • PROCESSOR_INVALID_PARAMETER_ERROR
  • PROCESSOR_NO_LOGS_FILE_FOUND_ERROR
  • PROCESSOR_STOPPING_INTERRUPTED
  • PROCESSOR_TIMED_OUT
  • PROCESSOR_UNHANDLED_EXCEPTION
  • PROCESSOR_UNZIPPING_ERROR
  • REPACK_FAILED_TO_SAVE_LOG_ANALYSIS_IN_STORAGE
  • REPACK_FAILED_TO_STORE_ALL_LOG_ANALYSIS
  • REPACK_FAILED_TO_STORE_LOG_ANALYSIS
  • SOME_LOG_INCORRECT_DATE_FORMAT
  • TIMEOUT
recordsTotalinteger

The number of analyzed log entries.

sortableFieldsstring[]

The map of the log entry sortable fields.

filterableFieldsstring[]

The map of the log entry filterable fields.

Response body JSON model

json
{ "logAnalysisStatus": "AGENT_PROCESSING", "statusChangeTimestamp": 1, "logHandlingError": "AGENT_VERSION_NOT_SUPPORTING_DOCKER", "recordsTotal": 1, "sortableFields": [ "string" ], "filterableFields": [ "string" ] }

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

bash
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 dt0c01.abc123.abcdefjhij1234567890'

Request URL

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

Response content

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

Response code

200

Related topics
  • Log Monitoring Classic

    Learn how to enable Log Monitoring, the insights that Log Monitoring can provide, and more.