Splunk Search

Timestamp Regex need help here!

christantoy
Path Finder

Good Day Splunkers

Can you help me to define this in regex format??

Sat Mar  2 01:02:02 2013 +08:00

Thanks in advance

Tags (3)
0 Karma

christantoy
Path Finder

Yes your right Ayn... it's strptime/strime... it working now thanks a lot for the support...

Take care alway....

0 Karma

Ayn
Legend

For the record, the format strings you define for parsing timestamps are not regular expressions, they're strptime/strftime format specifiers.

0 Karma

yannK
Splunk Employee
Splunk Employee

here is what you need : http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Commontimeformatvariables

for your example, it should look in the sourcetype definition like :
TIMEFORMAT=%a %b %e %H:%M:%S %Y %Z
please try on the data input preview to confirm.

lguinn2
Legend

Although I would add "why do you need to specify this?" Splunk is remarkably good at figuring out timestamps and this one is not hard. Splunk really shouldn't need you to specify anything - it can automatically handle this!

0 Karma

christantoy
Path Finder

To set a new timestamp for my data instead of default splunk timestamp

0 Karma

emiller42
Motivator

What are you trying to accomplish here?

0 Karma
Get Updates on the Splunk Community!

Everything Community at .conf24!

You may have seen mention of the .conf Community Zone 'round these parts and found yourself wondering what ...

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...