Getting Data In

How to exclude certain fields in json logs from being displayed on UI OR being indexed?

saranya_fmr
Communicator

Hi All,

Is there a way to exclude certain fields from my JSON data? For example: I have the below JSON Format event with fields A , B and C.

{

A : XXXX..
B : YYYY...
C : ZZZZ....

}

Is there a way to remove the fields B and C along with its values from the search result?

sundareshr
Legend

You can use SEDCMD to replace with empty strings. See if this link helps

http://docs.splunk.com/Documentation/Splunk/6.5.0/Data/Anonymizedata

props.conf

[sourcetype stanza]
SEDCMD-removefieldB = s/B:\w+//g
SEDCMD-removefieldC = s/C:\w+//g

saranya_fmr
Communicator

Thankyou @sundareshr

0 Karma

sloshburch
Splunk Employee
Splunk Employee

@saranya_fmr, if you accept this answer, please mark the "accept" link and @sarnagar will get delicious karma points and the rest of us will know this works as an answer.

0 Karma

sarnagar
Contributor

Thankyou..

Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...