Reputation: 37
I'm trying to configure my ubuntu as a load balancer with HAProxy. Since the 2.3 version is also UPD supported. So, basically, I want to configure my Ubuntu as a load balancer with HAProxy in order to send logs (UDP port 514) to 2 of my Syslog-ng server. Following my configuration:
frontend Local_Server
bind 10.172.0.6:514
default_backend my_syslog_server
backend my_syslog_server
balance roundrobin
option forwardfor
server syslog-ng01 10.172.0.3:514
server syslog-ng02 10.172.0.4:514
How looks my configuration like? is it right like this?
Upvotes: 0
Views: 4515
Reputation: 1
Hi Try to make you config file like this:
global
log stderr format iso local7
ring myring
description "My local buffer"
format rfc5424
maxlen 1200
size 32764
timeout connect 5s
timeout server 10s
# syslog tcp server
server mysyslogsrv 127.0.0.1:514 log-proto octet-count
log-forward sylog-loadb
dgram-bind 127.0.0.1:1514
bind 127.0.0.1:1514
# all messages on stderr
log global
# all messages on local tcp syslog server
log ring@myring local0
# load balance messages on 4 udp syslog servers
log 127.0.0.1:10001 sample 1:4 local0
log 127.0.0.1:10002 sample 2:4 local0
log 127.0.0.1:10003 sample 3:4 local0
Ref Link : https://cbonte.github.io/haproxy-dconv/2.3/configuration.html
Upvotes: 0