Nginx sends syslog messages with the name of the server - I would like the ip

Mik J mikydevel at
Sun Dec 11 09:16:54 UTC 2022

Thannk you Jeffrey for your help

Le dimanche 11 décembre 2022 à 09:31:10 UTC+1, Jeffrey 'jf' Lim < at> a écrit : 

On Sun, Dec 11, 2022 at 8:03 AM Mik J via nginx <nginx at> wrote:
> Hello,
> My Nginx server sends syslogs to my remote syslog server with a host =
> However I would like that the host to be the IP a specific IP of the server (which exists)
> On my Nginx server
> server {
> ...
> access_log syslog:server=;
> error_log syslog:server=;
> Is it possible that the syslog hostname in the message is set to (the IP address of the Nginx server) ?

you can define a custom log_format
and then log using that format


He who settles on the idea of the intelligent man as a static entity
only shows himself to be a fool.

More information about the nginx mailing list