Skip to content

Instantly share code, notes, and snippets.

@gambrell
Created March 19, 2015 13:47
Show Gist options
  • Save gambrell/98cc955fb9cf889a54aa to your computer and use it in GitHub Desktop.
Save gambrell/98cc955fb9cf889a54aa to your computer and use it in GitHub Desktop.
Logstash filter to remove embedded NULL characters
# Logstash filter to remove embedded NULL characters
filter {
mutate {
gsub => [
# Replace all NULL characters empty string. Do this to the message field first which will apply to all fields instead of specifying individual fields.
"message", "[\u0000]", ""
]
}
# Add your grok here
}
@BBQigniter
Copy link

thanks!

@weiofcn
Copy link

weiofcn commented Oct 31, 2018

Great job!

@dilllay
Copy link

dilllay commented Aug 17, 2019

Nice! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment