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

Changing source string #33

Open
sgeffken opened this issue Jun 4, 2019 · 1 comment
Open

Changing source string #33

sgeffken opened this issue Jun 4, 2019 · 1 comment

Comments

@sgeffken
Copy link

sgeffken commented Jun 4, 2019

I am encountering the following problem:

We are using docker swarm mit fluentd logging driver. Our logs are forwarded by remote_syslog plugin to graylog. Unfortunately, the source is always "stdout" independent of the origin host. I have tried using the "hostname" configuration, but this does not suffice as we need to set the source string from "stdout" to "my-hostname" in order to programmatically extract the source. Any recommendations our thoughts on this?

Thank you

@serut
Copy link

serut commented Oct 27, 2023

Hello,
We had the same issue. Here is the configuration of the buffer to get some attributes you can use to dynamically change the hostname and the severity

<match stdout-containers_**>
  @type remote_syslog 
  host rs-tinysyslog  
  port 514
  program myapp
  severity ${level}
  hostname ${hostname}

  <buffer hostname,level>
    chunk_limit_size    8m   # default 8m (MB)
    flush_thread_count  8
    queue_limit_length  32
    overflow_action     block
    # https://docs.fluentd.org/v/0.12/buffer/memory
    flush_interval      2s   # default 60s
    flush_at_shutdown   true # default true
  </buffer>
  <format>
    @type single_value
    message_key message
  </format>
</match>

Attributes I use needs to be listed as parameter of the buffer property

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

2 participants