Logs are not displaying on Graylog UI (with Serilog)

254 views Asked by At

I am new to Graylog and trying to integrate Graylog with Serilog in my back-end app. Graylog server is on another machine and runs on 10.0.6.55. Udp port is 1514. I've did the configurations but logs are not displaying.

Here's my appsettings.json: "Serilog": { "Using": [ "Serilog.Sinks.Graylog" ], "MinimumLevel": "Information", "WriteTo": [ { "Name": "Graylog", "Args": { "hostnameOrAddress": "10.0.5.57", "port": "1514", "transportType": "Udp", } } ], "Properties": { "Application": "Centralized logging application" } }

Program.cs Log configuration part: Log.Logger = new LoggerConfiguration() .ReadFrom.Configuration(builder.Configuration) .Enrich.FromLogContext() .CreateLogger();

And here is Graylog UDP Input: enter image description here

What am I missing?

Any help would be really appreciated.

1

There are 1 answers

1
Swisstone On

You started a Raw/Plaintext UDP Input, but Graylog sink uses the GELF format:

GraylogSink.cs

Try creating a GELF input and see if it works.