fix: handle JSON character encoding for hec (Umlauts) #112
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To reproduce:
When indexing data with special characters, these are implicitly UTF-8 encoded.
Here how the raw data looks like in Splunk:
Searching for field_a="Üü_Öö_Ää_some_text" is not working. The only way is to use star (*):
field_a="*_some_text"
which is very inefficient if the first character is an umlaut.
The other workaround would be to search for
field_a="\u00dc\u00fc_\u00d6\u00f6_\u00c4\u00e4_some_text"
which is not practicable.
We are using the "Splunk Add-on for Microsoft Cloud Services" app, which is using solnlib
https://splunkbase.splunk.com/app/3110/
When our security team is trying to find names with umlauts (example: Müller), then it's not working, which is a big problem.
They practically always have to use *. And as you know the azure data is pretty big.
If you are using syntax highlighting, then the data is displayed identical in both cases, which is very confusing for the users, which expects the search for Umlauts to work.
After the fix the raw data looks like this and the Splunk searches are working correctly: