Splunk Search

is there a way to escape source when log contains source field ?

charmsstyler
Explorer

Hey Splunk Experts,

I have a log that produce something like below; (Notice there is a key named source[not the splunk source])

timestamp source=graph name=standard
...

When I table the above log ; | table source name ; It shows source as in the log file path.

source              name
/opt/app/abc.log    standard

Is there a way to escape that so it shows value in log file - like below? Thank you!

source   name   
graph   standard
0 Karma
1 Solution

PavelP
Motivator

Hello @charmsstyler ,

try search time extraction

.... |rex "\s+source=(?<source_orig>[^\s]+)" | table source_orig name

View solution in original post

PavelP
Motivator

Hello @charmsstyler ,

try search time extraction

.... |rex "\s+source=(?<source_orig>[^\s]+)" | table source_orig name
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...