Log Monitoring API - Hosts

The Log Monitoring—Hosts API enables you to automate your log monitoring tasks for the operational systems logs.

This page provides the detailed description of each API call. For workflow suggestions, see Log Monitoring API.

GET logs

Lists all the available OS logs on the specified host.

The request produces application/json.

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

POST the analysis job

Starts the log analysis job.

Optionally, you can indicate a start and end time stamp or query to filter log content.

The request produces application/json.

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

GET the status of the analysis job

Gets the status of the specified log analysis job.

The request produces application/json.

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}

GET the content of the log

Gets the content of the specified log.

The log content can be retrieved using this call only when logAnalysisStatus equals READY in the job status call.

The request produces application/json.

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

DELETE the log analysis job

Deletes or cancels the specified log analysis job.

The request produces application/json.

DELETE
  • 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}