OPNsense Forum

English Forums => 25.1, 25.4 Production Series => Topic started by: Zhmak on May 06, 2025, 12:21:11 PM

Title: HA Proxy no logs at all.
Post by: Zhmak on May 06, 2025, 12:21:11 PM
OPNsense 25.1.5_5
HA Proxy service configured and running.

Global log setting at defaults.

global
    uid                         80
    gid                         80
    chroot                      /var/haproxy
    daemon
    stats                       socket /var/run/haproxy.socket group proxy mode 775 level admin
    nbthread                    1
    hard-stop-after             60s
    no strict-limits
    httpclient.resolvers.prefer   ipv4
    tune.ssl.default-dh-param   2048
    spread-checks               2
    tune.bufsize                16384
    tune.lua.maxmem             0
    log                         /var/run/log local0
    lua-prepend-path            /tmp/haproxy/lua/?.lua

defaults
    log     global
    option redispatch -1
    timeout client 30s
    timeout connect 30s
    timeout server 30s
    retries 3
    default-server init-addr last,libc

But in Services: HAProxy: Log File I see only "No results found!"

Other service have no issues with logging. Only HAProxy
Title: Re: HA Proxy no logs at all.
Post by: meyergru on May 06, 2025, 02:50:15 PM
Maybe this is a similar issue as this (https://github.com/opnsense/plugins/issues/4665), especially if it is a new installation.

You could try to look at /usr/local/etc/syslog-ng.conf.d/syslog-ng-local.conf and see if it contains a [haproxy] section.

If not, please comment on the linked issue, because then, the problem is is present on more that the os-acme-client plugin. You can then paste in this section into the file and reboot to fix your problem:

###################################################################
# Local syslog-ng configuration filter definition [haproxy].
###################################################################
filter f_local_haproxy {
    program("haproxy");
};
destination d_local_haproxy {
    file(
        "/var/log/haproxy/haproxy_${YEAR}${MONTH}${DAY}.log"
        create-dirs(yes)
        flags(syslog-protocol)
    );
};
log {
    source(s_all);
    filter(f_local_haproxy);
    destination(d_local_haproxy);
};


Maybe @franco can do something about it before this week's release of 25.1.6.
Title: Re: HA Proxy no logs at all.
Post by: viragomann on May 06, 2025, 02:54:44 PM
Go to Settings > Logging and state a log level.
Title: Re: HA Proxy no logs at all.
Post by: Zhmak on May 06, 2025, 03:09:22 PM
Quote from: meyergru on May 06, 2025, 02:50:15 PMIf not, please comment on the linked issue, because then, the problem is is present on more that the os-acme-client plugin. You can then paste in this section into the file and reboot to fix your problem

This filter definition section already available in syslog-ng-local.conf

os-acme-client logs are ok.
Title: Re: HA Proxy no logs at all.
Post by: Zhmak on May 06, 2025, 03:13:31 PM
Quote from: viragomann on May 06, 2025, 02:54:44 PMGo to Settings > Logging and state a log level.
You mean Services: HAProxy: Settings: Logging "Filter syslog level"?

Option description says "Can be specified to filter outgoing messages. By default, all messages are sent. If a level is specified, only messages with a severity at least as important as this level will be sent"