Created
January 10, 2020 00:22
-
-
Save devx/69dee43fc7e8566517273e54919dcf11 to your computer and use it in GitHub Desktop.
Generate a unique hash of every event to prevent duplicates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @see https://github.com/uken/fluent-plugin-elasticsearch#generate-hash-id | |
<filter **> | |
@type elasticsearch_genid | |
hash_id_key _hash | |
</filter> | |
# Apply value from filter to id_key field | |
# Elasticsearch also doesn't like field names with `_` so remove it. | |
<match **> | |
@type elasticsearch | |
hosts elasticsearch.local:9200 | |
[..] | |
id_key _hash | |
remove_keys _hash | |
[..] | |
</match> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment