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!

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...

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 Dashboard Challenge and Watch the .conf24 Global Broadcast!

The Splunk Community Dashboard Challenge is still happening, and it's not too late to enter for the week of ...