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!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

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

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...