serilog-sinks-graylog icon indicating copy to clipboard operation
serilog-sinks-graylog copied to clipboard

Is Graylog 4 supported?

Open trampster opened this issue 2 years ago • 2 comments

The readme says that this supports Grelog 2. Is this just old text? Should we expect Graylog 4 to work

I have tried to use graylog 4.2 and my messages do not make it to the server. I don't know if this is because Graylog 4 is unsupported or if I have misconfigured it.

I have graylog running locally using docker-compose:

My Serilog config looks like this:

using var logger = new LoggerConfiguration()
    .WriteTo.Console(outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} - {SourceContext} [{Level:u3}] {Message:lj}{NewLine}{Exception}")
    .WriteTo.Graylog(new GraylogSinkOptions
    {
        HostnameOrAddress = "127.0.0.1",
        Port = 12201,
        MinimumLogEventLevel = Serilog.Events.LogEventLevel.Information,
        TransportType = Serilog.Sinks.Graylog.Core.Transport.TransportType.Udp,
    })
    .MinimumLevel.Debug()
    .CreateLogger();

my graylog has a UDP input configured:

bind_address: 0.0.0.0
decompress_size_limit: 8388608
number_worker_threads: 12
override_source: <empty>
port: 12201
recv_buffer_size: 262144

I've also tried the http input

trampster avatar Mar 30 '22 22:03 trampster

Hi! Have you solved this problem? Or just changed the configuration of the docker-compose file by changing it to graylog2?

GonarchX avatar Sep 16 '22 05:09 GonarchX

@trampster GELF protocol isn't changed, so it shold work with graylog 4, but i cant test it because i'm from russia =D and can't install graylog locally. In our production systems we use gralog 3 and it works fine

whir1 avatar Jun 16 '23 07:06 whir1