1

I am trying to read the /var/log/haproxy.log file with the command: clog -f haproxy.log but nothing happens. No window opens. How do I see my error log? I’m on pfsense.

chicks
  • 3,793
  • 10
  • 27
  • 36

2 Answers2

1

First you have to activate the logs in the settings.

Services -> HAProxy -> Settings, "Logging" section.

In "Remote syslog host" put /var/run/log.

Save and apply. Now clog -f /var/log/haproxy.log you should give you something.

0

To be able to enable local logs on HAProxy at pfSense 2.7.0, I had to edit the /etc/defaults/rc.conf file and change the syslogd_flags line to allow the syslog to listen on UDP socket as cited on FreeBSD Forums:

syslogd_flags="-s -b localhost -C"

I'd rebooted the system and changed the HAProxy settings to the same as recommended by @DeepBlueMussel and it worked as expected.

You can also check HAProxy logs on pfSense UI (Stats > System Logs > Packages > haproxy).

To display detailed information specific to a particular frontend (eg URLs accessed by the client), enable the "Detailed Log" checkbox in the frontend configuration.

eduardomozart
  • 115
  • 1
  • 10