11.1. Profile Manager

The Retrospective Profile Manager — the Profiles view — lets you configure data profiles and columns. Open it in one of these ways:

  • Select View ‣ Open Profile Manager.

  • Click i-profile-manager Open Profile Manager in the toolbar.

  • Press Ctrl+P (Cmd+P on macOS).

Profiles are user-defined persistent sets of data sources: log file, container and Windows event log definitions. These data sources come from the local file system, from one or many remote servers, from Docker or Kubernetes subsystems and from the Windows Event Log subsystem. A search or monitoring action performed on a specific profile processes (analyzes the content of) all contained files, containers and event logs. It presents the data in the result table using the columns you specified.

You can also work with data sources that are created on the fly (ad hoc) and not bundled in a profile. Sooner or later, however, you repeat a search on the same set of data sources as in the past. That is when a predefined profile is the better choice.

The Profile Manager view — profiles, summary, sources and columns

Fig. 11.1 The Profile Manager view — the numbered areas are described below.

The Profiles view is divided into four areas:

  1. Profiles — the list of the user-created profiles. Next to each name, a count shows the enabled and the total number of its data sources.

  2. Profile Summary — four read-only groups that collect data sources from all profiles: All sources, All local sources, All remote sources and All sources with date. While one of them is selected, the columns area is hidden and the sources table gains a column that names each source’s profile.

  3. Sources — the data sources of the selected profile; the table title names the profile. Here you add or remove data sources and configure each one: its encoding, log entry separation and date/time format. The Log Entry Separation column shows each source’s delimiter followed by where it applies, either (at start) or (at end). Type in Find source to filter the table.

  4. Columns — the columns that show the search and monitoring data in the result table; the title names the profile as well.

11.1.1. Create a New Profile

The toolbar buttons above the profiles list and above the sources table show icons only. Hover over a button to see the tooltip named below.

  1. Click i-profile-manager Open Profile Manager to open the Profiles tab.

  2. Click i-profile-add Add profile above the profiles list. The new profile is named Profile 01, or the next free number.

  3. Change the profile’s name if desired.

  4. Above the sources table, click i-source-add-file Add file(s) to add log files. Click i-source-add-container Add container(s) for containers, or i-source-add-eventlog Add Event Log(s) for Windows event logs. The Add Data Source(s) dialog opens; its heading names the profile the sources are added to.

  5. Select local drive to add files stored on the local file system, or choose a remote SSH host. To define a new remote host, click i-file-browser-add-host Add host.

  6. Provide connection details to the remote machine and click the OK button to establish a connection with the remote host.

  7. Browse the file system to find the folder containing the desired log files.

    Note

    You can also manually edit the directory path appearing in the text box. When editing the text box, the wildcard characters ? and * can be used on any path element. To understand how wildcards in the directory path are evaluated to directories, see Deep Wildcards. When editing the text box, the ~ character can also be used to refer to the user home directory.

  8. Select the desired log files or containers and click the OK button.

    Selection mode

    Description

    i-sel-mode-item Select items individually

    This mode lets you select individual log files from the current directory. You can reduce the number of listed files by entering a filter expression. A file is listed only if its name matches the filter. The filter can contain the wildcards ? and *, for example *.log.

    The arrow next to i-subdir-excluded Use the files of the sub-directories instead of this directory lists the files one, two or three folder levels below the directory instead. The Sub-directory filter then holds one filter per level, separated like the directory path (\ or /), each with the wildcards ? and * (Files in Sub-directories). Opening another directory or host, or i-refresh Reload above the directories, switches the levels off again; i-refresh Reload above the files keeps them. When the directory path contains a wildcard, the file list stays empty and file selection is disabled until you open one of the matching folders.

    i-sel-mode-group Select items using filter

    All files in the directory whose names match the entered filter become the data source.

    With a sub-directory level chosen, the files of that level are used instead, limited by the Sub-directory filter. The line under the toolbar shows the data source path that OK saves (Directory, Sub-directory Filter and File Filter).

    The mode the dialog opens in is set by Initial file selection mode (dialog) on the File System preferences page.

  9. To change the log file encoding or define the log entry separation, click i-source-configure Configure selected source. You can also double-click the source, or right-click it and choose Configure source.

To remove sources, select them and click i-source-delete Delete selected source(s).

Note

Files on the local file system can be dragged from the system file manager into the Profiles tab:

  • Dropped on the sources table, they are added to the selected profile.

  • Dropped on a profile row, they are added to that profile.

  • Dropped on the empty space of the profiles list, they form a new profile.

Data sources can also be dragged from the sources table onto a profile row.

The numbered controls in the Add Data Source(s) dialog are:

The Add Data Source(s) dialog, with its controls numbered

Fig. 11.2 The Add Data Source(s) dialog.

  1. List of local drives and predefined remote SSH servers.

  2. The currently selected directory; lets you switch to a superior directory of any level. Below it, the drive selector holds the drive or network share and the path field the folder below it, as in the File Browser (File Browser). If you enter a path that points to a file, Retrospective opens the directory that contains it.

  3. Select an entry from the list of previously selected locations.

  4. Go to the user’s home directory.

  5. Refresh the directory list.

  6. Selection mode — Select items individually (select individual log files) or Select items using filter (select all files matching the entered filter pattern).

  7. i-subdir-excluded Use the files of the sub-directories instead of this directory: the arrow chooses the sub-directory level.

  8. The filter expression limits the choice to files with matching names.

  9. Select an entry from the list of previously defined filters.

  10. Refresh the file list.

  11. Autofind configuration — a checkbox, selected by default. After OK, Autofind analyzes the added sources to determine their encoding, log entry separation (delimiter) and date/time format.

11.1.2. Profile Context Menu

Right-click a profile in the list and choose a function from the context menu.

Menu item

Description

i-profile-rename Rename

Available for a single profile. Switches the entry to edit mode, so you can change the name directly in the list. Press Enter or select another profile to finish. Double-clicking a profile does the same. A blank name, or a name another profile already has in any letter case, is rejected.

Note

Renaming a profile used in a bookmarked search definition makes that bookmark unusable.

i-profile-clone Clone selected profile(s)

Copies each selected profile and adds the copy to the list. Profile names must be unique, so the copy is named <name> (2), or the next free number. Rename it if you like, and change its data sources so that it differs from the original.

i-profile-delete Delete selected profile(s)

Asks Confirm Deletion and then removes the selected profiles; Delete does the same. A profile that is selected in a search tab or used by a result snapshot cannot be deleted, and a message says so.

The toolbar above the list offers i-profile-add Add profile, i-profile-clone Clone selected profile(s) and i-profile-delete Delete selected profile(s).

11.1.3. Define Data Sources

A profile consists of one or many data sources. An individual data source can point to a local or remote (connected through SSH) computer, a container subsystem (Docker/Kubernetes) or the Windows Event Log subsystem. It does so through a path definition, which represents either a single data source (file, container or event log) or a group of data sources such as Program*.log.

The relevant selection options are described under Create a New Profile. Select items individually points to one or several individual data sources. Select items using filter includes all data sources from a directory or its sub-directories, or a subset of them that match the entered filter.

Retrospective is most commonly used for analyzing log files, and log files need three aspects to be considered. First, each log file can have a specific encoding, for example UTF-8 or latin1, which has to be known to read the contents correctly. Second, log files typically contain specific strings or single control characters (that is, line breaks) that let Retrospective separate one log entry from the next and display search results accordingly. Third, log entries very often contain date information, which Retrospective can then interpret and filter.

All three aspects have to be covered when you define a data source. You can either let Retrospective discover the relevant information automatically, using the procedure presented in the first subsection, or provide the information manually as discussed in the second subsection.

Although Retrospective is mostly used for processing textual log files, it can also handle binary files. However, the Autofind procedure is not suited for binary content, and Retrospective always tries to finally represent the content as characters (in accordance with the configured encoding). Processing binary files is therefore discouraged, with the exception of very simple file lookups.

Retrospective also offers support for compressed files. When a compressed file is specified in the data source configuration, it is uncompressed on the fly during processing and handled accordingly. For now Retrospective supports the following compressed files: *.zip, *.gz, *.bz2, *.tar, *.tar.gz, *.tgz, *.tar.bz2, *.tbz2. To support compressed files on remote hosts, appropriate tools have to be available on these hosts (for details see Host Compatibility Information).

Note

Files written by another program, for example by the syslog server WinSyslog on Windows, are ordinary file data sources. Point the data source at that folder; use Select items using filter when the program starts a new file each day (see Log Files from a Syslog Server).

11.1.3.1. Autofind

Retrospective performs Autofind on one or several log files or container log streams to determine their encoding, log entry separation (delimiter) and date/time format. Subsequent search and monitoring processes need this information to identify individual log entries and represent them correctly in the result table. Autofind also tries to detect and collect name/value pattern fields that you can use for defining profile-specific custom columns.

Note

When files, containers or event logs are added to a profile through the Add Data Source(s) dialog, Retrospective runs Autofind unless Autofind configuration is cleared. A dropped log file is always analyzed.

While Autofind runs, a progress bar appears above the sources table, and the profile’s name in the list is marked with *. Click i-cancel-operation Cancel Autofind beside the bar to stop it.

Why is Autofind needed?

This step relieves you of having to configure each data source manually. A data source can be an individual log file or container, specified by Select items individually. It can also be a filter such as *.log, specified by Select items using filter. A filter is a text pattern that matches the names of one or several files or containers within one or multiple directories (see Deep Wildcards).

Why can Autofind not be performed directly during search or monitoring?

The Autofind procedure is time-consuming, and you may want to change the discovered values before you start searching or monitoring. Performing Autofind during search or monitoring would therefore, in most cases, be inconvenient.

What data source related information is detected during Autofind?

Autofind needs to detect the following information:

  • File encoding.

  • Log entry separation (delimiter), which includes:

    • the regex pattern of the delimiter;

    • its location in the log entry (either the entry’s start or end).

  • Date/Time format, which includes:

  • Fields: fields matching predefined name/value patterns are detected and remembered, so that they can be proposed for custom column definition.

Note

Retrospective detects the file encoding by analyzing the initial file bytes and matching them to the most probable encoding. When the initial file bytes contain only ASCII characters, then the UTF-8 encoding is assumed. There is one exception. When Autofind is performed in such a situation on a remote SSH host on which ISO-8859-1 was detected as the default encoding (see Host Compatibility Information), Autofind assumes ISO-8859-1 encoding for such a file.

Japanese text detected as Shift_JIS is read as windows-31j, the Japanese Windows code page, so characters such as ① and ~ display correctly.

Note

Some inputs are genuinely ambiguous — short samples, or single-byte text without distinctive characters — and the most probable encoding is only a best guess. When the detection is uncertain, Autofind does not apply it silently. In the Configure source dialog it keeps the best guess in the encoding selector and shows an amber advisory that names the plausible alternatives, so you can confirm or change it. In the sources table the Encoding cell carries a warning icon with the same advice. When Autofind runs in the Profile Manager or during search or monitoring, the uncertainty is also reported as an Autofind Issue warning in the Status view. Mainframe EBCDIC logs (code pages such as IBM037 / IBM500) are detected this way. You can also choose them from the encoding selector.

Note

Detecting the date locale is not easy. When Autofind is invoked for a local data source, the default Java locale of the machine on which Retrospective is launched is checked first. For a remote data source, the default locale of the remote server is checked first. That locale is specified by the LC_ALL, LANG, LC_CTYPE or LC_MESSAGES environment variables.

What can go wrong with Autofind in general?

  • Connection issues can occur when Retrospective accesses the remote server. In such cases, an explicit message about the problem is displayed. You have to solve the problem and perform the Autofind procedure again.

  • Whenever a configuration problem occurs during Autofind, you are notified and instructed to consult the data source configuration shown in the Profile Manager for additional information. Connection issues do not count as configuration problems. Hover over any warning or error icon to get the information. A file may not be accessible because of some permission problem, or may not be available at all because it has been removed. Another example is that the detected delimiter regex pattern is too long. Additional information about other possible warnings and errors is provided below.

  • Even though many precautions are taken at the implementation level, Autofind could make a wrong assumption. You then have to correct the proposed values manually.

  • Several issues have to be taken into account when a data source is specified with Select items using filter (covered next).

What can go wrong when Autofind is performed on a filter selection?

When a data source is specified with Select items using filter, then most of the time it refers not to a single file but to a set of files. In such situations, separate files could have different encodings, log entry separations or date/time formats.

In this case the data source can refer to a high number of files, and Autofind cannot be performed on all of them because it would take too much time. The maximum number of files analyzed during Autofind is controlled by the Maximum number of sources to be analyzed option on the Autofind preferences page. If only a subset of available files is to be analyzed, the program attempts to parse different file types, each having largely distinct names. This increases the chance of discovering differences in encodings, log entry separations and date/time formats.

Note

In Select items individually mode, each file or container is selected individually. When Autofind is then performed for the whole profile, the combined number of files or containers analyzed is not limited. The Maximum number of sources to be analyzed preference limits the number of analyzed files or containers for a single data source (Select items using filter). It does not limit that number for the whole profile.

Windows event logs and providers selected individually are an exception. Per host and type, at most this many of them are analyzed, and the others take over the result of an analyzed one. Their fields for custom columns are detected later, when you open the field selection dialog or run a search.

Autofind may sense differences in one of the detected pieces of information: encoding, log entry separation or date/time format. It then retains the value present in the highest number of analyzed files as the result. Depending on the type of information, the following applies:

  • Encoding: the data source is marked with a warning icon whose tooltip lists files where the encoding differed from the retained one. The same icon marks an uncertain detection.

  • Log entry separation: the data source is marked with an error icon whose tooltip lists files where the log entry separation differed from the retained one. The same icon marks a delimiter that is too long.

  • Date/Time format: the data source is marked with a warning icon whose tooltip lists files where the date/time format differed from the retained one.

  • Source: a warning icon marks problems Autofind had with individual paths, for example a file it could not read.

  • Host: a clock badge marks a container source whose runtime adds a timestamp to each log entry.

Each tooltip starts with two links. Autofind explains the procedure, and Analyzed data sources lists the files Autofind analyzed. When a data source is marked with a warning or an error, change its configuration, for example by refining the filter. It should then include only files with an identical encoding, log entry separation and date/time format. A difference in log entry separation is especially critical. Retrospective may then fail to split the log entries of certain files during a search, and could use up all its available memory.

Note

For Select items using filter, encoding detection tries to find the encoding that is compatible with all data source files or containers. Therefore the following situation can occur. Suppose you have 5 files. When you invoke Autofind in Select items individually separately for each of them, you get encoding X (for example UTF-8) for the first 3 files and Y (for example ISO-8859-1) for the last two. However, when you invoke Autofind in Select items using filter for all 5 files, you see that Y is chosen for all five without any warnings (see above). This is possible because encoding detection does not consider only a single matching encoding, but rather a list of encodings that can potentially be used for reading a given file. Encoding Y may therefore be usable for reading all five files, even though its matching probability is lower than that of encoding X for the first 3 files. Autofind in Select items using filter tries to compromise to achieve the best possible encoding configuration for the given set of files or containers.

When is manual configuration/correction required?

Manual configuration is required when you do not want to rely on Autofind, and in the cases described in the previous points:

  • When Autofind makes a mistake during detection.

  • When dates in the log entries contain not only milliseconds but also microseconds or even nanoseconds. In such cases only the milliseconds are included in the date format, while the micro/nanoseconds are considered part of the entry content. For example, for the log entry:

    04.05.2022 04:15:29,739345678 ERROR User authentication failure
    

    Autofind detects the date/time format dd.MM.yyyy HH:mm:ss,SSS — no micro or nanoseconds. The problem is that, when you search or monitor this file, the entry content appearing in the Data column of the result table is:

    345678 ERROR User authentication failure
    

    Retrospective lets you configure the date/time format manually so that micro/nanoseconds do not appear in the Data column. Use the special i token to mark each character that should be ignored. In the example you could set dd.MM.yyyy HH:mm:ss,SSSiiiiii. Retrospective supports only millisecond precision, so micro/nanoseconds are also NOT displayed in the Date column. That column contains the date/time formatted according to the Date/Time Format configuration on the Result Options preferences page. This preference does not support the i token, which can appear only in the data source definition. To look up micro/nanoseconds present in a given log entry, click the entry and examine the detail pane, which contains the original date string in an unchanged format.

  • In the case of Select items using filter, throughout the analyzed file set there are differences in encoding, log entry separation or date/time format. Retrospective indicates such configuration mismatches by displaying warning and error icons for individual fields inside the data source table. Hover the mouse pointer over such an icon to get a detailed description of the problem and correct it.

Data sources marked with warning and error icons

Fig. 11.3 Data sources marked with warning and error icons after Autofind.

i-source-warning

Avoid running a search or monitoring session based on data sources marked with such a warning. It generally leads to unexpected results.

i-source-error

As long as a data source definition is marked as erroneous, do not use it for searching or monitoring log data. As explained in a previous section, Retrospective may for example not be able to split individual log entries from certain files and could use up all its available memory.

11.1.3.2. Manual Encoding and Pattern Definition

The file encoding, log entry separation (through pattern recognition) and date/time format can be configured by hand for each data source: a single log file, a directory or a filter pattern. Do so when you do not want Autofind, or when it did not produce the expected result.

  1. Select the profile in the Profiles tab or in the Configure Data Source(s) dialog.

  2. Select the data source and click i-source-configure Configure selected source. The Configure source wizard opens; it has three steps.

  3. Define the log entry separation. Under New log entry:, select starts with to give a regular expression that marks the start of each log entry, for example a date. Select ends with for a regular expression that marks the end of each entry, for example a newline. The encoding is chosen on this step as well.

  4. Click Next to proceed to the date/time recognition.

  5. Select the locale, and provide the date format and regular expression.

  6. Click Next to define the fields of the data source, or Back to return to a previous step.

  7. Click Finish. It is available on the last step, and on any step when Ignore errors and let me proceed at any time is selected. A step with an obvious mismatch disables Next and Finish until it is fixed.

Note

The Configure source wizard shows a preview of the start of each data source file. Analyze the preview and set the configuration by hand. For a data source with many files, the preview covers no more files than the Maximum number of sources to be analyzed preference allows. That is exactly the file set Autofind analyzes for the data source. The Autofind buttons in the wizard therefore yield the same result as Autofind from the data source context menu. Some differences are possible for Select items using filter.

Note

For Select items using filter data sources, the Autofind buttons in the wizard can yield different results than Autofind from the data source context menu. The log entry separation and the date/time format are affected. This happens in particular when one file has a different log entry separation or date/time format than the others. The Autofind button then sets the log entry separation to the default (ending with a newline) and leaves the date/time format empty. Autofind from the context menu reports all such mismatches as error or warning icons instead. See What can go wrong when Autofind is performed on a filter selection? above.

11.1.3.3. Disabling Data Sources

To disable an individual data source belonging to a profile, deselect the checkbox that appears in front of its table row. Disabled data sources are shown with gray text color.

Disabled data sources shown in gray

Fig. 11.4 Disabled data sources are shown in gray.

Disabled data sources are ignored during the log data search and monitoring process. If you want them to be included in processing, reselect the appropriate checkboxes.

11.1.3.4. Data Source Context Menu

Right-click one or several data sources to open the context menu. You can, for example, clone data source configurations to other hosts. That builds a profile with identical data sources on many remote computers. The ⋮ More actions button at the start of a row opens the same menu.

Menu item

Description

i-autofind Autofind configuration

Starts the Autofind process for the selected data sources (see Autofind).

i-clear-config Clear configuration

If you decide that you have to reconfigure the log file settings, you can clear the existing configuration.

i-config-copy Copy configuration / i-config-paste Paste configuration

Applies the settings of one source file to other source files:

  1. Right-click the data source whose configuration is already defined and choose Copy configuration. Exactly one source must be selected.

  2. Right-click the data sources that should get the same configuration and choose Paste configuration.

The keyboard shortcuts are Ctrl+Shift+C and Ctrl+Shift+V (Cmd on macOS).

i-assign-to-host Assign to

A submenu of hosts, folders, Kubernetes contexts or Windows hosts, to which the selected data sources are moved. It is available for SSH, Kubernetes and event-log sources of one kind, never for local files or Docker containers. More than two hosts must be defined.

i-clone-to-host Clone to

The same submenu, but it copies the selected data sources to the chosen host and keeps the originals.

i-source-configure Configure source

Opens a dialog where you can manually configure the selected data sources within a wizard-style dialog (see Configure Sources).

i-source-path Change source path

Available for a single source. Opens a dialog that asks Enter the new source path. With Autofind configuration selected (the default), Retrospective re-runs Autofind on the new path after you confirm with OK, to determine its encoding, log entry separation and date/time format. Clear it to keep the source’s current configuration.

i-source-delete Delete source(s)

Deletes the selected entries from the data source table. When a custom column field is assigned to them, you are asked to confirm first.

i-source-copy Copy source

Copies the selected entries to the clipboard (Ctrl+C). Paste them into another profile, or into the same profile to adapt them.

i-source-paste Paste source

Pastes the data sources from the clipboard into the table (Ctrl+V).

11.1.3.5. Deep Wildcards

Retrospective supports data source paths and directory paths with so-called deep wildcards. A data source path contains deep wildcards if the wildcard characters (* and ?) appear at the level of a directory. For example, /path/*/*.log contains deep wildcards, whereas /path/directory/*.log does not. The following examples assume this directory structure:

/path/
  dir1/
    dir1file1.log
    dir1file2.out
  dir2/
    dir2file1.log
    dir2file2.out
  dirOther/
    dirDeep/
      fileDeep
      fileDeep2
    fileOther.out
  file1
  file2

Data source paths are evaluated to files as follows:

  • /path/*/*.log → dir1file1.log, dir2file1.log

  • /path/*/* → dir1file1.log, dir1file2.out, dir2file1.log, dir2file2.out, fileOther.out

  • /path/dir?/*.out → dir1file2.out, dir2file2.out

  • /path/*/*/* → fileDeep, fileDeep2

  • /path/*/*/fileDeep → fileDeep

  • /path/* → file1, file2 (not a deep wildcard)

Deep wildcards in data source paths can span up to three directory levels. Only the last part of the path matches file names; the parts before it match directories. Such paths can be specified in the Add Data Source(s) dialog or the File Browser: use Select items using filter, choose a level with the arrow next to i-subdir-excluded Use the files of the sub-directories instead of this directory, and enter one filter per level in the Sub-directory filter (see Files in Sub-directories).

Directory paths are evaluated to directories as follows:

  • /path/*/ → dir1, dir2, dirOther

  • /path/*/*/ → dirDeep

  • /path/dir?/ → dir1, dir2

  • /path/dir?/*/ → (no directory matches)

  • /*/*/*/ → dirDeep

There is no limitation for deep wildcards in directory paths. They can be specified in the Add Data Source(s) dialog or the File Browser. Edit the path in the 2. Select directory panel (see Create a New Profile).

Note

When using wildcards in the directory selection text box, the data source selection becomes disabled. Once you select a directory from the result list or remove the wildcard, the data source selection is enabled again.

11.1.4. Configure Sources

The Configure source wizard opens when you click i-source-configure Configure selected source above the sources table. Double-clicking a source, or choosing Configure source from the sources context menu, opens it as well. On its three steps you adjust the configuration that Autofind detected for the selected data sources. Retrospective assists you as follows:

  1. It loads sample data from the selected data sources. On Step 1 the slider to the right of the sample sets how much sample data is loaded.

  2. It shows a preview that instantly reflects the definitions you make on the step. On Steps 2 and 3 the preview switches between Table and Text.

The buttons Back, Next, Finish and Cancel move through the wizard. While a step has an error, a banner shows it and Next and Finish stay disabled. Select Ignore errors and let me proceed at any time to move on or finish regardless.

Note

For standard cases, Autofind detects all settings needed to process your log data correctly, so you most often do not need to manually adjust the configuration described in this section.

11.1.4.1. Log Entry Separation (Step 1 of 3)

On this step you define the encoding of the data source and the pattern used for splitting individual log entries. For a container, the toggle button i-add-log-timestamps at the top of the step decides whether Docker or Kubernetes adds a timestamp to each log entry it delivers. Changing a container option reloads the sample and asks Perform Autofind?

Encoding — determines how the content of the data source is encoded. If the loaded sample data or the preview contains strange signs, you probably need to choose a different encoding. Event Logs are always read as UTF-8: the encoding does not apply to them, and the step does not show it when you configure only Event Logs.

Terminal output — this checkbox only appears if the data source is a container (Docker or Kubernetes). It lets you define whether the associated log data is issued by terminal output. Such data contains special characters that control cursor location, color and other terminal options. Select this checkbox to filter out these special characters and produce human-readable text. The detection and removal of special characters may affect performance.

New log entry — tells Retrospective whether the split pattern appears at the start or the end of log entries. The ↩ button beside it splits the entries at a newline at their end.

The split pattern determines how individual log entries are separated. It has the format of a regular expression (regex) and can be defined in different ways:

  1. By manually entering a regex.

  2. By marking (dragging the cursor along) a chunk of text in the sample data and letting Retrospective generate the regex from it.

  3. By clicking Autofind and letting Retrospective propose a regex assumed to be suitable.

Examples:

  • If your log entries end with a new line, select ends with and enter \n.

  • If your log entries start with a date, select starts with and enter a date pattern such as 20\d{2}-\d{2}-\d{2}.

Note

A split pattern that cannot be applied to the sample within half a second is reported as invalid. During a search, a split pattern that takes too long on the log stops the search with an error.

Configure source wizard — Log Entry Separation (Step 1 of 3)

Fig. 11.5 Configure source wizard — Log Entry Separation (Step 1 of 3).

11.1.4.2. Date/Time Recognition (Step 2 of 3)

Locale — this drop-down defines the expected format and language of the log entry timestamps (important for month names, for example).

Date/Time format — the format of the date/time section (timestamp) expected in the log entries. It is normally recognized during Autofind, but sometimes needs adjusting. This can be done in different ways:

  • By manually entering the format. The format must comply with the Java specification found at https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/text/SimpleDateFormat.html.

  • By marking (dragging the cursor along) the date/time section in the sample data and letting Retrospective generate its format. Be careful to select the log entry timestamp, not any date/time otherwise contained in the payload of the log entry.

  • By clicking Autofind and letting Retrospective propose a format assumed to be suitable.

The Regular Expression is generated from the date/time format and cannot be edited.

Time zone fallback — this checkbox only appears if the data source is a container (Docker or Kubernetes). It determines whether the container time zone is used as a fallback for converting log entry timestamps that do not contain a time zone themselves. This option has no effect when the container has the same time zone as the local computer. Do not enable it if on Step 1 you let Docker or Kubernetes add timestamps to the log entries; a warning icon says so when both are on.

Configure source wizard — Date/Time Recognition (Step 2 of 3)

Fig. 11.6 Configure source wizard — Date/Time Recognition (Step 2 of 3).

11.1.4.3. Field Extraction (Step 3 of 3)

This step lets you define custom columns filled with field values or other text sections extracted from your log data.

Retrospective highlights text in the sample data that matches predefined name/value pattern fields. The add-field buttons propose such fields in a dialog. Changes are reflected in the preview at once. Otherwise, this step offers the same functions as the columns section of the Profile Manager (see Define Columns). A link above the fields switches between Show all fields and Show fields of this source only.

Configure source wizard — Field Extraction (Step 3 of 3)

Fig. 11.7 Configure source wizard — Field Extraction (Step 3 of 3).

11.1.5. Delete Profile and Data Sources

  1. Click i-profile-manager Open Profile Manager to open the Profiles tab.

  2. To delete a data source, first select the profile that contains it. Then select the data source in the sources table and click i-source-delete Delete selected source(s), or press Delete. When a custom column field is assigned to the source, you are asked to confirm.

    Note

    A data source can be deleted only from the profile that contains it, not from a group such as All sources.

  3. To delete a data profile, select it and click i-profile-delete Delete selected profile(s). Alternatively, right-click the profile and choose Delete selected profile(s).

11.1.6. Define Columns

By default, log data found during search and monitoring is displayed in the result table within a predefined set of columns (Date/Time, Level, Data, Host and Path). We call them standard columns. Their visibility and position can be changed per profile in the columns table, whose title names the profile. Standard columns cannot be added, deleted or otherwise changed.

Custom columns, on the other hand, are entirely managed by you. You can add, move, change and delete them freely, to obtain the result table you need.

11.1.6.1. Columns Table

When you create a new profile, the columns table initially contains all standard columns. Their names appear in bold to distinguish them from custom columns. The checkbox in front of a column (header tooltip Visible) shows whether it is visible in the result table. The Data Type column shows the type of the column’s fields, or <No fields>.

  • A column without fields cannot be made visible.

  • The last visible column cannot be hidden or deleted.

  • A profile holds at most 50 columns.

  • Delete deletes the selected custom column.

Button

Description

i-split-field-columns Add split field columns

Adds a variable number of columns, each based on a split field. The Split Field dialog asks for the Separator and the Number of Values (1–99, default 2) to extract from the result entries. The new columns are named after the Column Name Prefix (default Split-Column). Fields can be split by the following types of separators:

  • Character

  • Space

  • Tab Character

  • String

  • Regex

Warning

Choose a column name prefix that does not contain any space if you plan to use the columns in RQL queries.

When Ignore Empty Fields is selected, consecutive separators are combined into a single separator. This helps when fields are separated by one or many spaces. Trim Values, selected by default, removes spaces and control characters from both ends of each value. Retrospective creates as many split columns as values. Each gets an initial split field; the field in the first column starts at split position 1. You can change the separator and the split position of each field later in the fields table.

The Split Field dialog

Fig. 11.8 The Split Field dialog.

i-add Add column

Adds a new custom column after the selected column and starts renaming it. The column stays hidden as long as no fields are assigned to it.

i-delete Delete selected column

Removes the selected custom column from the list. Standard columns cannot be deleted but their visibility can be changed.

i-move-up Move up

Moves the selected column up by one position.

i-move-down Move down

Moves the selected column down by one position.

Standard columns have a single non-editable field assigned each, and the assignment cannot be altered. Custom column field assignments are free of restrictions. However, a custom column is of no use unless it has at least one field assigned.

11.1.6.2. Fields Table

The fields table appears to the right of the columns table and shows the fields assigned to the selected column. A field specifies a well-delimited chunk of data and the way to extract it from log entries. Depending on the selection in the Source column, a field has a different scope: it is either extracted from result entries of a specific data source defined in the profile, or from result entries of all data sources defined in the profile (“All sources in profile”).

A field's Source scope — a specific data source or all sources

Fig. 11.9 A field’s Source scope.

  1. A field extracted from result entries of a specific data source defined in the profile.

  2. A field extracted from result entries of all data sources in the profile (“All sources in profile”).

The table has four columns. Field Name and Expression are edited by double-clicking their cell; Data Type and Source open their choice with a single click. A green Source cell means all sources, a yellow one a specific source. Fields of a standard column are read-only, and no cell can be edited while the profile is in use by a running search. Delete deletes the selected fields.

Column

Description

Field Name

The name of the field. You may choose it freely; it has no effect on the extraction.

Data Type

Text or Number. Values that cannot be converted to a number are ignored in a Number field. A custom column counts as a number column only when all of its fields are Number, otherwise it is treated as text — which changes how the column sorts and filters. A Number value is kept to eight decimal places; a value with more decimal places than that is rounded. The type is fixed for a standalone number field.

Expression

The regular expression used for the extraction, editable in the cell. Fields defined through a dialog — delimited data, fixed position, split and standalone number — instead show a summary of their definition; double-clicking such a cell reopens the dialog that defines the field.

Source

The scope described above: one data source of the profile, or “All sources in profile”.

Source drop-down of the fields table

Fig. 11.10 The Source choices of a field.

Button

Description

i-assign-detected-fields Assign column and fields

Opens the Define Custom Columns dialog, which adopts columns from other profiles and assigns detected fields to columns. See Define Custom Columns Dialog.

i-add-field-to-new-column Add field to new custom column

Opens the Add Field dialog (see Field Types in the Add Field Dialog) and assigns the chosen field to a new custom column. The column is named after the field: spaces become hyphens, id becomes _id, and a taken name gets a -2 style suffix.

i-add Add field to selected column

Adds a new field to the selected custom column; available only while a custom column is selected. Otherwise it behaves like Add field to new custom column.

i-delete Delete selected field(s)

Removes the selected field from the custom column. Fields from standard columns cannot be deleted.

i-move-up Move up

Moves the selected field up by one position.

i-move-down Move down

Moves the selected field down by one position.

To move a field to another column, right-click it, or click the ⋮ button at the start of its row. Choose Assign to column, then New or an existing column.

Assign to column submenu

Fig. 11.11 The Assign to column menu.

11.1.6.3. Define Custom Columns Dialog

Setting up the same custom columns again for every profile is slow work. The Define Custom Columns dialog removes most of it: it adopts columns that another profile already defines, and it assigns fields that Retrospective detected in the data to columns of the current profile.

You reach the dialog in two ways:

  • with the i-assign-detected-fields Assign column and fields button of the fields toolbar;

  • automatically, after adding a data source and running Autofind, when that run detects fields that are not yet assigned to a column. Only fields the run itself discovers count: running Autofind again over unchanged sources opens nothing, and the fields you left unassigned stay reachable through the Assign column and fields button. A Don’t show again checkbox in the dialog and the Show field assignment dialog option on the Field Detection preferences page both suppress that automatic opening. With it suppressed, Retrospective posts an entry in the Status view instead. When the dialog opens on its own, the detected fields cover only the sources just analyzed.

The right-hand side of the dialog is the current profile: its columns, and beside them the fields of the selected column. The left-hand side shows one of two panes. When both have content, a link above it switches between them:

  • New detected fields — the fields Retrospective found in the data of this profile, with the pattern and data type of each.

  • Columns from existing profiles — a tree of the other profiles and the custom columns each of them defines.

The Define Custom Columns dialog showing newly detected fields

Fig. 11.12 The Define Custom Columns dialog on the detected-fields pane.

The Define Custom Columns dialog showing columns of other profiles

Fig. 11.13 The same dialog after following the Columns from existing profiles link.

A filter field narrows whichever pane is showing. Between the two sides sits a small vertical toolbar with three buttons. Each acts on the current selection, and each is enabled only when that selection makes it meaningful:

Button

Description

i-assign-field-to-new-column Assign selected field(s) to new column

Creates one custom column and assigns all selected detected fields to it. The new column takes the name of the first selected field and is inserted underneath the column selected on the right.

i-assign-field-to-selected-column Assign selected field(s) to selected column

Adds the selected detected fields to the column selected on the right. Standard columns cannot take further fields, so the button stays disabled while one is selected.

i-adopt-column Assign selected column(s) to current profile

Copies the columns selected in the profile tree, with all their fields, into the current profile, underneath the column selected on the right.

A field that you later remove from a column returns to the detected-fields pane, so it can be assigned again. The dialog works on a copy of the profile: OK applies your edits, and Cancel discards them.

While Retrospective detects fields in the background, a progress bar shows it. A banner reports sources it could not reach, for example 2 sources unreachable for detecting new fields; hover over it to see which ones.

11.1.6.4. Field Types in the Add Field Dialog

Both add-field buttons open the Add Field dialog. Its banner reads Add field to new custom column or Add field to existing custom column. It offers fields of all supported types (see Custom Columns), grouped by the following categories.

  • Delimited Data — fields defined by positions or delimiters. Selecting an entry opens a small configuration dialog:

    • Split Field — a field at a specific split position, using one of the following types of separators: Character, Space, Tab Character, String or Regex.

    • Fixed Position Field — a field with a fixed begin and end position.

      Fixed Position Field dialog

      Fig. 11.14 The Fixed Position Field dialog.

    • Data Before / Data Between / Data After — data located before a right delimiter, between a left and a right delimiter, or after a left delimiter. For each delimiter, an Included option decides whether the delimiter becomes part of the extracted value.

      Delimited Data dialog

      Fig. 11.15 The Delimited Data dialog for a Data Between field.

  • Standalone Number — fields that extract a number surrounded by whitespace: Any Standalone Number, Standalone Positive Number, Standalone Negative Number or Standalone Zero. In the configuration dialog you select the number type and the locale that defines the expected thousands and decimal separators. With Use Date Locale selected (the default), the date locale of the data source takes precedence and the selected locale serves as a fallback.

    Standalone Number dialog

    Fig. 11.16 The Standalone Number dialog.

  • Name/Value Pair, Date/Time, Internet, Programming and one category per supported currency (for example CHF - Switzerland) — predefined Name/Value Pattern Fields and Regex Fields. They cover common cases such as e-mail addresses, IP addresses, timestamps and amounts of money. Picking a name/value entry that has no ready expression first asks for the Field Name; the name is also used as the expression key.

    Field Name prompt

    Fig. 11.17 The Field Name prompt.

  • Custom Regular Expression — lets you define your own regular expression for extracting the desired values out of your log data.

When a previous Autofind has detected potentially interesting Name/Value Pattern Fields, they appear in the top Detected in Data category, along with fields detected during search and monitoring with the same profile. Use the filter field at the top of the dialog to find the field of your choice.

The Add Field dialog

Fig. 11.18 The Add Field dialog, with the Detected in Data, Name/Value Pair and other field categories and the filter field.