Page MenuHomeVyOS Platform

Add logging options to load-balancer reverse-proxy
Closed, ResolvedPublic

Description

The current configuration of haproxy (load-balancing reverse-proxy) includes two statically configured global options in haproxy.cfg:

global
  log /dev/log local0
  log /dev/log local1 notice

This does not provide flexibility to the user. Additionally, the current configuration logs all connection attempts across all services. This can be problematic for busy systems by producing large logs of unnecessary information.

This task aims to provide configuration options to allow the user to configure the syslog facility and severity of messages received. The options are provided as global-parameters, as well as within each service and backend:

[edit load-balancing reverse-proxy]
vyos@vyos# show
 backend BACKEND {
     logging {
         facility local1 {
             level err
         }
     }
 }
 global-parameters {
     logging {
         facility local0 {
         }
     }
 }
 service TEST {
     logging {
         facility local7 {
             level debug
         }
     }
 }

Multiple logging facilities can be specified for each of the attachment points and this hierarchy allows for additional logging configuration options in the future (i.e. format, etc).

Reference haproxy documentation: https://www.haproxy.com/documentation/haproxy-configuration-manual/1-8r1/#8

When none of these options are specified, the original behavior is preserved and the original global logging configuration will be present in haproxy.cfg.

Details

Difficulty level
Unknown (require assessment)
Version
1.5-rolling-202407010024
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Improvement (missing useful functionality)

Event Timeline

jvoss changed the task status from Open to In progress.
jvoss created this object in space S1 VyOS Public.
c-po changed the task status from In progress to Needs testing.Jul 5 2024, 6:39 AM
c-po moved this task from Need Triage to Finished on the VyOS 1.5 Circinus board.
c-po reopened this task as In progress.Jul 30 2024, 3:17 PM
c-po added projects: Restricted Project, VyOS 1.4 Sagitta (1.4.1).