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!

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

This is the third post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...