Splunk Search

Some splunk events indexing without any date in them which makes manually insert the date in search query to search?

pavanae
Builder

Some splunk events indexing without any date in them which makes manually insert the date in search query to search..

Now how can I make them indexing with certain date format?

Splunk version ;-6.1.8

What were the stanzas i should give and where?

0 Karma
1 Solution

inventsekar
SplunkTrust
SplunkTrust

How Splunk software assigns timestamps
Splunk software uses the following precedence rules to assign timestamps to events:

  1. It looks for a time or date in the event itself using an explicit TIME_FORMAT, if provided. You configure the TIME_FORMAT attribute in props.conf.

  2. If no TIME_FORMAT was configured for the data, Splunk software attempts to automatically identify a time or date in the event itself. It uses the source type of the event (which includes TIME_FORMAT information) to try to find the timestamp.

  3. If an event does not have a time or date, Splunk software uses the timestamp from the most recent previous event of the same source.

  4. If no events in a source have a date, Splunk software tries to find a date in the source name or file name. Time of day is not identified in filenames. (This requires that the events have a time, even though they don't have a date.)

  5. For file sources, if no date can be identified in the file name, Splunk software uses the file's modification time.

  6. As a last resort, Splunk software sets the timestamp to the current system time when indexing each event.

Note: Splunk software can extract only dates from a source, not times. If you need to extract a time from a source, use a transform.

http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/HowSplunkextractstimestamps

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !

View solution in original post

0 Karma

inventsekar
SplunkTrust
SplunkTrust

How Splunk software assigns timestamps
Splunk software uses the following precedence rules to assign timestamps to events:

  1. It looks for a time or date in the event itself using an explicit TIME_FORMAT, if provided. You configure the TIME_FORMAT attribute in props.conf.

  2. If no TIME_FORMAT was configured for the data, Splunk software attempts to automatically identify a time or date in the event itself. It uses the source type of the event (which includes TIME_FORMAT information) to try to find the timestamp.

  3. If an event does not have a time or date, Splunk software uses the timestamp from the most recent previous event of the same source.

  4. If no events in a source have a date, Splunk software tries to find a date in the source name or file name. Time of day is not identified in filenames. (This requires that the events have a time, even though they don't have a date.)

  5. For file sources, if no date can be identified in the file name, Splunk software uses the file's modification time.

  6. As a last resort, Splunk software sets the timestamp to the current system time when indexing each event.

Note: Splunk software can extract only dates from a source, not times. If you need to extract a time from a source, use a transform.

http://docs.splunk.com/Documentation/Splunk/6.4.3/Data/HowSplunkextractstimestamps

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...