FluentD: cannot send logs to UDP port of GrayLog (only TCP)

Sorry about possible offtopic (FluentD), but in case of anyone aware of…
I’ve got GrayLog instance up and running.
I can forward my logs from FluentD remote host to GrayLog port.
I see the logs, everything is fine.
BUT!
I only can send logs to TCP port!
On FluentD side config is:

<match mytag>
  @type gelf
  host graylog.example.com
  port 12333
  #protocol udp
  <buffer>
    flush_interval 3s
  </buffer>
</match>

I trued with and without protocol udp setting. No luck.
It always sends logs to TCP port.

I even tried to send some UDP data from remote host to my GrayLog instance:

echo "ssssssssssss" | netcat -u graylog.example.com 12333

It works!
I see:

Throughput / Metrics
1 minute average rate: 0 msg/s
Network IO: 0B 0B (total: 16.0B 0B )

16 bytes received!
So, port is open and GrayLog is receiving data.

But, what’s with FluentD?
How to configure FluentD to use UDP port for log sending?

Solved!
Just use “fluent-plugin-gelf-hs” plugin for FluentD, instead of “fluent-plugin-gelf
Here’s my working Dockerfile for building GELF-UDP-enabled FluentD:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.