Identify the time field in a federated dataset
Define a dataset time field for time-based federated searches and to provide _time for the Events tab timeline and field sidebar.
If your federated dataset contains time-series data, identify its time field. Splunk software does not identify time fields in remote federated datasets automatically. If you do not identify the field that provides event timestamps in the dataset, searches of that dataset that include time range filters or time-based functions might return incorrect results.
Time field identification also makes the _time field available to your federated searches. When you run a federated search that returns results in the Events tab, the search must be able to return the _time field if you want to see the timeline and fields sidebar with those results. For more information, see View events from federated searches.
If you turn on Define the time field for your dataset, provide the name of the field in the dataset that contains the event timestamp, the format of the values of that time field, and the name of an alias for the time field that Splunk software converts to numeric Unix time at search time.
Time field
Enter the name of the field that acts as an event timestamp in the federated dataset. The Time field in your dataset might have a name such as timestamp or actual_time. The field name can contain lowercase letters, numbers, underscores, and periods (.). Surround a field name that contains periods, but is not a nested field, with single quotation marks.
cwl__timestamp. If the time field in your CloudWatch Unified Data Store federated dataset has a different name, enter that name in Time field instead.
_time.
Time format
Provide a time format variable or custom format string that matches the values of the Time field.
-
Use
%sfor Unix time values stored as strings. -
Use
%UTfor Unix time values stored as numbers. -
Use
%STfor values with the SQL timestamp data type. -
For values in a custom string format, use a matching format string. For example, if the values of the Time field look like
04-29-2023 11:45:22 PM, set a Time format of%m-%d-%Y %I:%M:%S %p. For more information, see Using time variables in the SPL2 Search Manual.
%UT and %ST extend the standard set of Splunk platform time format variables. They are used only by federated search.
You can append %Q to capture subsecond timestamps. Use %3Q for milliseconds, %6Q for microseconds, or %9Q for nanoseconds. For numeric Unix time with nanoseconds separated by a period, use %UT.%9Q.
%ST. If the Time field in your CloudWatch Unified Data Store federated dataset uses a different time format, enter that format instead.
Unix time field
The Unix time field setting provides an alias for Time field. Unix time field defaults to _time. At search time, Splunk software converts the Time field to numeric Unix time and provides the result through this alias.
When the Time field is set to a value other than _time, leave the Unix time field setting at its default value of _time. This lets you use SELECT or fields in event searches to return the _time field in the search results. Returning _time with your search results enables the timeline and events sidebar to display correctly when you view those results in the Events tab. See View events from federated searches.
If _time already exists in the dataset schema, give Unix time field a different value.