Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
bug 1548104. Generate record uuids upon ingestion to minimize duplicates
(cherry picked from commit 5e1e372)
  • Loading branch information
jcantrill authored and richm committed Apr 17, 2018
1 parent c94b794 commit 3d9a9f0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions fluentd/configs.d/openshift/filter-post-genid.conf
@@ -0,0 +1,6 @@
# generate ids at source mitigate creating duplicate records
# requires fluent-plugin-elasticsearch
<filter **>
@type elasticsearch_genid
hash_id_key viaq_msg_id
</filter>
1 change: 1 addition & 0 deletions fluentd/configs.d/openshift/output-es-config.conf
Expand Up @@ -4,6 +4,7 @@
port "#{ENV['ES_PORT']}"
scheme https
target_index_key viaq_index_name
id_key viaq_msg_id
remove_keys viaq_index_name
user fluentd
password changeme
Expand Down
1 change: 1 addition & 0 deletions fluentd/configs.d/openshift/output-es-ops-config.conf
Expand Up @@ -4,6 +4,7 @@
port "#{ENV['OPS_PORT']}"
scheme https
target_index_key viaq_index_name
id_key viaq_msg_id
remove_keys viaq_index_name
user fluentd
password changeme
Expand Down
1 change: 0 additions & 1 deletion fluentd/configs.d/user/fluent.conf
Expand Up @@ -33,4 +33,3 @@
# no post - applications.conf matches everything left
##
</label>

4 changes: 4 additions & 0 deletions test/fluentd-forward.sh
Expand Up @@ -57,6 +57,10 @@ update_current_fluentd() {
else
# edit so we don't send to ES
oc get configmap/logging-fluentd -o yaml | sed '/## matches/ a\
<filter **>\
@type record_transformer\
remove_keys _id, viaq_msg_id\
</filter>\
<match **>\
@type copy\
@include configs.d/user/secure-forward1.conf\
Expand Down

0 comments on commit 3d9a9f0

Please sign in to comment.