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.
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.
_time and _raw. However, the UI components that depend on those fields do not display correctly.
-
If
_timeis missing from the search results, the timeline and the field sidebar do not display correctly. -
If
_rawis 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.
_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
SELECTorfieldsto return_timefor 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.
-
Transforming commands such as
chart,timechart,stats,mstats,tstats,eventstats, andstreamstats. -
Aggregating functions such as
count(),sum()andavg() -
Aggregating clauses such as
GROUP BYandHAVING
The following SPL2 examples use mydataset as the federated dataset name. The first search returns matching events with selected fields in the Events tab:
SELECT _raw, _time, productId, categoryId
FROM mydataset
WHERE status=200 AND host="www2"
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:
SELECT clientip, sum(bytes)
FROM mydataset
GROUP BY clientip
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.