Splunk Enterprise

How to to capture the below time stamp using "Time_Prefix's Regex."?

super_saiyan
Communicator

I want to capture the below time stamp using "Time_Prefix's Regex."

20220207T111737.014+0800

There is no guarantee that version will always be in that format, so  can someone please help me with a generic Regex ? 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Regex is pattern matching - a generic pattern is neither possible nor useful - for example, ".*" will match to any time stamp you have, but it will also match to everything else which isn't a time stamp. In order to be useful, you will need to identify all the formats you consider to be time stamps in your events, and determine a common pattern or patterns (as few as possible) which describes the time stamp.

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Regex is pattern matching - a generic pattern is neither possible nor useful - for example, ".*" will match to any time stamp you have, but it will also match to everything else which isn't a time stamp. In order to be useful, you will need to identify all the formats you consider to be time stamps in your events, and determine a common pattern or patterns (as few as possible) which describes the time stamp.

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 ...