Getting Data In

Default datetime fields

Martin583
Explorer

I am using Splunk to Search historical data in a virtual index but I have noticed that the default date_year is being incorrectly added.

 

My data is from 2020 and when I search I specified a source pointing to a  particular directory based on the date at which it was ingested.

 

Unfortunately the logs in question have a timestamp in the following format %b %e %H:%M:%S i.e no year..

 

When I run my search looking in the folder for 15/08/2020 some of the default dates are 2020 but some are 2021.

index=vix_web        source="/data/xx/xxx/xxx/xxx/2020/08/15"

 

Having done some research on how the default times are extracted, it would seem  datetime.xml is used but I still don't know where the year is extracted from.

 

Can anyone help

Labels (1)
0 Karma

Martin583
Explorer

Is there a way in which I can force the year based on the source of the historical data, i.e the directory path for the data?

0 Karma

Martin583
Explorer

Following the logic in the article I would think that the vast majority of the Historical logs should infact have 2021 applied to them.

 

0 Karma

ldongradi_SPL
Splunk Employee
Splunk Employee

You should get your answer here:

 https://docs.splunk.com/Documentation/Splunk/latest/Data/HowSplunkextractstimestamps#How_Splunk_soft...

under the section :  How Splunk software determines timestamps with no year

Martin583
Explorer

Thank you for your reply.

What I don't understand is that for some months of the historical data for the same types of events it will have a default date_year which is correct i.e 2020 but some that come back as 2021.

 

Any ideas?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...