HAProxy local syslog not working
-
pfSense Plus 23.05.1
HAProxy package 0.63_1Setting the syslog host to
/var/run/log
in the HAProxy settings doesn't produce any entries in the pfSense system logs.Following the suggestion in this post fixes the issue by making syslogd listen to a UDP socket:
- Edit
/etc/defaults/rc.conf
(Diagnostics -> Edit File). - Change
syslogd_flags="-s"
tosyslogd_flags="-s -b localhost -C"
- Restart the syslogd service (Status -> Services).
They also reference this forum post with more details:
https://forums.freebsd.org/threads/haproxy-not-logging.76876/#post-477067 - Edit
-
@vynce Thanks, works like a champ!
I've made a patch for this:
--- rc.conf 2023-06-28 06:37:17.000000000 +0200 +++ rc.conf.new 2023-11-10 09:28:40.000000000 +0100 @@ -302,7 +302,7 @@ hostapd_enable="NO" # Run hostap daemon. syslogd_enable="YES" # Run syslog daemon (or NO). syslogd_program="/usr/sbin/syslogd" # path to syslogd, if you want a different one. -syslogd_flags="-s" # Flags to syslogd (if enabled). +syslogd_flags="-s -b localhost -C" # Flags to syslogd (if enabled). syslogd_oomprotect="YES" # Don't kill syslogd when swap space is exhausted. altlog_proglist="" # List of chrooted applicatioins in /var inetd_enable="NO" # Run the network daemon dispatcher (YES/NO).
System > Patches > Add New Patch
Description: haproxy syslog fix
Patch Contents: c&p code from above
Base Directory: /etc/default
Auto Apply: check
Save
+ApplyRestart syslogd service > Status > Services
-
Nice!
I forgot to link to the issue ticket: https://redmine.pfsense.org/issues/14764
-
This post is deleted!