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

Inject hostname_key #16

Closed zot24 closed 1 year ago

zot24 commented 7 years ago

This will allow us to override the hostname key from the records values like so:

<source>
  @type forward
</source>

<filter service.**>
  @type record_transformer
  <record>
    hostname ${tag_parts[1]}
  </record>
</filter>

<match service.**>
  @type remote_syslog
  hostname_key hostname
...
</match>

So with the filter tag we'll modify the record and change the hostname value to then use the hostname_key to set the hostname used by remote_syslog

daipom commented 1 year ago

Sorry for not responding for so long. We can use placeholders for hostname in the latest version. I close this now, but if you still have a problem, please tell us again. Thanks for your contribution.