Closed adamkurowski closed 2 years ago
Thanks for the kind words. If you haven't already installed Lens I highly recommend it. It's a great tool for troubleshooting kubernetes.
In terms of what you can check, it's going to come down to a couple of things most likely.
1) how are your apps writing to seq? The code in this repo is in the Program.cs
files using .WriteTo.Seq("http://globoseq");
2) Check the globoseq
service is configured and that it exposes port 5341 and maps it to port 5341
3) Check that the app referred to by the globoseq
service is running and exposes port 5341
If you have a repo that you can share, I'd be happy to take a quick look. But Lens can definitely help you see what's configured pretty easily.
Thank you for the quick response :) Thanks to your hints I solve the problem in munutes, I was struggling for 2 days before :) My kubernetes seq service was named: seq-service-internal and then in the code I used container image name: seqlogger (two different names!)
apiVersion: v1 kind: Service metadata: name: seq-service-internal namespace: {{.Values.global.nnamespace}} spec: clusterIP: None selector: app: seq ports:
protocol: TCP port: 5341 targetPort: 5341
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.UseSerilog((context, provider, loggerConfiguration) =>
{
loggerConfiguration
.ReadFrom.Configuration(context.Configuration)
.Enrich.FromLogContext()
.WriteTo.Console()
.WriteTo.Seq("**http://seqlogger:5341**"); ;
})
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
Stupid mistake :) Once again thank you very much for the course and the help, I realy apreciate it By the way happy New Year 2022 :)
Glad it was easy to resolve - and happy new year to you!
Hi Erik, thanks for the great course, one of the bests on pluralsight in my view. I try to follow it carefully to develop my own project and there is still one problem I cannot solve. Seq log works perfect in docker env. but in kubernetes is empty all the time. I spent much time trying to solve it but no success. Have you got any clue what could be a possible reason for this? Or how I could invastigat it?