Link Command
Use link
command to group log records into high level business transactions. This command returns the link by fields along with the following details:
- Collection – The name of the collection where data is persisted
- Id – Group id that is unique within the collection
- Count – Number of log records within a group
- Start Time – Earliest timestamp of log records within a group
- End Time – Latest timestamp of log records within a group
- Group Duration – Time duration of log records within a group
Syntax
link [<link_options>] <fieldName> [, <fieldName>), ...]
where link_options
can be expanded as [includenulls = [true|false]] [includetrends = [true|false]] [span = <span>]
.
Parameters
The following table lists the parameters used in this command, along with their descriptions.
Parameter | Description |
---|---|
|
Indicates if the results should include log records where the link by fields are null. The default value is |
|
Indicates if the results should include trend data. The default value is |
|
Sets the length of time to be used for the result histogram. Syntax:
|
For examples of using this command in typical scenarios, see:
- Rename the Fields by Editing the Query in Using Oracle Log Analytics
- Use Dictionary Lookup in Link in Using Oracle Log Analytics
- Generate Link Alerts in Using Oracle Log Analytics
- Histogram Chart Options in Using Oracle Log Analytics
- Link by Cluster in Using Oracle Log Analytics
- Link by Using SQL Statement as the Field of Analysis in Using Oracle Log Analytics
- Analyze the Time Taken Between Steps in a Transaction in Using Oracle Log Analytics
- Use Link Navigation Functions to Identify Events in a Database in Using Oracle Log Analytics
The following command groups all the fatal logs by transaction:
severity = fatal | link 'Transaction ID'
The following command groups all the fatal logs by transaction, and gets the average elapsed time of log records within each group:
severity = fatal | link 'Transaction ID' | stats avg('Elapsed Time (System)') as 'Average Elapsed Time'