Splunk Search

Extracting a value from log message

sahana
Engager

Hi,

I have a requirement like i need to extract a some card value which was present inside the message body of the log. In this value would come to logs in two different names. Can you please how can i fetch these value and display it in  table.

 

thanks

Labels (1)
0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

Without examples from your data it's hard to show how this exactly can do. But in general level you can do it with eval and e.g. case/if/coalesce  like this.

| eval field = coalesce(f1, f2)
| eval field = if (index=="ix1", f1, f2)
| table field

Select one of those evals based on your data or change names etc.

r. Ismo 

0 Karma
Get Updates on the Splunk Community!

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...

AppDynamics is now part of Splunk Ideas

Hello Splunkers, We have exciting news for you! AppDynamics has been added to the Splunk Ideas Portal. Which ...

Advanced Splunk Data Management Strategies

Join us on Wednesday, May 14, 2025, at 11 AM PDT / 2 PM EDT for an exclusive Tech Talk that delves into ...