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!

Infographic provides the TL;DR for the 2024 Splunk Career Impact Report

We’ve been buzzing with excitement about the recent validation of Splunk Education! The 2024 Splunk Career ...

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...