Hello HAProxy users

I'm currently trying to get HAProxy as my main LB for syslog messages TCP and 
UDP messages for network devices in front of a syslog cluster.
For the UDP messages I'm struggling get the correct sender address in the 
messages being forwarded to backend servers.

All the time I see one of 2 things in my message.

  *   Localhost IP (127.0.0.1 translated to localhost in the logs)
  *   _gateway IP(which is the GW infront of the HAProxy LB)
  *   Or - (Yes just a - no IP or hostname !)

But the actually sending hosts keeps getting stripped/replaced from the 
messages.

I tried the following different configuration now:
log-forward syslogUDPFrontend-10514
        # Listen on UDP and TCP 10514
        dgram-bind "${vipAddr}":10514
        log 152.73.245.2:10514 format local local0

Host received on rsyslog side:
_gateway.log
Mar 28 11:19:51 _gateway 11605603: 11605648: Mar 28 09:19:50.982: 
%ILPOWER-5-DETECT: Interface Te2/0/13: Power Device detected: IEEE PD

log-forward syslogUDPFrontend-10514
        # Listen on UDP and TCP 10514
        dgram-bind "${vipAddr}":10514
        log 152.73.245.2:10514 format rfc3164 local0

Host received on rsyslog side:
                             Localhost.log
                             Mar 28 11:21:02 localhost 1004931: 1005091: Mar 28 
2022 09:21:02.102 UTC: %LINK-3-UPDOWN: Interface GigabitEthernet3/0/39, changed 
state to down

log-forward syslogUDPFrontend-10514
        # Listen on UDP and TCP 10514
        dgram-bind "${vipAddr}":10514
        log 152.73.245.2:10514 format rfc5425 local0

Host receiving on rsyslog side:
                             -.log
                             Mar 28 10:49:07 - - 1093665: 1093708: Mar 28 2022 
08:49:06.471 UTC: %LINK-3-UPDOWN: Interface GigabitEthernet1/0/9, changed state 
to down

I also tried adding the log global section and have the following line in the 
global section:
    log-send-hostname %H
    log-send-hostname

Still giving me the some changed hostnames in the syslog strings !

Any suggestions of wrong configuration or something I missed are very much 
appreciated.
Or maybe what I want, can't be done with HAProxy ?

Best regards
Jan

This e-mail (including any attachments) is intended for the addressee(s) stated 
above only and may contain confidential information protected by law. You are 
hereby notified that any unauthorized reading, disclosure, copying or 
distribution of this e-mail or use of information contained herein is strictly 
prohibited and may violate rights to proprietary information. If you are not an 
intended recipient, please return this e-mail to the sender and delete it 
immediately hereafter. Thank you.

Reply via email to