Getting Data In

filtering content on index

hiddenkirby
Contributor

At a high level... how would one filter the content itself being indexed.

Example: i was indexing ..say.. xml docs and wanted to exclude the contents in a pair of xml tags.

Tags (2)
1 Solution

southeringtonp
Motivator

If the content will always follow a known pattern, you can use SEDCMD to filter out the text you don't want. Set the second part of the expression to be empty, e.g.: SEDCMD-abc = s/StringToThrowAway//.

Another possibility (at the event level) would be to create an entry in transforms.conf matching the information you want suppressed, and route it to a null queue. See here for an example.

View solution in original post

southeringtonp
Motivator

If the content will always follow a known pattern, you can use SEDCMD to filter out the text you don't want. Set the second part of the expression to be empty, e.g.: SEDCMD-abc = s/StringToThrowAway//.

Another possibility (at the event level) would be to create an entry in transforms.conf matching the information you want suppressed, and route it to a null queue. See here for an example.

Get Updates on the Splunk Community!

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

🍂 Fall into November with a fresh lineup of Community Office Hours, Tech Talks, and Webinars we’ve ...

Transform your security operations with Splunk Enterprise Security

Hi Splunk Community, Splunk Platform has set a great foundation for your security operations. With the ...

Splunk Admins and App Developers | Earn a $35 gift card!

Splunk, in collaboration with ESG (Enterprise Strategy Group) by TechTarget, is excited to announce a ...