# Haproxy config with rsyslog

**URL:** <https://discourse.haproxy.org/t/haproxy-config-with-rsyslog/7495>\
**Category:** Help!\
**Created:** [March 14, 2022, 4:31pm UTC](https://discourse.haproxy.org/t/haproxy-config-with-rsyslog/7495 "2022-03-14T16:31:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elfranne](https://avatars.discourse-cdn.com/v4/letter/e/439d5e/32.png) [@elfranne](https://discourse.haproxy.org/u/elfranne)\
**Post date:** [March 14, 2022, 4:31pm UTC](https://discourse.haproxy.org/t/haproxy-config-with-rsyslog/7495/1 "2022-03-14T16:31:39Z")

</div>

Trying to set up rsyslog with haproxy but no logs ends up in the specified files.

I have looked at: [Introduction to HAProxy Logging - HAProxy Technologies](https://www.haproxy.com/blog/introduction-to-haproxy-logging/)  
and updated rsyslog config to the new format (old format does not work either).

Running:  
Ubuntu 20.04  
Haproxy 2.4 (2.4.14-1ppa1~focal)

rsyslog config:

```auto
module(load="imudp")
input(type="imudp" address="127.0.0.1" port="514")

local0.* /var/log/haproxy/haproxy.log
local0.debug /var/log/haproxy/haproxy_debug.log

```

haproxy config:

```auto
global
  log 127.0.0.1 local0

defaults
  log global
  maxconn 8000
  option redispatch
  retries 3
  stats enable
  timeout http-request 10s
  timeout queue 1m
  timeout connect 10s
  timeout client 1m
  timeout server 1m
  timeout check 10s

listen testlb
  bind public-ip:80 interface ens224
  bind public-ip:81 
  mode http
  log global
  option httplog
  server backend10 192.168.1.10:80 check
  server backend20 192.168.1.20:80 check

```

Rsyslog seams to be working properly:

```auto
logger -p local0.debug "test514"

```

works, and you get an entry in the specified files.

---

<div class="post-metadata">

**Author:** ![elfranne](https://avatars.discourse-cdn.com/v4/letter/e/439d5e/32.png) [@elfranne](https://discourse.haproxy.org/u/elfranne)\
**Post date:** [March 15, 2022, 9:37am UTC](https://discourse.haproxy.org/t/haproxy-config-with-rsyslog/7495/2 "2022-03-15T09:37:28Z")

</div>

after a haproxy purge + re-install the logging is working.
