All Apps and Add-ons

How to remove special character, from events whiling indexing

svs26
Engager

In my logs we have, special character like \r\n\t, i like remove from events while index level. Please help me on this.

Example: we have like this events\r\n\t\t\t\t\t

0 Karma

woodcock
Esteemed Legend

The best way is to do this:

SHOULD_LINEMERGE = false
LINEBREAKER = ([\r\n\t]+)
0 Karma

somesoni2
Revered Legend

Splunk provides a way to mask sensitive data (replace sensitive data with different string). You can use same concept to replace those junk character with nothing (effectively removing them from raw data). See this for more information.
https://docs.splunk.com/Documentation/Splunk/7.1.3/Data/Anonymizedata

Again, a better option would to be to fix the source that generates the data.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...