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!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...