Reference

Configuration file reference

At startup, the HAProxy Data Plane API reads its YAML configuration file to determine how to run. This file allows you to set various parameters that control the behavior of the API and its interaction with HAProxy. It’s structured into several sections, each corresponding to a different aspect of the Data Plane API’s functionality.

Edit the configuration file Jump to heading

To edit the API’s configuration file:

  • For Data Plane API 2.8 and beyond, edit the file /etc/haproxy/dataplaneapi.yml.
  • For Data Plane API 2.7 and earlier, edit the file /etc/haproxy/dataplaneapi.hcl.
  • For Data Plane API version 2.8 and beyond, edit the configuration file /etc/hapee-extras/dataplaneapi.yml.
  • For Data Plane API version 2.7 and earlier, edit the configuration file /etc/hapee-extras/dataplaneapi.hcl.
  • From the Tools tab, use the File Manager to edit the file /app/management/var/lib/dataplaneapi/dataplaneapi.yaml.
  • After making changes, save the file. Then restart the dataplaneapi service on the Services tab.
  • To make your changes persistent after a reboot, click the Setup tab. Then click Save under Configuration.

Example configuration file Jump to heading

Here’s an example configuration file:

yaml
config_version: 2
name: haproxy-dataplaneapi
dataplaneapi:
host: 0.0.0.0
port: 5555
scheme:
- http
users:
name: admin
password: adminpwd
insecure: true
transaction:
transaction_dir: /etc/haproxy/transactions
backups_number: 10
backups_dir: /etc/haproxy/backups
max_open_transactions: 10
resources:
maps_dir: /etc/haproxy/maps
ssl_certs_dir: /etc/haproxy/ssl
general_storage_dir: /etc/haproxy/general
spoe_dir: /etc/haproxy/spoe
dataplane_storage_dir: /etc/haproxy/dataplane
haproxy:
config_file: /etc/haproxy/haproxy.cfg
haproxy_bin: /usr/sbin/haproxy
master_worker_mode: true
master_runtime: /var/run/haproxy/master.sock
reload:
reload_delay: 5
service_name: haproxy
reload_strategy: systemd
log_targets:
- log_to: file
log_file: /var/log/haproxy-dataplaneapi.log
log_level: info
log_types:
- access
- app
yaml
config_version: 2
name: haproxy-dataplaneapi
dataplaneapi:
host: 0.0.0.0
port: 5555
scheme:
- http
users:
name: admin
password: adminpwd
insecure: true
transaction:
transaction_dir: /etc/haproxy/transactions
backups_number: 10
backups_dir: /etc/haproxy/backups
max_open_transactions: 10
resources:
maps_dir: /etc/haproxy/maps
ssl_certs_dir: /etc/haproxy/ssl
general_storage_dir: /etc/haproxy/general
spoe_dir: /etc/haproxy/spoe
dataplane_storage_dir: /etc/haproxy/dataplane
haproxy:
config_file: /etc/haproxy/haproxy.cfg
haproxy_bin: /usr/sbin/haproxy
master_worker_mode: true
master_runtime: /var/run/haproxy/master.sock
reload:
reload_delay: 5
service_name: haproxy
reload_strategy: systemd
log_targets:
- log_to: file
log_file: /var/log/haproxy-dataplaneapi.log
log_level: info
log_types:
- access
- app

Top-level options Jump to heading

The HAProxy Data Plane API supports the following top-level configuration file options.

config_version Jump to heading

The file`s configuration version.

  • Parent: none
  • Type: integer
  • Required: false
dataplaneapi.yml
nix
config_version: 2
dataplaneapi.yml
nix
config_version: 2

name Jump to heading

A name to assign to this API server.

  • Parent: none
  • Type: string
  • Required: false
dataplaneapi.yml
nix
name: famous_condor
dataplaneapi.yml
nix
name: famous_condor

dataplaneapi options Jump to heading

The HAProxy Data Plane API supports the following configuration file options in its dataplaneapi section.

advertised Jump to heading

Contains settings for the advertised API address and port.

  • Parent: dataplaneapi
  • Type: object
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
advertised:
api_address: 10.2.3.4
api_port: 80
dataplaneapi.yml
nix
dataplaneapi:
advertised:
api_address: 10.2.3.4
api_port: 80

cleanup_timeout Jump to heading

Sets the timeout for cleanup operations.

  • Parent: dataplaneapi
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
cleanup_timeout: "10s"
dataplaneapi.yml
nix
dataplaneapi:
cleanup_timeout: "10s"

debug_socket_path Jump to heading

Defines the path for the debugging command socket.

  • Parent: dataplaneapi
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
debug_socket_path: "/var/run/dataplane-debug.sock"
dataplaneapi.yml
nix
dataplaneapi:
debug_socket_path: "/var/run/dataplane-debug.sock"

disable_inotify Jump to heading

Disables the inotify watcher for the configuration file.

  • Parent: dataplaneapi
  • Type: boolean
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
disable_inotify: false
dataplaneapi.yml
nix
dataplaneapi:
disable_inotify: false

gid Jump to heading

Group id value to set on start.

  • Parent: dataplaneapi
  • Type: integer
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
gid: 1000
dataplaneapi.yml
nix
dataplaneapi:
gid: 1000

graceful_timeout Jump to heading

Sets the graceful shutdown timeout.

  • Parent: dataplaneapi
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
graceful_timeout: "15s"
dataplaneapi.yml
nix
dataplaneapi:
graceful_timeout: "15s"

host Jump to heading

Sets the host address for the API.

  • Parent: dataplaneapi
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
host: "localhost"
dataplaneapi.yml
nix
dataplaneapi:
host: "localhost"

listen_limit Jump to heading

Sets the maximum number of connections the API can handle

  • Parent: dataplaneapi
  • Type: integer
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
listen_limit: 1024
dataplaneapi.yml
nix
dataplaneapi:
listen_limit: 1024

max_header_size Jump to heading

Defines the maximum header size for API requests.

  • Parent: dataplaneapi
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
max_header_size: "1MiB"
dataplaneapi.yml
nix
dataplaneapi:
max_header_size: "1MiB"

pid_file Jump to heading

Specifies the path to the file where the API`s PID will be written.

  • Parent: dataplaneapi
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
pid_file: /tmp/dataplane.pid
dataplaneapi.yml
nix
dataplaneapi:
pid_file: /tmp/dataplane.pid

port Jump to heading

Defines the port number for the API.

  • Parent: dataplaneapi
  • Type: integer
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
port: 80
dataplaneapi.yml
nix
dataplaneapi:
port: 80

read_timeout Jump to heading

Specifies the read timeout for API requests.

  • Parent: dataplaneapi
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
read_timeout: "30s"
dataplaneapi.yml
nix
dataplaneapi:
read_timeout: "30s"

resources Jump to heading

Contains settings for resources.

  • Parent: dataplaneapi
  • Type: object
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
resources:
maps_dir: "/etc/haproxy/maps"
ssl_certs_dir: "/etc/haproxy/ssl"
update_map_files: false
update_map_files_period: 10
spoe_dir: "/etc/haproxy/spoe"
spoe_transaction_dir: "/tmp/spoe-haproxy"
dataplane_storage_dir: "/etc/haproxy/general"
dataplaneapi.yml
nix
dataplaneapi:
resources:
maps_dir: "/etc/haproxy/maps"
ssl_certs_dir: "/etc/haproxy/ssl"
update_map_files: false
update_map_files_period: 10
spoe_dir: "/etc/haproxy/spoe"
spoe_transaction_dir: "/tmp/spoe-haproxy"
dataplane_storage_dir: "/etc/haproxy/general"

scheme Jump to heading

Enabled listeners.

  • Parent: dataplaneapi
  • Type: array of strings
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
scheme:
- http
dataplaneapi.yml
nix
dataplaneapi:
scheme:
- http

show_system_info Jump to heading

Enables or disables the display of system information on the info endpoint.

  • Parent: dataplaneapi
  • Type: boolean
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
show_system_info: false
dataplaneapi.yml
nix
dataplaneapi:
show_system_info: false

socket_path Jump to heading

Specifies the path to the API`s Unix socket

  • Parent: dataplaneapi
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
socket_path: "/var/run/data-plane.sock"
dataplaneapi.yml
nix
dataplaneapi:
socket_path: "/var/run/data-plane.sock"

tls Jump to heading

Contains settings for TLS encryption.

  • Parent: dataplaneapi
  • Type: object
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_host: 0.0.0.0
tls_port: 5555
tls_certificate: /etc/ssl/frontends/default/crt.pem
tls_key: /etc/ssl/frontends/default/key.pem
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_host: 0.0.0.0
tls_port: 5555
tls_certificate: /etc/ssl/frontends/default/crt.pem
tls_key: /etc/ssl/frontends/default/key.pem

transaction Jump to heading

Contains settings for transactions.

  • Parent: dataplaneapi
  • Type: object
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
transaction:
transaction_dir: "/tmp/haproxy"
backups_number: 3
backups_dir: /tmp/backups
max_open_transactions: 20
dataplaneapi.yml
nix
dataplaneapi:
transaction:
transaction_dir: "/tmp/haproxy"
backups_number: 3
backups_dir: /tmp/backups
max_open_transactions: 20

uid Jump to heading

User id value to set on start.

  • Parent: dataplaneapi
  • Type: integer
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
uid: 1000
dataplaneapi.yml
nix
dataplaneapi:
uid: 1000

user Jump to heading

List of users.

  • Parent: dataplaneapi
  • Type: array of objects
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
user:
- name: admin
insecure: true
password: adminpwd
dataplaneapi.yml
nix
dataplaneapi:
user:
- name: admin
insecure: true
password: adminpwd

userlist Jump to heading

Contains settings for userlist.

  • Parent: dataplaneapi
  • Type: object
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
userlist: myuserlist
userlist_file: /etc/haproxy/userlist.cfg
dataplaneapi.yml
nix
dataplaneapi:
userlist: myuserlist
userlist_file: /etc/haproxy/userlist.cfg

write_timeout Jump to heading

Specifies the write timeout for API requests.

  • Parent: dataplaneapi
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
write_timeout: "60s"
dataplaneapi.yml
nix
dataplaneapi:
write_timeout: "60s"

dataplaneapi.advertised options Jump to heading

The HAProxy Data Plane API supports the following configuration file options in its dataplaneapi.advertised section.

api_address Jump to heading

The advertised API address.

  • Parent: dataplaneapi.advertised
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
advertised:
api_address: 10.2.3.4
dataplaneapi.yml
nix
dataplaneapi:
advertised:
api_address: 10.2.3.4

api_port Jump to heading

The advertised API port.

  • Parent: dataplaneapi.advertised
  • Type: integer
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
advertised:
api_port: 80
dataplaneapi.yml
nix
dataplaneapi:
advertised:
api_port: 80

dataplaneapi.tls options Jump to heading

The HAProxy Data Plane API supports the following configuration file options in its dataplaneapi.tls section.

tls_ca Jump to heading

Path to the TLS CA certificate file.

  • Parent: dataplaneapi.tls
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_ca: /etc/ssl/frontends/default/ca.pem
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_ca: /etc/ssl/frontends/default/ca.pem

tls_certificate Jump to heading

Path to the TLS certificate file.

  • Parent: dataplaneapi.tls
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_certificate: /etc/ssl/frontends/default/crt.pem
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_certificate: /etc/ssl/frontends/default/crt.pem

tls_host Jump to heading

The host address for TLS connections.

  • Parent: dataplaneapi.tls
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_host: 0.0.0.0
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_host: 0.0.0.0

tls_keep_alive Jump to heading

The keep-alive timeout for TLS connections.

  • Parent: dataplaneapi.tls
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_keep_alive: 1m
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_keep_alive: 1m

tls_key Jump to heading

Path to the TLS certificate key file.

  • Parent: dataplaneapi.tls
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_key: /etc/ssl/frontends/default/key.pem
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_key: /etc/ssl/frontends/default/key.pem

tls_listen_limit Jump to heading

The maximum number of TLS connections.

  • Parent: dataplaneapi.tls
  • Type: integer
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_listen_limit: 10
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_listen_limit: 10

tls_port Jump to heading

The port number for TLS connections.

  • Parent: dataplaneapi.tls
  • Type: integer
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_port: 5555
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_port: 5555

tls_read_timeout Jump to heading

The read timeout for TLS connections.

  • Parent: dataplaneapi.tls
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_read_timeout: 10s
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_read_timeout: 10s

tls_write_timeout Jump to heading

The write timeout for TLS connections.

  • Parent: dataplaneapi.tls
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_write_timeout: 10s
dataplaneapi.yml
nix
dataplaneapi:
tls:
tls_write_timeout: 10s

dataplaneapi.userlist options Jump to heading

The HAProxy Data Plane API supports the following configuration file options in its dataplaneapi.userlist section.

userlist Jump to heading

Userlist in HAProxy configuration to use for API Basic Authentication.

  • Parent: dataplaneapi.userlist
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
userlist:
userlist: controller
dataplaneapi.yml
nix
dataplaneapi:
userlist:
userlist: controller

userlist_file Jump to heading

Path to the dataplaneapi userlist file.

  • Parent: dataplaneapi.userlist
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
userlist:
userlist_file: /etc/haproxy/userlist.cfg
dataplaneapi.yml
nix
dataplaneapi:
userlist:
userlist_file: /etc/haproxy/userlist.cfg

dataplaneapi.transaction options Jump to heading

The HAProxy Data Plane API supports the following configuration file options in its dataplaneapi.transaction section.

backups_dir Jump to heading

Path to directory in which to place backup files.

  • Parent: dataplaneapi.transaction
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
transaction:
backups_dir: /tmp/backups
dataplaneapi.yml
nix
dataplaneapi:
transaction:
backups_dir: /tmp/backups

backups_number Jump to heading

Number of backup configuration files to keep.

  • Parent: dataplaneapi.transaction
  • Type: integer
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
transaction:
backups_number: 10
dataplaneapi.yml
nix
dataplaneapi:
transaction:
backups_number: 10

max_open_transactions Jump to heading

Limit for active transaction in pending state.

  • Parent: dataplaneapi.transaction
  • Type: integer
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
transaction:
max_open_transactions: 20
dataplaneapi.yml
nix
dataplaneapi:
transaction:
max_open_transactions: 20

transaction_dir Jump to heading

Path to the transaction directory.

  • Parent: dataplaneapi.transaction
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
transaction:
transaction_dir: "/tmp/haproxy"
dataplaneapi.yml
nix
dataplaneapi:
transaction:
transaction_dir: "/tmp/haproxy"

dataplaneapi.resources options Jump to heading

The HAProxy Data Plane API supports the following configuration file options in its dataplaneapi.resources section.

dataplane_storage_dir Jump to heading

Path to dataplane internal storage directory.

  • Parent: dataplaneapi.resources
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
resources:
dataplane_storage_dir: /etc/haproxy/dataplane
dataplaneapi.yml
nix
dataplaneapi:
resources:
dataplane_storage_dir: /etc/haproxy/dataplane

general_storage_dir Jump to heading

Path to general storage directory.

  • Parent: dataplaneapi.resources
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
resources:
general_storage_dir: /etc/haproxy/general
dataplaneapi.yml
nix
dataplaneapi:
resources:
general_storage_dir: /etc/haproxy/general

maps_dir Jump to heading

Path to directory of map files managed by dataplane.

  • Parent: dataplaneapi.resources
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
resources:
maps_dir: "/etc/haproxy/maps"
dataplaneapi.yml
nix
dataplaneapi:
resources:
maps_dir: "/etc/haproxy/maps"

spoe_dir Jump to heading

Path to SPOE directory.

  • Parent: dataplaneapi.resources
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
resources:
spoe_dir: "/etc/haproxy/spoe"
dataplaneapi.yml
nix
dataplaneapi:
resources:
spoe_dir: "/etc/haproxy/spoe"

spoe_transaction_dir Jump to heading

Path to the SPOE transaction directory.

  • Parent: dataplaneapi.resources
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
resources:
spoe_transaction_dir: "/tmp/spoe-haproxy"
dataplaneapi.yml
nix
dataplaneapi:
resources:
spoe_transaction_dir: "/tmp/spoe-haproxy"

ssl_certs_dir Jump to heading

Path to SSL certificates directory.

  • Parent: dataplaneapi.resources
  • Type: string
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
resources:
ssl_certs_dir: "/etc/haproxy/ssl"
dataplaneapi.yml
nix
dataplaneapi:
resources:
ssl_certs_dir: "/etc/haproxy/ssl"

update_map_files Jump to heading

Flag used for syncing map files with runtime maps values.

  • Parent: dataplaneapi.resources
  • Type: boolean
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
resources:
update_map_files: false
dataplaneapi.yml
nix
dataplaneapi:
resources:
update_map_files: false

update_map_files_period Jump to heading

Elapsed time in seconds between two maps syncing operations.

  • Parent: dataplaneapi.resources
  • Type: integer
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
resources:
update_map_files_period: 10
dataplaneapi.yml
nix
dataplaneapi:
resources:
update_map_files_period: 10

dataplaneapi.user options Jump to heading

The HAProxy Data Plane API supports the following configuration file options in its dataplaneapi.user section.

insecure Jump to heading

Insecure password.

  • Parent: dataplaneapi.user
  • Type: boolean
  • Required: false
dataplaneapi.yml
nix
dataplaneapi:
user:
- name: admin
insecure: true
password: adminpwd
dataplaneapi.yml
nix
dataplaneapi:
user:
- name: admin
insecure: true
password: adminpwd

name Jump to heading

User name.

  • Parent: dataplaneapi.user
  • Type: string
  • Required: true
dataplaneapi.yml
nix
dataplaneapi:
user:
- name: admin
insecure: true
password: adminpwd
dataplaneapi.yml
nix
dataplaneapi:
user:
- name: admin
insecure: true
password: adminpwd

password Jump to heading

Password.

  • Parent: dataplaneapi.user
  • Type: string
  • Required: true
dataplaneapi.yml
nix
dataplaneapi:
user:
- name: admin
insecure: true
password: adminpwd
dataplaneapi.yml
nix
dataplaneapi:
user:
- name: admin
insecure: true
password: adminpwd

haproxy options Jump to heading

The HAProxy Data Plane API supports the following configuration file options in its haproxy section.

config_file Jump to heading

Path to the HAProxy configuration file.

  • Parent: haproxy
  • Type: string
  • Required: false
dataplaneapi.yml
nix
haproxy:
config_file: /etc/haproxy/haproxy.cfg
dataplaneapi.yml
nix
haproxy:
config_file: /etc/haproxy/haproxy.cfg

delayed_start_max Jump to heading

Maximum duration to wait for the haproxy runtime socket to be ready.

  • Parent: haproxy
  • Type: string
  • Required: false
dataplaneapi.yml
nix
haproxy:
delayed_start_max: 30s
dataplaneapi.yml
nix
haproxy:
delayed_start_max: 30s

delayed_start_tick Jump to heading

Duration between checks for the haproxy runtime socket to be ready.

  • Parent: haproxy
  • Type: string
  • Required: false
dataplaneapi.yml
nix
haproxy:
delayed_start_tick: 500ms
dataplaneapi.yml
nix
haproxy:
delayed_start_tick: 500ms

fid Jump to heading

Path to file that the Data Plane API will use to write its ID.

  • Parent: haproxy
  • Type: string
  • Required: false
dataplaneapi.yml
nix
haproxy:
fid: /etc/haproxy/fid
dataplaneapi.yml
nix
haproxy:
fid: /etc/haproxy/fid

haproxy_bin Jump to heading

Path to the HAProxy binary file.

  • Parent: haproxy
  • Type: string
  • Required: false
dataplaneapi.yml
nix
haproxy:
haproxy_bin: /usr/local/sbin/haproxy
dataplaneapi.yml
nix
haproxy:
haproxy_bin: /usr/local/sbin/haproxy

master_runtime Jump to heading

Path to the master Runtime API socket.

  • Parent: haproxy
  • Type: string
  • Required: false
dataplaneapi.yml
nix
haproxy:
master_runtime: /var/lib/haproxy/master
dataplaneapi.yml
nix
haproxy:
master_runtime: /var/lib/haproxy/master

master_worker_mode Jump to heading

Flag to enable helpers when running HAProxy in master worker mode.

  • Parent: haproxy
  • Type: boolean
  • Required: false
dataplaneapi.yml
nix
haproxy:
master_worker_mode: false
dataplaneapi.yml
nix
haproxy:
master_worker_mode: false

reload Jump to heading

Contains settings for reloading HAProxy.

  • Parent: haproxy
  • Type: object
  • Required: false
dataplaneapi.yml
nix
haproxy:
reload:
reload_delay: 5
reload_cmd: "systemctl reload haproxy"
restart_cmd: "systemctl restart haproxy"
status_cmd: "systemctl status haproxy"
service_name: "haproxy.service"
reload_retention: 1
reload_strategy: custom
validate_cmd: /usr/local/bin/validate-haproxy.sh
dataplaneapi.yml
nix
haproxy:
reload:
reload_delay: 5
reload_cmd: "systemctl reload haproxy"
restart_cmd: "systemctl restart haproxy"
status_cmd: "systemctl status haproxy"
service_name: "haproxy.service"
reload_retention: 1
reload_strategy: custom
validate_cmd: /usr/local/bin/validate-haproxy.sh

haproxy.reload options Jump to heading

The HAProxy Data Plane API supports the following configuration file options in its haproxy.reload section.

reload_cmd Jump to heading

Reload command.

  • Parent: haproxy.reload
  • Type: string
  • Required: false
dataplaneapi.yml
nix
haproxy:
reload:
reload_cmd: "systemctl reload haproxy"
dataplaneapi.yml
nix
haproxy:
reload:
reload_cmd: "systemctl reload haproxy"

reload_delay Jump to heading

Minimum delay between two reloads (in seconds).

  • Parent: haproxy.reload
  • Type: integer
  • Required: false
dataplaneapi.yml
nix
haproxy:
reload:
reload_delay: 5
dataplaneapi.yml
nix
haproxy:
reload:
reload_delay: 5

reload_retention Jump to heading

Reload retention in days.

  • Parent: haproxy.reload
  • Type: integer
  • Required: false
dataplaneapi.yml
nix
haproxy:
reload:
reload_retention: 1
dataplaneapi.yml
nix
haproxy:
reload:
reload_retention: 1

reload_strategy Jump to heading

The value can be systemd, s6 or custom.

  • Parent: haproxy.reload
  • Type: string
  • Required: false
dataplaneapi.yml
nix
haproxy:
reload:
reload_strategy: custom
dataplaneapi.yml
nix
haproxy:
reload:
reload_strategy: custom

restart_cmd Jump to heading

Restart command.

  • Parent: haproxy.reload
  • Type: string
  • Required: false
dataplaneapi.yml
nix
haproxy:
reload:
restart_cmd: "systemctl restart haproxy"
dataplaneapi.yml
nix
haproxy:
reload:
restart_cmd: "systemctl restart haproxy"

service_name Jump to heading

Name of the HAProxy service.

  • Parent: haproxy.reload
  • Type: string
  • Required: false
dataplaneapi.yml
nix
haproxy:
reload:
service_name: "haproxy.service"
dataplaneapi.yml
nix
haproxy:
reload:
service_name: "haproxy.service"

status_cmd Jump to heading

Status command.

  • Parent: haproxy.reload
  • Type: string
  • Required: false
dataplaneapi.yml
nix
haproxy:
reload:
status_cmd: "systemctl status haproxy"
dataplaneapi.yml
nix
haproxy:
reload:
status_cmd: "systemctl status haproxy"

validate_cmd Jump to heading

Executes a custom command to perform the HAProxy configuration check.

  • Parent: haproxy.reload
  • Type: string
  • Required: false
dataplaneapi.yml
nix
haproxy:
reload:
validate_cmd: /usr/local/bin/validate-haproxy.sh
dataplaneapi.yml
nix
haproxy:
reload:
validate_cmd: /usr/local/bin/validate-haproxy.sh

log_targets options Jump to heading

The log_targets section lets you to define multiple destinations for log messages. Each element in the log_targets array is an object that defines a specific log target. Each log target object can have the following properties:

log_file Jump to heading

Location of the log file.

  • Parent: log_targets
  • Type: string
  • Required: false
dataplaneapi.yml
nix
log_targets:
- log_to: file
log_file: /var/log/dataplaneapi.log
log_level: info
log_format: text
log_types:
- app
dataplaneapi.yml
nix
log_targets:
- log_to: file
log_file: /var/log/dataplaneapi.log
log_level: info
log_format: text
log_types:
- app

log_format Jump to heading

Logging format, allowed values are text, JSON.

  • Parent: log_targets
  • Type: string
  • Required: false
dataplaneapi.yml
nix
log_targets:
- log_to: file
log_file: /var/log/dataplaneapi.log
log_level: info
log_format: text
log_types:
- app
dataplaneapi.yml
nix
log_targets:
- log_to: file
log_file: /var/log/dataplaneapi.log
log_level: info
log_format: text
log_types:
- app

log_level Jump to heading

Logging level, allowed values are trace, debug, info, warning, error.

  • Parent: log_targets
  • Type: string
  • Required: false
dataplaneapi.yml
nix
log_targets:
- log_to: file
log_file: /var/log/dataplaneapi.log
log_level: info
log_format: text
log_types:
- app
dataplaneapi.yml
nix
log_targets:
- log_to: file
log_file: /var/log/dataplaneapi.log
log_level: info
log_format: text
log_types:
- app

log_to Jump to heading

Log target, can be stdout, file, or syslog.

  • Parent: log_targets
  • Type: string
  • Required: false
dataplaneapi.yml
nix
log_targets:
- log_to: stdout
log_level: debug
log_format: json
log_types:
- access
- app
dataplaneapi.yml
nix
log_targets:
- log_to: stdout
log_level: debug
log_format: json
log_types:
- access
- app

log_types Jump to heading

Define which log types to log to this target, allowed values are app, access.

  • Parent: log_targets
  • Type: array of strings
  • Required: false
dataplaneapi.yml
nix
log_targets:
- log_to: stdout
log_level: debug
log_format: json
log_types:
- access
- app
dataplaneapi.yml
nix
log_targets:
- log_to: stdout
log_level: debug
log_format: json
log_types:
- access
- app

syslog_address Jump to heading

Syslog address (with port declaration in case of TCP type) where logs should be forwarded. It accepts the socket path in case of unix or unixgram.

  • Parent: log_targets
  • Type: string
  • Required: false
dataplaneapi.yml
nix
log_targets:
- log_to: syslog
log_level: info
syslog_address: 127.0.0.1
syslog_protocol: tcp
syslog_tag: dataplaneapi
syslog_level: debug
syslog_facility: local0
log_types:
- access
dataplaneapi.yml
nix
log_targets:
- log_to: syslog
log_level: info
syslog_address: 127.0.0.1
syslog_protocol: tcp
syslog_tag: dataplaneapi
syslog_level: debug
syslog_facility: local0
log_types:
- access

syslog_facility Jump to heading

Define the Syslog facility number, allowed values are kern, user, mail, daemon, auth, syslog, lpr, news, uucp, cron, authpriv, ftp, local0, local1, local2, local3, local4, local5, local6, local7

  • Parent: log_targets
  • Type: string
  • Required: false
dataplaneapi.yml
nix
log_targets:
- log_to: syslog
log_level: info
syslog_address: 127.0.0.1
syslog_protocol: tcp
syslog_tag: dataplaneapi
syslog_level: debug
syslog_facility: local0
log_types:
- access
dataplaneapi.yml
nix
log_targets:
- log_to: syslog
log_level: info
syslog_address: 127.0.0.1
syslog_protocol: tcp
syslog_tag: dataplaneapi
syslog_level: debug
syslog_facility: local0
log_types:
- access

syslog_level Jump to heading

Define the required syslog messages level, allowed values are debug, info, notice, warning, error, critical, alert, emergency.

  • Parent: log_targets
  • Type: string
  • Required: false
dataplaneapi.yml
nix
log_targets:
- log_to: syslog
log_level: info
syslog_address: 127.0.0.1
syslog_protocol: tcp
syslog_tag: dataplaneapi
syslog_level: debug
syslog_facility: local0
log_types:
- access
dataplaneapi.yml
nix
log_targets:
- log_to: syslog
log_level: info
syslog_address: 127.0.0.1
syslog_protocol: tcp
syslog_tag: dataplaneapi
syslog_level: debug
syslog_facility: local0
log_types:
- access

syslog_protocol Jump to heading

Syslog server protocol, allowed values are tcp, tcp4, tcp6, unix, unixgram.

  • Parent: log_targets
  • Type: string
  • Required: false
dataplaneapi.yml
nix
log_targets:
- log_to: syslog
log_level: info
syslog_address: 127.0.0.1
syslog_protocol: tcp
syslog_tag: dataplaneapi
syslog_level: debug
syslog_facility: local0
log_types:
- access
dataplaneapi.yml
nix
log_targets:
- log_to: syslog
log_level: info
syslog_address: 127.0.0.1
syslog_protocol: tcp
syslog_tag: dataplaneapi
syslog_level: debug
syslog_facility: local0
log_types:
- access

syslog_tag Jump to heading

String to tag the syslog messages.

  • Parent: log_targets
  • Type: string
  • Required: false
dataplaneapi.yml
nix
log_targets:
- log_to: syslog
log_level: info
syslog_address: 127.0.0.1
syslog_protocol: tcp
syslog_tag: dataplaneapi
syslog_level: debug
syslog_facility: local0
log_types:
- access
dataplaneapi.yml
nix
log_targets:
- log_to: syslog
log_level: info
syslog_address: 127.0.0.1
syslog_protocol: tcp
syslog_tag: dataplaneapi
syslog_level: debug
syslog_facility: local0
log_types:
- access

Do you have any suggestions on how we can improve the content of this page?