My Profile Photo

El rincón de mautemático

Las Cosas son como deben, no como deberían Ser.

Load Balancing Graylog2 with HAProxy and SRV records

If you ever happen to use HAProxy to make load balance to your Graylog2/GELF inputs (you should try it, HAProxy is HAwesome!), I advice you to take a look to Siaw Young’s post.

As a plus, you may be using SRV record sets to maintain your Graylog2 cluster node list up to date. If that applies to you, give it a try to haproxy-srv.

Looking for a starting template for haproxy-srv? Here you have!

{{#dns-srv ""}}
listen gelf :12201
    mode tcp
    balance roundrobin
    option httpchk GET /api/system/lbstatus
    {{#each this}}
        server gelf-{{@index}} {{ip}}:{{port}} check port 12900