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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...