Local log stops when use "log-send-hostname" for Syslog

Hello
We use HAProxy 2.6.6. Log configuration is as below:

global
log 192.168.X.Y:514 local0 notice
log /dev/log local0
log /dev/log local1 notice
#log-send-hostname

In this situation, Local log works correctly and log file updates in /var/log/. Also syslog works correctly.
When we want use “log-send-hostname” config and uncomment it, The local log in /var/log/ stop updating and nothing inserts in it. Syslog works correctly and hostname inserts in log, as we configure it.
p.s: log-send-hostname config, send hostname (hostname of linux machine which HAPrioxy installed on it) to syslog server. this is important to us because multiple machines send logs to syslog server.

Regard

Check your local syslog configuration, likely there is a regexp that stops matching when you add the hostname.

Thanks lukastribus for your kind response.
I have two machine for test this issue. one of them has “hap1” as hostname, and the other has “lb-hap-1” as host name. We have problem on both machines. When we set “log-send-hostname” config on haproxy.conf, local log stop working.

Regards

Exactly, that is why I am saying that the configuration of the local syslog daemon needs to be verified.

Dear lukastribus, Would you please tell me how to verify that configuration? I’m a bit confused, all of my log configuration are these:

log 192.168.20.10:514 local0 notice
log /dev/log local0
log /dev/log local1 notice
log-send-hostname

Best regards

I don’t know how to verify that configuration, it’s not part of haproxy, it’s part of your operating system.

Consult your operating system documentation on how local syslog is configured.