Dashboards & Visualizations

How to fetch date field from raw logs?

aditsss
Motivator
Hi Team,
 
How can I fetch raw log
 
2023-07-13 02:37:14.317 [INFO ] [pool-2-thread-1] FileSensor - Total msg processed for trim reage file:241
Labels (3)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

| rex "^(?<date>\d{4}-\d{2}-d{2})"

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

If you have configured your sourcetype correctly, the _time field should have picked up the timestamp. Please check that this is the case.

0 Karma

aditsss
Motivator

@ITWhisperer 

I want to extract date please guide.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

| rex "^(?<date>\d{4}-\d{2}-d{2})"

0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...