On 29.03.21 18:55, Lukas Tribus wrote:
Hello,

On Mon, 29 Mar 2021 at 15:25, Aleksandar Lazic <[email protected]> wrote:

Hi.

I need to create some log statistics with awffull stats and I assume this 
messages
means that only one line is written for 3 requests, is this assumption right?

Mar 28 14:04:07 lb1 haproxy[11296]: message repeated 3 times: [ ::ffff:<Client-IP>:49445 [28/Mar/2021:14:04:07.234] 
https-in~ be_api/api_prim 0/0/0/13/13 200 2928 - - ---- 930/900/8/554/0 0/0 {<referer>|Mozilla/5.0 (Macintosh; Intel 
Mac OS X 10.13; rv:86.0) Gecko/20100101 Firefox/86.0|<Host>|128|TLS_AES_128_GCM_SHA256|TLSv1.3|<Host>} "GET 
https://<Domain>/<URL> HTTP/2.0"]

Can this behavior be disabled?

This is not haproxy, this is your syslog server. Refer to the
documentation of the syslog server.

Oh yes of course, *clap on head*.

Looks like the RepeatedMsgReduction is on Ubuntu 18.04.5 LTS is this by default 
on.

https://www.rsyslog.com/doc/v8-stable/configuration/action/rsconf1_repeatedmsgreduction.html

I have solved it with this ansible snipplet.

```
    - name: Deactivate RepeatedMsgReduction in rsyslog
      lineinfile:
        backup: yes
        line: $RepeatedMsgReduction off
        path: /etc/rsyslog.conf
        regexp: '^\$RepeatedMsgReduction on'
      tags: haproxy,all,syslog
      register: syslog

    - name: Restart syslog
      service:
        name: rsyslog
        state: restarted
      when: syslog.changed
      tags: haproxy,all,syslog
```

Lukas

Regards
Alex


Reply via email to