6. Searching and Monitoring

Retrospective searches and monitors log data. This chapter describes a run step by step. You choose the data sources (log files), define the search criteria, start the search or the monitoring, and work with the result data.

Retrospective analyzes log data in two modes. A search finds the entries that match your criteria in the current content of the data sources you choose. A monitor instead keeps watching those data sources and adds new entries to the result as they are written. You pick the mode when you start the run; everything you do before that is the same for both.

All of this happens in a search tab. The number of open search and monitoring tabs is limited only by available memory.

A search tab has two areas. Below them, the status bar of the window shows the progress of the current search, running background processes and notifications.

  1. The search definition area holds the fields where you specify the data sources and the search and monitoring options.

  2. The results area shows the result entries and lets you save, highlight and filter them.

  3. The status bar belongs to the window, not to the tab.

The two areas of a search tab and the status bar of the window

Fig. 6.1 The two areas of a search tab: (1) search definition area, (2) results area, and (3) the status bar of the window.

A search or monitoring run follows five steps, which move through these areas from top to bottom.

  1. Open a new search tab: click i-new-search Open new Search Tab on the main toolbar, choose View ‣ New Search Tab, or press Ctrl+T. On macOS, press Cmd+T.

  2. Choose the data sources the run is based on. You can:

  3. Define the search criteria (see Defining Search Criteria). Only entries that match the criteria are added to the result table.

  4. Click the split button at the far right of the search definition area. It reads i-start-search Start Search for a search and i-start-monitor Start Monitor for monitoring. Its arrow opens a menu that switches between the two modes; the entry for the current mode is unavailable (see Starting a Search or Monitor).

  5. Review and filter the results in the result table (see Result Visualization (Result Table)).

The search definition area lets you choose the data sources and define the search before you start it. Search Definition Toolbar describes its toolbar in detail.

The search definition area with its controls called out

Fig. 6.2 The search definition area.

  1. Profile drop-down list: select a data profile or a temporary selection of data sources.

  2. Data source buttons: add file, container or Windows Event Log data sources, or compose data sources from several profiles.

  3. i-configure-data-sources Configure current profile (for a temporary selection: Configure current data source(s)): edit the selected data sources.

  4. i-profile-info Information bullet: point to it to see the selected data sources.

  5. Search criteria: add and configure the criteria (see Defining Search Criteria).

  6. Search and monitoring options: the Kubernetes context override, dynamic discovery, autofind and field detection.

  7. Start Search or Start Monitor: start the run.

The results area shows the retrieved log entries together with the controls for sorting, inspecting and navigating them.

The results area with the result table and the result detail pane

Fig. 6.3 The results area.

  1. Statistics chart: point to a bar to see its time span and the number of matching entries. Click a bar, or drag across bars, to filter the result by that time range. Right-click a bar and choose Search this time period in a new tab (see Filtering by a Time Range).

  2. Number of result entries, together with i-clear-results Clear result.

  3. Result table toolbar.

  4. Click a column header to sort the result entries by that column.

  5. Select a row to show its full content in the result detail pane.

  6. Result detail toolbar: the buttons that act on the selected log entry.

  7. Result detail pane: the full content of the selected entry.

  8. Maximize / minimize the result detail pane.

  9. Vertical scrolling: one scrollbar covers the whole result. Retrospective keeps all result data in its result database and loads the visible part on demand (see Result Visualization (Result Table)).

Search criteria and local filters both narrow the result, at different stages.

Search criteria selecting what enters the result, and local filters hiding rows of the result table

Fig. 6.4 Search criteria and local filters.

  1. The search criteria decide which entries enter the result. Text and date/time criteria are joined with AND or OR; the event-log filter only with AND.

  2. When searching, SSH hosts and Windows hosts apply them on the host. Local files and containers are filtered inside Retrospective. When monitoring, only event logs are still filtered on the host.

  3. The result database holds the retrieved entries.

  4. Local filters hide rows without reading the data sources again. The text or RQL filter, the date/time, log level and custom-column filters all apply together.

  5. The analysis features accept only the local date/time filter.