Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support multiple filters for the same tag #26

Open
rmacian opened this issue Jan 20, 2022 · 0 comments
Open

support multiple filters for the same tag #26

rmacian opened this issue Jan 20, 2022 · 0 comments

Comments

@rmacian
Copy link

rmacian commented Jan 20, 2022

currently I have chained filters and seems is not supported by the module. I only get the last filter defined on my config files. Example from the fluentd documentation:

fluentd::configs:
  'test.conf':
     config:
       filter:
         tag_pattern: foo.bar
         type: grep
         regexp1: message
       filter:
         tag_pattern: foo.bar
         type: record_transformer
         record:
           hostname: "#host"

output:

Notice: /Stage[main]/Fluentd/Fluentd::Config[test.conf]/File[/etc/td-agent/config.d/test.conf]/content:
--- /etc/td-agent/config.d/test.conf    2022-01-20 14:38:52.733950512 +0000
+++ /tmp/puppet-file20220120-23517-blcdg2       2022-01-20 14:41:55.222687956 +0000
@@ -0,0 +1,7 @@
+# This file is managed by Puppet, do not edit manually.
+<filter foo.bar>
+  <record>
+    hostname #host
+  </record>
+  @type record_transfomer
+</filter>
Notice: /Stage[main]/Fluentd/Fluentd::Config[test.conf]/File[/etc/td-agent/config.d/test.conf]/content: current_value '{md5}d41d8cd98f00b204e9800998ecf8427e', should be '{md5}fcf4a04a643b65e0d9904613d90349fe' (noop)

since yaml does not allow duplicate keys, there should be an alternative method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant