serilog-contrib / serilog-sinks-graylog

Serilog sink for graylog
MIT License
80 stars 68 forks source link

Is Graylog 4 supported? #78

Open trampster opened 2 years ago

trampster commented 2 years ago

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

GonarchX commented 1 year ago

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

whir1 commented 1 year ago

@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