The default HAProxy configuration enables logging and sends logs to localhost using the default syslog udp port: 514.

To obtain these logs, you can either change the logging to stdout or start a sidecar syslog container.

Change to stdout

This is the preferred method if you are working in a cloud or microservices environment.

  • Replace the default log configuration and use stdout logging instead of the log stdout local0 directive.

View logs

  • To see the logs, run:

    docker logs -f hapee

Configure a sidecar syslog container

You can also keep the default logging configuration and add a sidecar syslog container to share the same network stack as the HAProxy Enterprise container.

  1. In the file docker-compose.yml, add the following:

    version: '2'
    services:
      hapee:
        image: hapee-plus-registry.haproxy.com/hapee-business-plus
        container_name: hapee
        volumes:
          - /hostdir/hapee-lb.cfg:/etc/hapee-1.8/hapee-lb.cfg
        ports:
        - 80:80
        - 443:443
      rsyslog:
        image: jumanjiman/rsyslog
        container_name: rsyslog
        network_mode: "service:hapee"
  2. Start the containers with:

    docker-compose up

View logs

  • To see the logs, run:

    docker logs -f rsyslog