Custom device Log Monitoring API - POST 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 an application/json
payload.
POST |
|
Authentication
To execute this request, you need the Read log content (LogExport
) permission assigned to your API token. To learn how to obtain and use it, see Tokens and authentication.
Parameters
All special characters in the log path must be escaped.
Parameter | Type | Description | In | Required |
---|---|---|---|---|
customDeviceId | string |
The Dynatrace entity ID of the required custom device. |
path | required |
logPath | string |
The full pathname of the log. |
path | required |
query | string |
Narrows down the scope of the analysis to the entries, matching the specified criteria. The criteria must use the Dynatrace search query language. |
query | optional |
startTimestamp | integer |
The start timestamp of the analysis range, in UTC milliseconds. If not set, then 2 hours behind from current timestamp is used. |
query | optional |
endTimestamp | integer |
The end timestamp of the analysis range, in UTC milliseconds. If not set, then the current timestamp is used. |
query | optional |
body | ExtractFields |
Extract fields from the log content to form custom columns. See the Search patterns in log data and parse results help page for the syntax definition and examples. The special characters must be escaped. |
body | optional |
Body format
The ExtractFields object
A query to extract log content to a custom column.
Element | Type | Description | Required |
---|---|---|---|
parsingMode | string |
The parsing mode for log analysis entries presentation. Possible values are: |
optional |
customParsingPatterns | string |
The query for content extraction. See the Search patterns in log data and parse results help page for the syntax definition and examples. |
optional |
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request. See the Example expandable section for working sample request.
{
"parsingMode": "json",
"customParsingPatterns": "\"user %{STRING:User} logged\", \"job took %{INTEGER:Time} ms\""
}
Response
Response codes
Code | Description |
---|---|
202 | Success. The response body contains the ID of the job. |
400 | Failed. See the response body for details. |
404 | Not found. See the response body for details. |
Response body
A successful request doesn't return any content.