Related Log Templates
Often, troubleshooting real-time application issues involves comparing logs from different sources. However, opening multiple tabs for each log type and tracing the exact line of an issue requires a lot of manual work. This is where the related log templates feature comes handy, where you can compare multiple fields in one log type with another by creating a template. You can simply define the template with a name by providing the necessary fields to be included. This allows you to follow that particular field in another log type.
Use case
Let's consider you're debugging using access logs and application logs separately. First, you check the access logs, and for a particular entry in it, you want to view the related application logs. Here, you can use the Related Log Templates by matching the common fields (e.g. ThreadId) between the two log types by providing the time frame. This will take you to a new tab wherein the application logs are searched through with the given condition.
Adding Related Log Templates
You can create Related Log Templates directly from the AppLogs Search page where you query and search logs.
Follow the steps below:
- Log in to your Site24x7 web console, and go to the AppLogs tab.
- Type your search query, choose the time period, and wait for the results to populate.
- Once you view the results, click the icon on the row containing the field you wish to follow in the other log type.
- Click Add Related Log Template.
- Enter the following in the screen that pops up:
- Source Log Type: Denotes the log type whose field is to be followed. This will be chosen automatically based on the query you have entered.
- Name: Provide a display name to identify the template.
- Query template: Enter a query that contains the destination log type and the field that needs to be followed by using this format:
log type="Destination LogType and Destination LogType Field=${Source LogType Field}e.g. logtype="Windows Event Log" and computername CONTAINS ${machineip} - Starting Before: Choose how much time should be included for follow up before the time in the chosen row of the query result.
- Ending After: Choose how much time should be included for follow up after the time in the chosen row of the query result.
- Click Save. This will save the template with the provided name.
The next time you want to use this template, you can simply click , and the template name will be listed under Related Log Templates.