Search code examples
dockerasp.net-coreasp.net-core-mvcseriloggraylog

Graylog field 'source': FQDN instead of DockerId with Serilog


I'm using Serilog to log my messages into Graylog via a GELF Input. As far as I understand it, the source field in Graylog is automatically detected as the hostname. We're using docker containers so the source is shown as 3c1d... which is not optimal / user-friendly.

Is there a way to configure Graylog or Serilog to set the source field to a static FQDN?

Thanks in advance


Solution

  • I was able to set the source field by adding --hostname XYZ to my docker run command.