View events from federated searches

Configure federated dataset time settings and use data that has a _raw field to view event data, a timeline, and fields in federated search results.

When you run a federated search that returns event data, you review individual event results in the Events tab. The Events tab includes a timeline and a field sidebar to help you explore when events occurred and see which fields are present in the search results.

To make these components available in the Events tab, configure the federated dataset with time settings that produce a _time field, and verify that the dataset includes a _raw field. The _time field supports the timeline and field sidebar. The _raw field provides the original event text for each event.

When you search the federated dataset, use SELECT or fields to include _time and _raw in the results. After the search completes, open the Events tab to inspect event rows. Use the timeline to focus on a time range. Use the field sidebar to review fields in the results.
Note: An event-producing federated search still displays its results in the Events tab if it does not return _time and _raw. However, the UI components that depend on those fields do not display correctly.
  • If _time is missing from the search results, the timeline and the field sidebar do not display correctly.

  • If _raw is missing from the search results, the event text does not display correctly.

For more information about running federated searches with SPL2, see Run federated searches over federated datasets with SPL2.

For more information about the _time and _raw fields, see Use default fields in the Knowledge Management Manual.

For more information about the Events tab field sidebar, timeline, and event display, see "Understanding search results" in Basic searches and search results, from the Search Tutorial.

Ensure your federated dataset has a _time field

To make sure your federated dataset has a _time field, turn on Define the time field. Then set the Time field, Time format, and Unix time field settings for your source data. For more information, see Identify the time field in a federated dataset.

If the time field in your federated dataset is not named _time, set Time field to field's actual name, such as timestamp or actual_time. You can view the timeline and the field sidebar in event search results when all of the following conditions apply:
  • The dataset Time field is defined correctly.

  • The dataset Unix time field is empty or set to _time.

  • The search displays results in the Events tab and uses SELECT or fields to return _time for those events.

How federated searches are classified

Event searches return individual matching records and appear in the Events tab. Report searches calculate statistics or group records and appear in the Statistics tab in a table.

Federated searches return results in the Statistics tab when they include:
  • Transforming commands such as chart, timechart, stats, mstats, tstats, eventstats, and streamstats.

  • Aggregating functions such as count(), sum() and avg()

  • Aggregating clauses such as GROUP BY and HAVING

The following SPL2 examples use mydataset as the federated dataset name. The first search returns matching events with selected fields in the Events tab:

CODE

Because this search selects _raw and _time, the event text, timeline, and field sidebar display as expected.

The second search calculates the total bytes for each clientip, so it returns a report in the Statistics tab:

CODE

For a search that combines results with union, the combined search displays results on the tab used by the first search in the union. So if the first search in the union returns summarized results, the combined search returns summarized results on the Statistics tab. If the first search in the union returns events, the combined search is an event search, and its results display on the Events tab.