Splunk Search

I need help with time stamp recognition

kjetil
New Member

Hi.

I've just started with Splunk and need help setting up file input. The log files looks like the below. A header row and one row per event. Each event starts with a number from 0 to whatever, the date, the time and a lot of other fields - all fields separated by semicolon

0;30Jun2012;23:30:00;

567498;1Jul2012;11:26:44;

What I need help with is setting up the recognition. Auto does not work and I'm no too good with regular expressions.

Anyone?

Share and enjoy
Kjetil

Tags (1)
0 Karma

Ayn
Legend

It's not regular expressions you need, but rather strftime/strptime style definitions. I usually go to http://strftime.org/ for a quick reference on them - or if the short version there doesn't cover what I want, I do man strftime in a UNIX shell. These definitions should go in the TIME_FORMAT directive in the appropriate section in props.conf. So for your logs it should be something like:

[your_sourcetype]
TIME_FORMAT = %e%b%Y;%H:%M:%S
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...