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
  • Loading branch information
jcantrill committed Mar 1, 2018
1 parent 253f856 commit 5e1e372
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 @@ -55,6 +55,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 5e1e372

Please sign in to comment.