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.
The search definition area holds the fields where you specify the data sources and the search and monitoring options.
The results area shows the result entries and lets you save, highlight and filter them.
The status bar belongs to the window, not to the tab.
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.
Open a new search tab: click
Open new Search
Tab on the main toolbar, choose , or press Ctrl+T. On macOS, press Cmd+T.Choose the data sources the run is based on. You can:
Select a profile with predefined data sources from the drop-down list on the left (see Profile Manager).
Add a temporary selection of data sources with the buttons above the profile drop-down list:
Choose new files,
Choose new containers or
Choose new Event Logs.Start from the File Browser, the Container Browser or the Event Log Browser. Each opens a new search tab for the files, containers or event logs you pick.
Define the search criteria (see Defining Search Criteria). Only entries that match the criteria are added to the result table.
Click the split button at the far right of the search definition area. It reads
Start Search for a search and
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).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.
Fig. 6.2 The search definition area.¶
Profile drop-down list: select a data profile or a temporary selection of data sources.
Data source buttons: add file, container or Windows Event Log data sources, or compose data sources from several profiles.
Configure current profile (for a
temporary selection: Configure current data source(s)):
edit the selected data sources.
Information bullet: point to it to see the selected
data sources.Search criteria: add and configure the criteria (see Defining Search Criteria).
Search and monitoring options: the Kubernetes context override, dynamic discovery, autofind and field detection.
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.
Fig. 6.3 The results area.¶
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).
Result table toolbar.
Click a column header to sort the result entries by that column.
Select a row to show its full content in the result detail pane.
Result detail toolbar: the buttons that act on the selected log entry.
Result detail pane: the full content of the selected entry.
Maximize / minimize the result detail pane.
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.
Fig. 6.4 Search criteria and local filters.¶
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.
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.
The result database holds the retrieved entries.
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.
The analysis features accept only the local date/time filter.
