fluent-plugins-nursery / fluent-plugin-remote_syslog

Fluentd plugin for output to remote syslog serivce (e.g. Papertrail)
https://github.com/dlackty/fluent-plugin-remote_syslog
MIT License
68 stars 53 forks source link

Can't use tag placeholders #1

Closed scalp42 closed 8 years ago

scalp42 commented 8 years ago

Hi @dlackty !

I have the following tag: marathon.myapp and I'm trying to tag it as myapp:

<match marathon.*>
  type remote_syslog
  host blabla.papertrailapp.com
  port 42000
  num_threads 2
  tag ${tag} # tried also tag_parts[2] or tag_parts.last
  hostname example.com
  output_include_time no
  output_include_tag no
  output_data_type attr:container_name,log
</match>

Unfortunately, this is not grabbing the 2nd part of the tag:

I'm also seeing:

015-12-08 01:27:51 +0000 [warn]: parameter 'num_threads' in <match marathon.*>
xxxxx
</match> is not used.

Any idea on how to have fluentd interpolate correctly tag_parts[x] correctly ?

Thanks in advance for the help!

scalp42 commented 8 years ago

@dlackty apparently ${tags} are not supported ? https://groups.google.com/d/msg/fluentd/vHC68RfIwa0/F1fwZ9HCAgAJ

Any chance you could implement it ?

scalp42 commented 8 years ago

https://github.com/sonots/fluent-plugin-record-reformer/blob/master/lib/fluent/plugin/out_record_reformer.rb#L185-L201 might be a good lead.

scalp42 commented 8 years ago

Looks like you can include a mixin: https://github.com/y-ken/fluent-mixin-rewrite-tag-name

dlackty commented 8 years ago

Closed via #2