Retrieve source IP of a HAProxy message received via Syslog UDP input

Hello,

I’m trying to send HAProxy logs to Graylog.
To do so, I created a Syslog UDP input and added this line to the “haproxy.cfg” configuration file (In the “global” section): “log ipofmylogserver:514 local0”.
I receive the logs in Graylog but in the messages the source is “haproxy[xxxxxx]” and not the source IP of HAProxy as you can see in the screenshot below.

I’ve enabled “rDNS” in the Syslog UDP input and I’m getting the source server name, but what I’m interested in is the IP.
I tried to create a “RAW UDP” input, but the messages received no longer contain the “level” field.

Do you know how to retrieve the IP of the source HAProxy server from the Syslog UDP input (I don’t want to reverse DNS)?

Thank you

  • OS Information: Debian 12
  • Package Version: Graylog 6.0.6

Hi,

In HAProxy you can set the hostname with this setup :

log-send-hostname “MYSERVER”

Have a nice day

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.