how can I send "haproxy" log data to my "graylog" server ? can I do so using "netcat" ?
I need to log all requests and responses ( with request body and response body ), to graylog.
thanks.
how can I send "haproxy" log data to my "graylog" server ? can I do so using "netcat" ?
I need to log all requests and responses ( with request body and response body ), to graylog.
thanks.
Per Graylog docs it can use syslog as an input -> http://docs.graylog.org/en/2.4/pages/sending_data.html#syslog
haproxy can output logs to syslog -> https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#3.1-log
Here is an example of the haproxy config /etc/haproxy/haproxy.cfg
:
global
log /dev/log len 65535 local0
...
Here is an example of the rsyslog config /etc/rsyslog.d/22-haproxy.conf
:
$FileCreateMode 0644
$MaxMessageSize 66k
$template haproxy,"%rawmsg%\n"
local0.* -<path_to_your_haproxy_log_file>;haproxy
& stop