Skip to content

Commit

Permalink
Merge pull request #659 from blockloop/bjones/bug-1852341/relabel-level
Browse files Browse the repository at this point in the history
Bug 1852341: fix legacy syslog k8s Metadata
  • Loading branch information
openshift-merge-robot authored Aug 20, 2020
2 parents 5971ee0 + 1ec2338 commit cb772f9
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
26 changes: 26 additions & 0 deletions pkg/generators/forwarding/fluentd/fluent_conf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,15 @@ var _ = Describe("Generating fluentd config", func() {
</record>
remove_keys req,res,msg,name,level,v,pid,err
</filter>
<filter k8s-audit.log**>
@type record_transformer
<record>
k8s_audit_level ${record['level']}
</record>
remove_keys level
</filter>
<filter **>
@type viaq_data_model
elasticsearch_index_prefix_field 'viaq_index_name'
Expand Down Expand Up @@ -765,6 +774,15 @@ var _ = Describe("Generating fluentd config", func() {
</record>
remove_keys req,res,msg,name,level,v,pid,err
</filter>
<filter k8s-audit.log**>
@type record_transformer
<record>
k8s_audit_level ${record['level']}
</record>
remove_keys level
</filter>
<filter **>
@type viaq_data_model
elasticsearch_index_prefix_field 'viaq_index_name'
Expand Down Expand Up @@ -1564,6 +1582,14 @@ var _ = Describe("Generating fluentd config", func() {
remove_keys req,res,msg,name,level,v,pid,err
</filter>
<filter k8s-audit.log**>
@type record_transformer
<record>
k8s_audit_level ${record['level']}
</record>
remove_keys level
</filter>
<filter **>
@type viaq_data_model
elasticsearch_index_prefix_field 'viaq_index_name'
Expand Down
24 changes: 24 additions & 0 deletions pkg/generators/forwarding/fluentd/output_conf_legacy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,14 @@ var _ = Describe("Generating fluentd legacy output store config blocks", func()
remove_keys req,res,msg,name,level,v,pid,err
</filter>
<filter k8s-audit.log**>
@type record_transformer
<record>
k8s_audit_level ${record['level']}
</record>
remove_keys level
</filter>
<filter **>
@type viaq_data_model
elasticsearch_index_prefix_field 'viaq_index_name'
Expand Down Expand Up @@ -739,6 +747,14 @@ var _ = Describe("Generating fluentd legacy output store config blocks", func()
remove_keys req,res,msg,name,level,v,pid,err
</filter>
<filter k8s-audit.log**>
@type record_transformer
<record>
k8s_audit_level ${record['level']}
</record>
remove_keys level
</filter>
<filter **>
@type viaq_data_model
elasticsearch_index_prefix_field 'viaq_index_name'
Expand Down Expand Up @@ -1180,6 +1196,14 @@ var _ = Describe("Generating fluentd legacy output store config blocks", func()
remove_keys req,res,msg,name,level,v,pid,err
</filter>
<filter k8s-audit.log**>
@type record_transformer
<record>
k8s_audit_level ${record['level']}
</record>
remove_keys level
</filter>
<filter **>
@type viaq_data_model
elasticsearch_index_prefix_field 'viaq_index_name'
Expand Down
8 changes: 8 additions & 0 deletions pkg/generators/forwarding/fluentd/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ const fluentConfTemplate = `{{- define "fluentConf" -}}
remove_keys req,res,msg,name,level,v,pid,err
</filter>
<filter k8s-audit.log**>
@type record_transformer
<record>
k8s_audit_level ${record['level']}
</record>
remove_keys level
</filter>
<filter **>
@type viaq_data_model
elasticsearch_index_prefix_field 'viaq_index_name'
Expand Down

0 comments on commit cb772f9

Please sign in to comment.