--- title: "12. Other Sections" linkTitle: "12. Other Sections" weight: 230 description: "Tracing, users, mailers, errors, rings, certificates, ACME, and global health checks" icon: fa-solid fa-ellipsis module: [HAPROXY] categories: [Reference] aliases: - /haproxy/configuration/other-sections/ - /docs/haproxy/configuration/other-sections/ - /haproxy/other-sections/ upstream_link: "https://docs.haproxy.org/3.4/configuration.html" upstream_name: "HAProxy 3.4 Configuration Manual" upstream_ref: "v3.4.4, chapter 12" --- The sections described below are less commonly used and usually support only a few parameters. There is no implicit relation between any of them. They're all started using a single keyword. None of them is permitted before a "global" section. The support for some of them might be conditioned by build options (e.g. anything SSL-related). ## 12.1. Traces {#section-12-1} For debugging purpose, it is possible to activate traces on an HAProxy's subsystem. This will dump debug messages about a specific subsystem. It is a very powerful tool to diagnose issues. Traces can be dynamically configured via the CLI. It is also possible to predefined some settings in the configuration file, in dedicated "traces" sections. More details about traces can be found in the management guide. It remains a developer tools used during complex debugging sessions. It is pretty verbose and have a cost, so use it with caution. And because it is a developer tool, there is no warranty about the backward compatibility of this section. **`traces`** ```haproxy traces ``` Starts a new traces section. One or multiple "traces" section may be used. All direcitives are evaluated in the declararion order, the last ones overriding previous ones. **`trace `** ```haproxy trace ``` Configures on "trace" subsystem. Each of them can be found in the management manual, and follow the exact same syntax. Any output that the "trace" command would produce will be emitted during the parsing step of the section. Most of the time these will be errors and warnings, but certain incomplete commands might list permissible choices. This command is not meant for regular use, it will generally only be suggested by developers along complex debugging sessions. It is important to keep in mind that depending on the trace level and details, enabling traces can severely degrade the global performance. Please refer to the management manual for the statements syntax. Example: ```text ring buf1 size 10485760 # 10MB format timed backing-file /tmp/h1.traces ring buf2 size 10485760 # 10MB format timed backing-file /tmp/h2.traces traces trace h1 sink buf1 level developer verbosity complete start now trace h2 sink buf1 level developer verbosity complete start now ``` ## 12.2. Userlists {#section-12-2} It is possible to control access to frontend/backend/listen sections or to http stats by allowing only authenticated and authorized users. To do this, it is required to create at least one userlist and to define users. **`userlist `** ```haproxy userlist ``` Creates new userlist with name ``. Many independent userlists can be used to store authentication & authorization data for independent customers. **`group [users ,,(...)]`** ```haproxy group [users ,,(...)] ``` Adds group `` to the current userlist. It is also possible to attach users to this group by using a comma separated list of names proceeded by "users" keyword. **`user [password|insecure-password ]`** ```haproxy user [password|insecure-password ] [groups ,,(...)] ``` Adds user `` to the current userlist. Both secure (encrypted) and insecure (unencrypted) passwords can be used. Encrypted passwords are evaluated using the crypt(3) function, so depending on the system's capabilities, different algorithms are supported. For example, modern Glibc based Linux systems support MD5, SHA-256, SHA-512, and, of course, the classic DES-based method of encrypting passwords. Attention: Be aware that using encrypted passwords might cause significantly increased CPU usage, depending on the number of requests, and the algorithm used. For any of the hashed variants, the password for each request must be processed through the chosen algorithm, before it can be compared to the value specified in the config file. Most current algorithms are deliberately designed to be expensive to compute to achieve resistance against brute force attacks. They do not simply salt/hash the clear text password once, but thousands of times. This can quickly become a major factor in HAProxy's overall CPU consumption, and can even lead to application crashes! To address the high CPU usage of hash functions, one approach is to reduce the number of rounds of the hash function (SHA family algorithms) or decrease the "cost" of the function, if the algorithm supports it. As a side note, musl (e.g. Alpine Linux) implementations are known to be slower than their glibc counterparts when calculating hashes, so you might want to consider this aspect too. All passwords are considered normal arguments and are therefore subject to regular [section 2.2](/docs/haproxy/configuration-basics/#section-2-2) Quoting and escaping. Single quoting passwords is therefore recommended. Example: ```text userlist L1 group G1 users tiger,scott group G2 users xdb,scott user tiger password $6$k6y3o.eP$JlKBx9za9667qe4(...)xHSwRv6J.C0/D7cV91 user scott insecure-password 'elgato' user xdb insecure-password 'hello' userlist L2 group G1 group G2 user tiger password $6$k6y3o.eP$JlKBx(...)xHSwRv6J.C0/D7cV91 groups G1 user scott insecure-password 'elgato' groups G1,G2 user xdb insecure-password 'hello' groups G2 ``` Please note that both lists are functionally identical. ## 12.3. Mailers {#section-12-3} It is possible to send email alerts when the state of servers changes. If configured email alerts are sent to each mailer that is configured in a mailers section. Email is sent to mailers through Lua (see examples/lua/mailers.lua). **`mailers `** ```haproxy mailers ``` Creates a new mailer list with the name ``. It is an independent section which is referenced by one or more proxies. **`mailer :`** ```haproxy mailer : ``` Defines a mailer inside a mailers section. Example: ```text global # mailers.lua file as provided in the git repository # adjust path as needed lua-load examples/lua/mailers.lua mailers mymailers mailer smtp1 192.168.0.1:587 mailer smtp2 192.168.0.2:587 backend mybackend mode tcp balance roundrobin email-alert mailers mymailers email-alert from test1@horms.org email-alert to test2@horms.org server srv1 192.168.0.30:80 server srv2 192.168.0.31:80 ``` **`timeout mail