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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...