Reference
Configuration file reference
At startup, HAProxy Data Plane API reads its YAML configuration file to determine how to run. This file allows you to set various directives 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 HAProxy 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.
yamlconfig_version: 2name: famous_condor # stringdataplaneapi:scheme: # []string- httpcleanup_timeout: "10s" # time.Durationgraceful_timeout: "15s" # time.Durationmax_header_size: "1MiB" # flagext.ByteSizemax_body_size: "1GiB" # flagext.ByteSizesocket_path: "/var/run/data-plane.sock" # flags.Filenamedebug_socket_path: "/var/run/dataplane-debug.sock" #stringhost: "localhost" # stringport: 80 # intlisten_limit: 1024 # intkeep_alive: "3m" # time.Durationread_timeout: "30s" # time.Durationwrite_timeout: "60s" # time.Durationshow_system_info: false # booldisable_inotify: false # boolpid_file: /tmp/dataplane.pid # stringuid: 1000 # intgid: 1000 # inttls:tls_host: null # stringtls_port: 6443 # inttls_certificate: /etc/haproxy/ssl/certs/server-cert.pem # flags.Filenametls_key: /etc/haproxy/ssl/certs/server-key.pem # flags.Filenametls_ca: null # flags.Filenametls_listen_limit: 10 # inttls_keep_alive: 1m # time.Durationtls_read_timeout: 10s # time.Durationtls_write_timeout: 10s # time.Durationuser:- name: admin # stringinsecure: true # boolpassword: adminpwd # stringuserlist:userlist: "dataplaneapi" # stringuserlist_file: /etc/haproxy/haproxy.cfg # stringtransaction:transaction_dir: /tmp/haproxy # stringbackups_number: 0 # intbackups_dir: /tmp/backups # stringmax_open_transactions: 20 # int64resources:maps_dir: "/etc/haproxy/maps" # stringssl_certs_dir: "/etc/haproxy/ssl" # stringupdate_map_files: false # boolupdate_map_files_period: 10 # int64spoe_dir: "/etc/haproxy/spoe" # stringspoe_transaction_dir: /tmp/spoe-haproxy # stringdataplane_storage_dir: "/etc/haproxy/general" # stringadvertised:api_address: 10.2.3.4 # stringapi_port: 80 # int64haproxy:config_file: "/etc/haproxy/haproxy.cfg" # stringhaproxy_bin: "haproxy" # stringmaster_runtime: null # stringfid: null # stringmaster_worker_mode: false # booldelayed_start_max: 30s # time.Durationdelayed_start_tick: 500ms # time.Durationpreferred_time_suffix: nearest # enum [nearest, none, ms, s, m, h, d]reload:reload_delay: 5 # intreload_cmd: "systemctl reload haproxy"restart_cmd: "systemctl restart haproxy"status_cmd: "systemctl status haproxy"service_name: "haproxy.service"reload_retention: 1 # intreload_strategy: customvalidate_cmd: null # stringvalidate_files_before:- "/etc/haproxy/global.def"validate_files_after: [] # []stringlog_targets:- log_to: stdoutlog_level: debuglog_format: jsonlog_types:- access- app- log_to: filelog_file: /var/log/dataplanepi.loglog_level: infolog_format: textlog_types:- app- log_to: sysloglog_level: infosyslog_address: 127.0.0.1syslog_protocol: tcpsyslog_tag: dataplaneapisyslog_level: debugsyslog_facility: local0log_types:- access
yamlconfig_version: 2name: famous_condor # stringdataplaneapi:scheme: # []string- httpcleanup_timeout: "10s" # time.Durationgraceful_timeout: "15s" # time.Durationmax_header_size: "1MiB" # flagext.ByteSizemax_body_size: "1GiB" # flagext.ByteSizesocket_path: "/var/run/data-plane.sock" # flags.Filenamedebug_socket_path: "/var/run/dataplane-debug.sock" #stringhost: "localhost" # stringport: 80 # intlisten_limit: 1024 # intkeep_alive: "3m" # time.Durationread_timeout: "30s" # time.Durationwrite_timeout: "60s" # time.Durationshow_system_info: false # booldisable_inotify: false # boolpid_file: /tmp/dataplane.pid # stringuid: 1000 # intgid: 1000 # inttls:tls_host: null # stringtls_port: 6443 # inttls_certificate: /etc/haproxy/ssl/certs/server-cert.pem # flags.Filenametls_key: /etc/haproxy/ssl/certs/server-key.pem # flags.Filenametls_ca: null # flags.Filenametls_listen_limit: 10 # inttls_keep_alive: 1m # time.Durationtls_read_timeout: 10s # time.Durationtls_write_timeout: 10s # time.Durationuser:- name: admin # stringinsecure: true # boolpassword: adminpwd # stringuserlist:userlist: "dataplaneapi" # stringuserlist_file: /etc/haproxy/haproxy.cfg # stringtransaction:transaction_dir: /tmp/haproxy # stringbackups_number: 0 # intbackups_dir: /tmp/backups # stringmax_open_transactions: 20 # int64resources:maps_dir: "/etc/haproxy/maps" # stringssl_certs_dir: "/etc/haproxy/ssl" # stringupdate_map_files: false # boolupdate_map_files_period: 10 # int64spoe_dir: "/etc/haproxy/spoe" # stringspoe_transaction_dir: /tmp/spoe-haproxy # stringdataplane_storage_dir: "/etc/haproxy/general" # stringadvertised:api_address: 10.2.3.4 # stringapi_port: 80 # int64haproxy:config_file: "/etc/haproxy/haproxy.cfg" # stringhaproxy_bin: "haproxy" # stringmaster_runtime: null # stringfid: null # stringmaster_worker_mode: false # booldelayed_start_max: 30s # time.Durationdelayed_start_tick: 500ms # time.Durationpreferred_time_suffix: nearest # enum [nearest, none, ms, s, m, h, d]reload:reload_delay: 5 # intreload_cmd: "systemctl reload haproxy"restart_cmd: "systemctl restart haproxy"status_cmd: "systemctl status haproxy"service_name: "haproxy.service"reload_retention: 1 # intreload_strategy: customvalidate_cmd: null # stringvalidate_files_before:- "/etc/haproxy/global.def"validate_files_after: [] # []stringlog_targets:- log_to: stdoutlog_level: debuglog_format: jsonlog_types:- access- app- log_to: filelog_file: /var/log/dataplanepi.loglog_level: infolog_format: textlog_types:- app- log_to: sysloglog_level: infosyslog_address: 127.0.0.1syslog_protocol: tcpsyslog_tag: dataplaneapisyslog_level: debugsyslog_facility: local0log_types:- access
yamlconfig_version: 2name: lb01dataplaneapi:scheme: [https]host: 127.0.0.1port: 5555socket_path: /var/run/hapee-extras/dataplaneapi.sockdebug_socket_path: /var/run/hapee-extras/dataplaneapi-debug.socklisten_limit: 1024cleanup_timeout: 10sgraceful_timeout: 15skeep_alive: 3mread_timeout: 30swrite_timeout: 60smax_header_size: 1MiBmax_body_size: 1GiBshow_system_info: falsedisable_inotify: falsepam: falsepid_file: /run/hapee-extras-dataplaneapi.piduid: 0gid: 0tls:tls_host: 192.0.2.10tls_port: 6443tls_certificate: /etc/hapee-extras/ssl/dataplaneapi.crttls_key: /etc/hapee-extras/ssl/dataplaneapi.keytls_listen_limit: 1024tls_keep_alive: 3mtls_read_timeout: 30stls_write_timeout: 60suser:- name: admininsecure: truepassword: change-this-example-passwordtransaction:transaction_dir: /var/run/hapee-extras/dataplaneapibackups_number: 10backups_dir: /etc/hapee-3.4/backupsmax_open_transactions: 20disable_persistent_transactions: falseresources:maps_dir: /etc/hapee-3.4/mapsssl_certs_dir: /etc/hapee-3.4/sslssl_certs_aloha: falsegeneral_storage_dir: /etc/hapee-3.4/generaldataplane_storage_dir: /etc/hapee-3.4/dataplanewaf_dir: /etc/hapee-3.4update_map_files: falseupdate_map_files_period: 10spoe_dir: /etc/hapee-3.4/spoespoe_transaction_dir: /var/run/hapee-extras/dataplaneapi/spoeadvertised:api_address: lb01.example.comapi_port: 6443haproxy:config_file: /etc/hapee-3.4/hapee-lb.cfghaproxy_bin: /opt/hapee-3.4/sbin/hapee-lbmaster_runtime: /run/hapee-lb-master.sockfid: /etc/hapee-3.4/dataplane/node-idmaster_worker_mode: falsedelayed_start_max: 30sdelayed_start_tick: 500msreload:reload_strategy: customservice_name: hapee-3.4-lbreload_cmd: /usr/bin/systemctl reload hapee-3.4-lbrestart_cmd: /usr/bin/systemctl restart hapee-3.4-lbstart_cmd: /usr/bin/systemctl start hapee-3.4-lbstop_cmd: /usr/bin/systemctl stop hapee-3.4-lbstatus_cmd: /usr/bin/systemctl --quiet is-active hapee-3.4-lbreload_delay: 5reload_retention: 1validate_cmd: "" # Use the built-in HAProxy binary validator.validate_files_before:- /etc/hapee-3.4/global.cfgvalidate_files_after:- /etc/hapee-3.4/backends.cfgkeepalived:config_file: /etc/hapee-extras/hapee-vrrp.cfgstart_cmd: /usr/bin/systemctl start hapee-extras-vrrpreload_cmd: /usr/bin/systemctl reload hapee-extras-vrrprestart_cmd: /usr/bin/systemctl restart hapee-extras-vrrpstop_cmd: /usr/bin/systemctl stop hapee-extras-vrrpstatus_cmd: /usr/bin/systemctl --quiet is-active hapee-extras-vrrpgetpid_cmd: /usr/bin/pgrep hapee-vrrpsignal_cmd: /bin/killread_dump_cmd: /bin/catvalidate_cmd: /bin/sh -c '/opt/hapee-extras/sbin/hapee-vrrp --config-test -f "$KEEPALIVED_TRANSACTION_FILE"'reload_delay: 5transaction_dir: /etc/hapee-extras/keepalived/transactionsbackups_dir: /etc/hapee-extras/keepalived/backupsbackups_number: 10gslb:config_file: /etc/hapee-extras/hapee-gslb.conftransaction_dir: /etc/hapee-extras/gslb/transactionsreload_cmd: /usr/bin/systemctl reload hapee-extras-gslbrestart_cmd: /usr/bin/systemctl restart hapee-extras-gslbstart_cmd: /usr/bin/systemctl start hapee-extras-gslbstop_cmd: /usr/bin/systemctl stop hapee-extras-gslbvalidate_bin: /opt/hapee-extras/sbin/hapee-gslbbackups_dir: /etc/hapee-extras/gslb/backupsbackups_number: 10disable_save_verification: falselog_targets:- log_to: stdoutlog_level: infolog_format: textlog_types: [app]- log_to: filelog_file: /var/log/hapee-dataplaneapi.loglog_level: infolog_format: jsonacl_format: '%h %l %u %t "%m %U%q %H" %>s %b "%{Referer}i" "%{User-agent}i"'log_types: [app, access]- log_to: sysloglog_level: infolog_format: textsyslog_address: 127.0.0.1:514syslog_protocol: tcpsyslog_tag: hapee-dataplaneapisyslog_level: infosyslog_facility: local0log_types: [app, access]
yamlconfig_version: 2name: lb01dataplaneapi:scheme: [https]host: 127.0.0.1port: 5555socket_path: /var/run/hapee-extras/dataplaneapi.sockdebug_socket_path: /var/run/hapee-extras/dataplaneapi-debug.socklisten_limit: 1024cleanup_timeout: 10sgraceful_timeout: 15skeep_alive: 3mread_timeout: 30swrite_timeout: 60smax_header_size: 1MiBmax_body_size: 1GiBshow_system_info: falsedisable_inotify: falsepam: falsepid_file: /run/hapee-extras-dataplaneapi.piduid: 0gid: 0tls:tls_host: 192.0.2.10tls_port: 6443tls_certificate: /etc/hapee-extras/ssl/dataplaneapi.crttls_key: /etc/hapee-extras/ssl/dataplaneapi.keytls_listen_limit: 1024tls_keep_alive: 3mtls_read_timeout: 30stls_write_timeout: 60suser:- name: admininsecure: truepassword: change-this-example-passwordtransaction:transaction_dir: /var/run/hapee-extras/dataplaneapibackups_number: 10backups_dir: /etc/hapee-3.4/backupsmax_open_transactions: 20disable_persistent_transactions: falseresources:maps_dir: /etc/hapee-3.4/mapsssl_certs_dir: /etc/hapee-3.4/sslssl_certs_aloha: falsegeneral_storage_dir: /etc/hapee-3.4/generaldataplane_storage_dir: /etc/hapee-3.4/dataplanewaf_dir: /etc/hapee-3.4update_map_files: falseupdate_map_files_period: 10spoe_dir: /etc/hapee-3.4/spoespoe_transaction_dir: /var/run/hapee-extras/dataplaneapi/spoeadvertised:api_address: lb01.example.comapi_port: 6443haproxy:config_file: /etc/hapee-3.4/hapee-lb.cfghaproxy_bin: /opt/hapee-3.4/sbin/hapee-lbmaster_runtime: /run/hapee-lb-master.sockfid: /etc/hapee-3.4/dataplane/node-idmaster_worker_mode: falsedelayed_start_max: 30sdelayed_start_tick: 500msreload:reload_strategy: customservice_name: hapee-3.4-lbreload_cmd: /usr/bin/systemctl reload hapee-3.4-lbrestart_cmd: /usr/bin/systemctl restart hapee-3.4-lbstart_cmd: /usr/bin/systemctl start hapee-3.4-lbstop_cmd: /usr/bin/systemctl stop hapee-3.4-lbstatus_cmd: /usr/bin/systemctl --quiet is-active hapee-3.4-lbreload_delay: 5reload_retention: 1validate_cmd: "" # Use the built-in HAProxy binary validator.validate_files_before:- /etc/hapee-3.4/global.cfgvalidate_files_after:- /etc/hapee-3.4/backends.cfgkeepalived:config_file: /etc/hapee-extras/hapee-vrrp.cfgstart_cmd: /usr/bin/systemctl start hapee-extras-vrrpreload_cmd: /usr/bin/systemctl reload hapee-extras-vrrprestart_cmd: /usr/bin/systemctl restart hapee-extras-vrrpstop_cmd: /usr/bin/systemctl stop hapee-extras-vrrpstatus_cmd: /usr/bin/systemctl --quiet is-active hapee-extras-vrrpgetpid_cmd: /usr/bin/pgrep hapee-vrrpsignal_cmd: /bin/killread_dump_cmd: /bin/catvalidate_cmd: /bin/sh -c '/opt/hapee-extras/sbin/hapee-vrrp --config-test -f "$KEEPALIVED_TRANSACTION_FILE"'reload_delay: 5transaction_dir: /etc/hapee-extras/keepalived/transactionsbackups_dir: /etc/hapee-extras/keepalived/backupsbackups_number: 10gslb:config_file: /etc/hapee-extras/hapee-gslb.conftransaction_dir: /etc/hapee-extras/gslb/transactionsreload_cmd: /usr/bin/systemctl reload hapee-extras-gslbrestart_cmd: /usr/bin/systemctl restart hapee-extras-gslbstart_cmd: /usr/bin/systemctl start hapee-extras-gslbstop_cmd: /usr/bin/systemctl stop hapee-extras-gslbvalidate_bin: /opt/hapee-extras/sbin/hapee-gslbbackups_dir: /etc/hapee-extras/gslb/backupsbackups_number: 10disable_save_verification: falselog_targets:- log_to: stdoutlog_level: infolog_format: textlog_types: [app]- log_to: filelog_file: /var/log/hapee-dataplaneapi.loglog_level: infolog_format: jsonacl_format: '%h %l %u %t "%m %U%q %H" %>s %b "%{Referer}i" "%{User-agent}i"'log_types: [app, access]- log_to: sysloglog_level: infolog_format: textsyslog_address: 127.0.0.1:514syslog_protocol: tcpsyslog_tag: hapee-dataplaneapisyslog_level: infosyslog_facility: local0log_types: [app, access]
yamlconfig_version: 2name: ALOHA1dataplaneapi:host: 0.0.0.0port: 5555advertised:api_address: ""api_port: 0tls:tls_host: 0.0.0.0tls_port: 6443tls_certificate: /etc/ssl/frontends/default/crt.pemtls_key: /etc/ssl/frontends/default/key.pemscheme:- httpuserlist:userlist: controlleruserlist_file: ""transaction:transaction_dir: /app/management/var/state/dataplaneapibackups_number: 10backups_dir: /app/management/var/backups/dataplaneapiresources:maps_dir: /app/management/var/lib/dataplaneapi/mapsssl_certs_dir: /app/management/var/lib/dataplaneapi/sslgeneral_storage_dir: /app/management/var/lib/dataplaneapi/generaldataplane_storage_dir: /app/management/var/lib/dataplaneapi/storagewaf_dir: /app/management/var/lib/dataplaneapi/wafspoe_dir: /app/management/var/lib/dataplaneapi/spoespoe_transaction_dir: /app/management/var/state/dataplaneapi/spoehaproxy:reload:reload_delay: 5reload_strategy: customlog_targets:- log_to: sysloglog_level: warningsyslog_address: 127.0.0.11:514syslog_protocol: udp4syslog_tag: dataplaneapisyslog_level: warningsyslog_facility: local0log_types:- access- app
yamlconfig_version: 2name: ALOHA1dataplaneapi:host: 0.0.0.0port: 5555advertised:api_address: ""api_port: 0tls:tls_host: 0.0.0.0tls_port: 6443tls_certificate: /etc/ssl/frontends/default/crt.pemtls_key: /etc/ssl/frontends/default/key.pemscheme:- httpuserlist:userlist: controlleruserlist_file: ""transaction:transaction_dir: /app/management/var/state/dataplaneapibackups_number: 10backups_dir: /app/management/var/backups/dataplaneapiresources:maps_dir: /app/management/var/lib/dataplaneapi/mapsssl_certs_dir: /app/management/var/lib/dataplaneapi/sslgeneral_storage_dir: /app/management/var/lib/dataplaneapi/generaldataplane_storage_dir: /app/management/var/lib/dataplaneapi/storagewaf_dir: /app/management/var/lib/dataplaneapi/wafspoe_dir: /app/management/var/lib/dataplaneapi/spoespoe_transaction_dir: /app/management/var/state/dataplaneapi/spoehaproxy:reload:reload_delay: 5reload_strategy: customlog_targets:- log_to: sysloglog_level: warningsyslog_address: 127.0.0.11:514syslog_protocol: udp4syslog_tag: dataplaneapisyslog_level: warningsyslog_facility: local0log_types:- access- app
Top-level directives Jump to heading
HAProxy Data Plane API supports the following top-level configuration file directives.
config_version Jump to heading
The top-level config_version directive sets the file’s configuration version.
- Parent: none
- Type: integer
- Required: false
yamlconfig_version: 2
yamlconfig_version: 2
name Jump to heading
The top-level name directive assigns a name to this API server. Defaults to the hostname.
- Parent: none
- Type: string
- Required: false
yamlname: famous_condor
yamlname: famous_condor
dataplaneapi directives Jump to heading
HAProxy Data Plane API supports the following configuration file directives in its dataplaneapi section.
advertised Jump to heading
The dataplaneapi section’s advertised directive contains settings for the advertised API address and port. See advertised directives.
- Parent: dataplaneapi
- Type: object
- Required: false
yamldataplaneapi:advertised:api_address: 10.2.3.4api_port: 80
yamldataplaneapi:advertised:api_address: 10.2.3.4api_port: 80
cleanup_timeout Jump to heading
The dataplaneapi section’s cleanup_timeout directive sets the timeout for cleaning up idle connections. Defaults to 10s.
- Parent: dataplaneapi
- Type: string
- Required: false
yamldataplaneapi:cleanup_timeout: "10s"
yamldataplaneapi:cleanup_timeout: "10s"
debug_socket_path Jump to heading
The dataplaneapi section’s debug_socket_path directive defines the path for the debugging command socket. See Debugging. Set it to an empty string to disable it.
- Parent: dataplaneapi
- Type: string
- Required: false
yamldataplaneapi:debug_socket_path: /var/run/dataplane-debug.sock
yamldataplaneapi:debug_socket_path: /var/run/dataplane-debug.sock
disable_inotify Jump to heading
The dataplaneapi section’s disable_inotify directive disables configuration file filesystem watching.
- Parent: dataplaneapi
- Type: boolean
- Required: false
yamldataplaneapi:disable_inotify: false
yamldataplaneapi:disable_inotify: false
gid Jump to heading
The dataplaneapi section’s gid directive sets the process’s group ID value to set on start. When set, the API switching to this group and clears supplementary groups. Set it to 0 to leave it unchanged.
- Parent: dataplaneapi
- Type: integer
- Required: false
yamldataplaneapi:gid: 1000
yamldataplaneapi:gid: 1000
graceful_timeout Jump to heading
The dataplaneapi section’s graceful_timeout directive sets the server shutdown grace period. Defaults to 15s.
- Parent: dataplaneapi
- Type: string
- Required: false
yamldataplaneapi:graceful_timeout: "15s"
yamldataplaneapi:graceful_timeout: "15s"
host Jump to heading
The dataplaneapi section’s host directive sets the API’s HTTP bind address. Defaults to localhost.
- Parent: dataplaneapi
- Type: string
- Required: false
yamldataplaneapi:host: "localhost"
yamldataplaneapi:host: "localhost"
keep_alive Jump to heading
The dataplaneapi section’s keep_alive directive sets the TCP keep-alive timeout on accepted connections. It prunes dead TCP connections, for example when the client closes their laptop mid-download. Defaults to 3m.
- Parent: dataplaneapi
- Type: string
- Required: false
yamldataplaneapi:keep_alive: 3m
yamldataplaneapi:keep_alive: 3m
listen_limit Jump to heading
The dataplaneapi section’s listen_limit directive sets the maximum number of simultaneous HTTP connections the API can handle. Set it to 0 for unlimited.
- Parent: dataplaneapi
- Type: integer
- Required: false
yamldataplaneapi:listen_limit: 1024
yamldataplaneapi:listen_limit: 1024
max_body_size Jump to heading
This section applies to:
- HAProxy Data Plane API 3.4 and newer
The dataplaneapi section’s max_body_size directive controls the maximum number of bytes the server will read from a request body before aborting the request. Set it to 0 for unlimited. Defaults to 1GiB.
- Parent: dataplaneapi
- Type: string
- Required: false
yamldataplaneapi:max_body_size: "1MiB"
yamldataplaneapi:max_body_size: "1MiB"
max_header_size Jump to heading
The dataplaneapi section’s max_header_size directive defines the maximum HTTP request header size for API requests. Defaults to 1MiB.
- Parent: dataplaneapi
- Type: string
- Required: false
yamldataplaneapi:max_header_size: "1MiB"
yamldataplaneapi:max_header_size: "1MiB"
pam Jump to heading
Enterprise feature
This is an enterprise feature.
The dataplaneapi section’s pam directive enables using PAM instead of Basic Authentication.
- Parent: dataplaneapi
- Type: boolean
- Required: false
yamldataplaneapi:pam: true
yamldataplaneapi:pam: true
pid_file Jump to heading
The dataplaneapi section’s pid_file directive specifies the path to the file where the API’s PID will be written.
- Parent: dataplaneapi
- Type: string
- Required: false
yamldataplaneapi:pid_file: /tmp/dataplane.pid
yamldataplaneapi:pid_file: /tmp/dataplane.pid
port Jump to heading
The dataplaneapi section’s port directive defines the TCP port number for the API. Set it to 0 to select an available port.
- Parent: dataplaneapi
- Type: integer
- Required: false
yamldataplaneapi:port: 80
yamldataplaneapi:port: 80
read_timeout Jump to heading
The dataplaneapi section’s read_timeout directive specifies the HTTP request read timeout for API requests. Defaults to 30s.
- Parent: dataplaneapi
- Type: string
- Required: false
yamldataplaneapi:read_timeout: "30s"
yamldataplaneapi:read_timeout: "30s"
resources Jump to heading
The dataplaneapi section’s resources directive contains settings for resources such as map files, certificates, and WAF files. See resources directives.
- Parent: dataplaneapi
- Type: object
- Required: false
yamldataplaneapi:resources:maps_dir: /etc/haproxy/mapsssl_certs_dir: /etc/haproxy/sslupdate_map_files: falseupdate_map_files_period: 10spoe_dir: /etc/haproxy/spoespoe_transaction_dir: /tmp/spoe-haproxydataplane_storage_dir: /etc/haproxy/general
yamldataplaneapi:resources:maps_dir: /etc/haproxy/mapsssl_certs_dir: /etc/haproxy/sslupdate_map_files: falseupdate_map_files_period: 10spoe_dir: /etc/haproxy/spoespoe_transaction_dir: /tmp/spoe-haproxydataplane_storage_dir: /etc/haproxy/general
scheme Jump to heading
The dataplaneapi section’s scheme directive sets a list of schemes to enable. It supports http, https, and unix.
- Parent: dataplaneapi
- Type: array of strings
- Required: false
yamldataplaneapi:scheme:- http
yamldataplaneapi:scheme:- http
show_system_info Jump to heading
The dataplaneapi section’s show_system_info directive enables or disables the display of system information on the info endpoint.
- Parent: dataplaneapi
- Type: boolean
- Required: false
yamldataplaneapi:show_system_info: false
yamldataplaneapi:show_system_info: false
socket_path Jump to heading
The dataplaneapi section’s socket_path directive specifies the path to the API’s Unix socket. Defaults to /var/run/data-plane.sock.
- Parent: dataplaneapi
- Type: string
- Required: false
yamldataplaneapi:socket_path: /var/run/data-plane.sock
yamldataplaneapi:socket_path: /var/run/data-plane.sock
tls Jump to heading
The dataplaneapi section’s tls directive contains settings for TLS encryption. See tls directives.
- Parent: dataplaneapi
- Type: object
- Required: false
yamldataplaneapi:tls:tls_host: 0.0.0.0tls_port: 6443tls_certificate: /etc/haproxy/ssl/certs/server-cert.pemtls_key: /etc/haproxy/ssl/certs/server-key.pem
yamldataplaneapi:tls:tls_host: 0.0.0.0tls_port: 6443tls_certificate: /etc/haproxy/ssl/certs/server-cert.pemtls_key: /etc/haproxy/ssl/certs/server-key.pem
transaction Jump to heading
The dataplaneapi section’s transaction directive contains settings for transactions. See transaction directives.
- Parent: dataplaneapi
- Type: object
- Required: false
yamldataplaneapi:transaction:transaction_dir: /tmp/haproxybackups_number: 3backups_dir: /tmp/backupsmax_open_transactions: 20
yamldataplaneapi:transaction:transaction_dir: /tmp/haproxybackups_number: 3backups_dir: /tmp/backupsmax_open_transactions: 20
uid Jump to heading
The dataplaneapi section’s uid directive sets the process’s user ID value to set on start. Set it to 0 to leave it unchanged.
- Parent: dataplaneapi
- Type: integer
- Required: false
yamldataplaneapi:uid: 1000
yamldataplaneapi:uid: 1000
user Jump to heading
The dataplaneapi section’s user directive list of users for API Basic Authentication. This is an alternative to setting userlist. See user directives.
- Parent: dataplaneapi
- Type: array of objects
- Required: false
yamldataplaneapi:user:- name: admininsecure: truepassword: adminpwd
yamldataplaneapi:user:- name: admininsecure: truepassword: adminpwd
userlist Jump to heading
The dataplaneapi section’s userlist directive contains settings for Basic Authentication via a userlist. See userlist directives.
- Parent: dataplaneapi
- Type: object
- Required: false
yamldataplaneapi:userlist:userlist: dataplaneapiuserlist_file: /etc/haproxy/haproxy.cfg
yamldataplaneapi:userlist:userlist: dataplaneapiuserlist_file: /etc/haproxy/haproxy.cfg
write_timeout Jump to heading
The dataplaneapi section’s write_timeout directive specifies the HTTP response write timeout for API requests. Defaults to 30s.
- Parent: dataplaneapi
- Type: string
- Required: false
yamldataplaneapi:write_timeout: "60s"
yamldataplaneapi:write_timeout: "60s"
dataplaneapi.advertised directives Jump to heading
HAProxy Data Plane API supports the following configuration file directives in its dataplaneapi.advertised section.
api_address Jump to heading
The advertised section’s api_address directive sets the address to advertise to HAProxy Fusion. It isn’t a bind address.
- Parent: dataplaneapi.advertised
- Type: string
- Required: false
yamldataplaneapi:advertised:api_address: 10.2.3.4
yamldataplaneapi:advertised:api_address: 10.2.3.4
api_port Jump to heading
The advertised section’s api_port directive sets the port to advertise to HAProxy Fusion.
- Parent: dataplaneapi.advertised
- Type: integer
- Required: false
yamldataplaneapi:advertised:api_port: 80
yamldataplaneapi:advertised:api_port: 80
dataplaneapi.resources directives Jump to heading
HAProxy Data Plane API supports the following configuration file directives in its dataplaneapi.resources section.
dataplane_storage_dir Jump to heading
The resources section’s dataplane_storage_dir directive sets the path to the internal cluster/discovery storage directory. Defaults to /etc/haproxy/dataplane.
- Parent: dataplaneapi.resources
- Type: string
- Required: false
yamldataplaneapi:resources:dataplane_storage_dir: /etc/haproxy/dataplane
yamldataplaneapi:resources:dataplane_storage_dir: /etc/haproxy/dataplane
general_storage_dir Jump to heading
The resources section’s general_storage_dir directive sets the path to the general-purpose files storage directory.
- Parent: dataplaneapi.resources
- Type: string
- Required: false
yamldataplaneapi:resources:general_storage_dir: /etc/haproxy/general
yamldataplaneapi:resources:general_storage_dir: /etc/haproxy/general
maps_dir Jump to heading
The resources section’s maps_dir directive sets the path to the directory of map files managed by the API.
- Parent: dataplaneapi.resources
- Type: string
- Required: false
yamldataplaneapi:resources:maps_dir: /etc/haproxy/maps
yamldataplaneapi:resources:maps_dir: /etc/haproxy/maps
spoe_dir Jump to heading
The resources section’s spoe_dir directive sets the path to the directory containing Stream Processing Offload Engine (SPOE) configuration files.
- Parent: dataplaneapi.resources
- Type: string
- Required: false
yamldataplaneapi:resources:spoe_dir: /etc/haproxy/spoe
yamldataplaneapi:resources:spoe_dir: /etc/haproxy/spoe
spoe_transaction_dir Jump to heading
The resources section’s spoe_transaction_dir directive sets the path to the directory containing Stream Processing Offload Engine (SPOE) transaction files.
- Parent: dataplaneapi.resources
- Type: string
- Required: false
yamldataplaneapi:resources:spoe_transaction_dir: /tmp/spoe-haproxy
yamldataplaneapi:resources:spoe_transaction_dir: /tmp/spoe-haproxy
ssl_certs_aloha Jump to heading
Enterprise feature
This is an enterprise feature.
The resources section’s ssl_certs_aloha directive lets HAProxy ALOHA manage SSL certificates instead of HAProxy Data Plane API.
- Parent: dataplaneapi.resources
- Type: boolean
- Required: false
yamldataplaneapi:resources:ssl_certs_aloha: true
yamldataplaneapi:resources:ssl_certs_aloha: true
ssl_certs_dir Jump to heading
The resources section’s ssl_certs_dir directive sets the path to the SSL certificates directory.
- Parent: dataplaneapi.resources
- Type: string
- Required: false
yamldataplaneapi:resources:ssl_certs_dir: /etc/haproxy/ssl
yamldataplaneapi:resources:ssl_certs_dir: /etc/haproxy/ssl
update_map_files Jump to heading
The resources section’s update_map_files directive enables periodically persisting runtime map values to map files.
- Parent: dataplaneapi.resources
- Type: boolean
- Required: false
yamldataplaneapi:resources:update_map_files: false
yamldataplaneapi:resources:update_map_files: false
update_map_files_period Jump to heading
The resources section’s update_map_files_period directive sets the elapsed time in seconds between two maps syncing operations. Defaults to 10.
- Parent: dataplaneapi.resources
- Type: integer
- Required: false
yamldataplaneapi:resources:update_map_files_period: 10
yamldataplaneapi:resources:update_map_files_period: 10
waf_dir Jump to heading
Enterprise feature
This is an enterprise feature.
The resources section’s waf_dir directive sets the path to the directory containing Web Application Firewall (WAF) files. Defaults to /etc/haproxy/waf.
- Parent: dataplaneapi.resources
- Type: string
- Required: false
yamldataplaneapi:resources:waf_dir: /etc/hapee-3.4
yamldataplaneapi:resources:waf_dir: /etc/hapee-3.4
dataplaneapi.tls directives Jump to heading
HAProxy Data Plane API supports the following configuration file directives in its dataplaneapi.tls section.
tls_ca Jump to heading
The tls section’s tls_ca directive sets the path to the TLS CA certificate file used to validate client certificates during mTLS authentication.
- Parent: dataplaneapi.tls
- Type: string
- Required: false
yamldataplaneapi:tls:tls_ca: /etc/ssl/frontends/default/ca.pem
yamldataplaneapi:tls:tls_ca: /etc/ssl/frontends/default/ca.pem
tls_certificate Jump to heading
The tls section’s tls_certificate directive sets the path to the TLS certificate file. This is required for HTTPS.
- Parent: dataplaneapi.tls
- Type: string
- Required: false
yamldataplaneapi:tls:tls_certificate: /etc/haproxy/ssl/certs/server-cert.pem
yamldataplaneapi:tls:tls_certificate: /etc/haproxy/ssl/certs/server-cert.pem
tls_host Jump to heading
The tls section’s tls_host directive sets the host address for TLS connections. Defaults to the HTTP host.
- Parent: dataplaneapi.tls
- Type: string
- Required: false
yamldataplaneapi:tls:tls_host: 0.0.0.0
yamldataplaneapi:tls:tls_host: 0.0.0.0
tls_keep_alive Jump to heading
The tls section’s tls_keep_alive directive sets the TCP keep-alive period for TLS connections. Set it to 0 to inherit the HTTP value.
- Parent: dataplaneapi.tls
- Type: string
- Required: false
yamldataplaneapi:tls:tls_keep_alive: 1m
yamldataplaneapi:tls:tls_keep_alive: 1m
tls_key Jump to heading
The tls section’s tls_key directive sets the path to the TLS certificate key file. This is required for HTTPS.
- Parent: dataplaneapi.tls
- Type: string
- Required: false
yamldataplaneapi:tls:tls_key: /etc/haproxy/ssl/certs/server-key.pem
yamldataplaneapi:tls:tls_key: /etc/haproxy/ssl/certs/server-key.pem
tls_listen_limit Jump to heading
The tls section’s tls_listen_limit directive sets the maximum number of simultaneous HTTPS connections. Set it to 0 to inherit the HTTP limit.
- Parent: dataplaneapi.tls
- Type: integer
- Required: false
yamldataplaneapi:tls:tls_listen_limit: 10
yamldataplaneapi:tls:tls_listen_limit: 10
tls_port Jump to heading
The tls section’s tls_port directive sets the port number for HTTPS connections. Set it to 0 to select an available port.
- Parent: dataplaneapi.tls
- Type: integer
- Required: false
yamldataplaneapi:tls:tls_port: 6443
yamldataplaneapi:tls:tls_port: 6443
tls_read_timeout Jump to heading
The tls section’s tls_read_timeout directive sets the read timeout for HTTPS connections. Set it to 0 to inherit the HTTP value.
- Parent: dataplaneapi.tls
- Type: string
- Required: false
yamldataplaneapi:tls:tls_read_timeout: 10s
yamldataplaneapi:tls:tls_read_timeout: 10s
tls_write_timeout Jump to heading
The tls section’s tls_write_timeout directive sets the write timeout for HTTPS connections. Set it to 0 to inherit the HTTP value.
- Parent: dataplaneapi.tls
- Type: string
- Required: false
yamldataplaneapi:tls:tls_write_timeout: 10s
yamldataplaneapi:tls:tls_write_timeout: 10s
dataplaneapi.transaction directives Jump to heading
HAProxy Data Plane API supports the following configuration file directives in its dataplaneapi.transaction section.
backups_dir Jump to heading
The transaction section’s backups_dir directive sets the path to directory in which to place backup files.
- Parent: dataplaneapi.transaction
- Type: string
- Required: false
yamldataplaneapi:transaction:backups_dir: /tmp/backups
yamldataplaneapi:transaction:backups_dir: /tmp/backups
backups_number Jump to heading
The transaction section’s backups_number directive sets the number of backup configuration files to keep. Defaults to 0, which disables backups.
- Parent: dataplaneapi.transaction
- Type: integer
- Required: false
yamldataplaneapi:transaction:backups_number: 10
yamldataplaneapi:transaction:backups_number: 10
disable_persistent_transactions Jump to heading
Enterprise feature
This is an enterprise feature.
The transaction section’s disable_persistent_transactions directive disables persisting transactions to disk.
- Parent: dataplaneapi.transaction
- Type: boolean
- Required: false
yamldataplaneapi:transaction:disable_persistent_transactions: true
yamldataplaneapi:transaction:disable_persistent_transactions: true
max_open_transactions Jump to heading
The transaction section’s max_open_transactions directive limits the number of active transaction in pending state. Defaults to 20.
- Parent: dataplaneapi.transaction
- Type: integer
- Required: false
yamldataplaneapi:transaction:max_open_transactions: 20
yamldataplaneapi:transaction:max_open_transactions: 20
transaction_dir Jump to heading
The transaction section’s transaction_dir directive sets the path to the directory containing transaction files. Defaults to /tmp/haproxy.
- Parent: dataplaneapi.transaction
- Type: string
- Required: false
yamldataplaneapi:transaction:transaction_dir: /tmp/haproxy
yamldataplaneapi:transaction:transaction_dir: /tmp/haproxy
dataplaneapi.user directives Jump to heading
HAProxy Data Plane API supports the following configuration file directives in its dataplaneapi.user section. For an example, see Change the password.
insecure Jump to heading
The insecure field indicates whether the value of the password field will be cleartext. When true, set password to a cleartext string; when false, set password to a hash of the password.
- Parent: dataplaneapi.user
- Type: boolean
- Required: false
yamldataplaneapi:user:- name: admininsecure: truepassword: adminpwd
yamldataplaneapi:user:- name: admininsecure: truepassword: adminpwd
name Jump to heading
The user name.
- Parent: dataplaneapi.user
- Type: string
- Required: true
yamldataplaneapi:user:- name: admininsecure: truepassword: adminpwd
yamldataplaneapi:user:- name: admininsecure: truepassword: adminpwd
password Jump to heading
The password. When insecure is true, this is a cleartext string; when insecure is false, this is a hash of the password.
- Parent: dataplaneapi.user
- Type: string
- Required: true
yamldataplaneapi:user:- name: admininsecure: falsepassword: $5$s6Subz0X7FSX2zON$r94OtF6gOfWlGmySwvn3pDFIAHbIpe6mWneueqtBOm/
yamldataplaneapi:user:- name: admininsecure: falsepassword: $5$s6Subz0X7FSX2zON$r94OtF6gOfWlGmySwvn3pDFIAHbIpe6mWneueqtBOm/
dataplaneapi.userlist directives Jump to heading
HAProxy Data Plane API supports the following configuration file directives 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
yamldataplaneapi:userlist:userlist: dataplaneapi
yamldataplaneapi:userlist:userlist: dataplaneapi
userlist_file Jump to heading
Path to the configuration file that contains the userlist.
- Parent: dataplaneapi.userlist
- Type: string
- Required: false
yamldataplaneapi:userlist:userlist_file: /etc/haproxy/haproxy.cfg
yamldataplaneapi:userlist:userlist_file: /etc/haproxy/haproxy.cfg
gslb directives Jump to heading
Enterprise feature
This is an enterprise feature.
This section applies to:
- HAProxy Data Plane API 3.4 and newer
HAProxy Data Plane API supports the following configuration file directives in its gslb section. This section configures Enterprise GSLB management.
Requires the hapee-extras-gslb package. Prepare the transaction and backup directories before enabling management:
shsudo install -d -m 0750 /etc/hapee-extras/gslb/transactions /etc/hapee-extras/gslb/backups
shsudo install -d -m 0750 /etc/hapee-extras/gslb/transactions /etc/hapee-extras/gslb/backups
Example GSLB configuration:
yamlgslb:config_file: /etc/hapee-extras/hapee-gslb.conftransaction_dir: /etc/hapee-extras/gslb/transactionsreload_cmd: /usr/bin/systemctl reload hapee-extras-gslbrestart_cmd: /usr/bin/systemctl restart hapee-extras-gslbstart_cmd: /usr/bin/systemctl start hapee-extras-gslbstop_cmd: /usr/bin/systemctl stop hapee-extras-gslbvalidate_bin: /opt/hapee-extras/sbin/hapee-gslbbackups_dir: /etc/hapee-extras/gslb/backupsbackups_number: 10disable_save_verification: false
yamlgslb:config_file: /etc/hapee-extras/hapee-gslb.conftransaction_dir: /etc/hapee-extras/gslb/transactionsreload_cmd: /usr/bin/systemctl reload hapee-extras-gslbrestart_cmd: /usr/bin/systemctl restart hapee-extras-gslbstart_cmd: /usr/bin/systemctl start hapee-extras-gslbstop_cmd: /usr/bin/systemctl stop hapee-extras-gslbvalidate_bin: /opt/hapee-extras/sbin/hapee-gslbbackups_dir: /etc/hapee-extras/gslb/backupsbackups_number: 10disable_save_verification: false
backups_dir Jump to heading
The gslb section’s backups_dir sets the directory for storing GSLB configuration backups. Required if backups are enabled.
- Parent: gslb
- Type: string
- Required: false
yamlgslb:backups_dir: /etc/hapee-extras/gslb/backups
yamlgslb:backups_dir: /etc/hapee-extras/gslb/backups
backups_number Jump to heading
The gslb section’s backups_number directive sets the number of backups to retain. Defaults to 0, which disables backups.
- Parent: gslb
- Type: integer
- Required: false
yamlgslb:backups_number: 10
yamlgslb:backups_number: 10
config_file Jump to heading
The gslb section’s config_file directive sets the path to the GSLB configuration. Setting it enables GSLB management.
- Parent: gslb
- Type: string
- Required: false
yamlgslb:config_file: /etc/hapee-extras/hapee-gslb.conf
yamlgslb:config_file: /etc/hapee-extras/hapee-gslb.conf
disable_save_verification Jump to heading
The gslb section’s disable_save_verification directive skips rendered-configuration round-trip checks. Defaults to false. Save verification is separate from transaction validation.
- Parent: gslb
- Type: boolean
- Required: false
yamlgslb:disable_save_verification: false
yamlgslb:disable_save_verification: false
reload_cmd Jump to heading
The gslb section’s reload_cmd directive sets the command for reloading the GSLB service after committing changes. Required with the custom reload strategy.
- Parent: gslb
- Type: string
- Required: false
yamlgslb:reload_cmd: /usr/bin/systemctl reload hapee-extras-gslb
yamlgslb:reload_cmd: /usr/bin/systemctl reload hapee-extras-gslb
restart_cmd Jump to heading
The gslb section’s restart_cmd directive sets the command for restarting the GSLB service.
- Parent: gslb
- Type: string
- Required: false
yamlgslb:restart_cmd: /usr/bin/systemctl restart hapee-extras-gslb
yamlgslb:restart_cmd: /usr/bin/systemctl restart hapee-extras-gslb
start_cmd Jump to heading
The gslb section’s start_cmd directive sets the command for starting the GSLB service.
- Parent: gslb
- Type: string
- Required: false
yamlgslb:start_cmd: /usr/bin/systemctl start hapee-extras-gslb
yamlgslb:start_cmd: /usr/bin/systemctl start hapee-extras-gslb
stop_cmd Jump to heading
The gslb section’s stop_cmd directive sets the command for stopping the GSLB service.
- Parent: gslb
- Type: string
- Required: false
yamlgslb:stop_cmd: /usr/bin/systemctl stop hapee-extras-gslb
yamlgslb:stop_cmd: /usr/bin/systemctl stop hapee-extras-gslb
transaction_dir Jump to heading
The gslb section’s transaction_dir directive sets the directory for persisting GSLB transaction files. Empty uses memory-only transactions.
- Parent: gslb
- Type: string
- Required: false
yamlgslb:transaction_dir: /etc/hapee-extras/gslb/transactions
yamlgslb:transaction_dir: /etc/hapee-extras/gslb/transactions
validate_bin Jump to heading
The gslb section’s validate_bin directive sets the binary for validating with BINARY check FILE. Takes precedence over validate_cmd.
- Parent: gslb
- Type: string
- Required: false
yamlgslb:validate_bin: /opt/hapee-extras/sbin/hapee-gslb
yamlgslb:validate_bin: /opt/hapee-extras/sbin/hapee-gslb
validate_cmd Jump to heading
The gslb section’s validate_cmd directive sets the command for validating the GSLB configuration.
It’s a custom validator receiving GSLB_CONFIGFILE. The value doesn’t support shell quoting or expansion. Prefer validate_bin; to use this alternative, first install the script /usr/local/sbin/validate-hapee-gslb as executable:
sh#!/bin/shexec /opt/hapee-extras/sbin/hapee-gslb check "${GSLB_CONFIGFILE:?}"
sh#!/bin/shexec /opt/hapee-extras/sbin/hapee-gslb check "${GSLB_CONFIGFILE:?}"
- Parent: gslb
- Type: string
- Required: false
yamlgslb:validate_cmd: /usr/local/sbin/validate-hapee-gslb
yamlgslb:validate_cmd: /usr/local/sbin/validate-hapee-gslb
haproxy directives Jump to heading
HAProxy Data Plane API supports the following configuration file directives in its haproxy section.
config_file Jump to heading
The haproxy section’s config_file directive sets the path to the HAProxy configuration file.
- Parent: haproxy
- Type: string
- Required: false
yamlhaproxy:config_file: /etc/haproxy/haproxy.cfg
yamlhaproxy:config_file: /etc/haproxy/haproxy.cfg
delayed_start_max Jump to heading
The haproxy section’s delayed_start_max directive sets the maximum duration to wait for the HAProxy runtime socket to be ready.
- Parent: haproxy
- Type: string
- Required: false
yamlhaproxy:delayed_start_max: 30s
yamlhaproxy:delayed_start_max: 30s
delayed_start_tick Jump to heading
The haproxy section’s delayed_start_tick directive sets the duration between checks for the HAProxy runtime socket to be ready.
- Parent: haproxy
- Type: string
- Required: false
yamlhaproxy:delayed_start_tick: 500ms
yamlhaproxy:delayed_start_tick: 500ms
fid Jump to heading
The haproxy section’s fid directive sets the path to file that the HAProxy Data Plane API will use to write its ID.
- Parent: haproxy
- Type: string
- Required: false
yamlhaproxy:fid: /etc/haproxy/fid
yamlhaproxy:fid: /etc/haproxy/fid
haproxy_bin Jump to heading
The haproxy section’s haproxy_bin directive sets the path to the HAProxy binary file.
- Parent: haproxy
- Type: string
- Required: false
yamlhaproxy:haproxy_bin: /usr/local/sbin/haproxy
yamlhaproxy:haproxy_bin: /usr/local/sbin/haproxy
master_runtime Jump to heading
The haproxy section’s master_runtime directive sets the path to the Master Runtime API socket.
- Parent: haproxy
- Type: string
- Required: false
yamlhaproxy:master_runtime: /var/lib/haproxy/master
yamlhaproxy:master_runtime: /var/lib/haproxy/master
master_worker_mode Jump to heading
The haproxy section’s master_worker_mode directive sets the flag to enable helpers when running HAProxy in master-worker mode.
- Parent: haproxy
- Type: boolean
- Required: false
yamlhaproxy:master_worker_mode: false
yamlhaproxy:master_worker_mode: false
reload Jump to heading
The haproxy section’s reload directive contains settings for reloading HAProxy.
- Parent: haproxy
- Type: object
- Required: false
yamlhaproxy:reload:reload_delay: 5reload_cmd: "systemctl reload haproxy"restart_cmd: "systemctl restart haproxy"status_cmd: "systemctl status haproxy"service_name: "haproxy.service"reload_retention: 1reload_strategy: customvalidate_cmd: /usr/local/bin/validate-haproxy.sh
yamlhaproxy:reload:reload_delay: 5reload_cmd: "systemctl reload haproxy"restart_cmd: "systemctl restart haproxy"status_cmd: "systemctl status haproxy"service_name: "haproxy.service"reload_retention: 1reload_strategy: customvalidate_cmd: /usr/local/bin/validate-haproxy.sh
haproxy.reload directives Jump to heading
HAProxy Data Plane API supports the following configuration file directives in its haproxy.reload section.
reload_cmd Jump to heading
The reload section’s reload_cmd directive sets the command for reloading HAProxy after committing changes.
- Parent: haproxy.reload
- Type: string
- Required: false
yamlhaproxy:reload:reload_cmd: "systemctl reload haproxy"
yamlhaproxy:reload:reload_cmd: "systemctl reload haproxy"
reload_delay Jump to heading
The reload section’s reload_delay directive sets the minimum delay between two reloads (in seconds). Defaults to 5.
- Parent: haproxy.reload
- Type: integer
- Required: false
yamlhaproxy:reload:reload_delay: 5
yamlhaproxy:reload:reload_delay: 5
reload_retention Jump to heading
The reload section’s reload_retention directive sets the number of days to retain the reload record. Defaults to 1.
- Parent: haproxy.reload
- Type: integer
- Required: false
yamlhaproxy:reload:reload_retention: 1
yamlhaproxy:reload:reload_retention: 1
reload_strategy Jump to heading
The reload section’s reload_strategy directive sets the service-command defaults; it can be systemd, s6 or custom. Defaults to custom and requires reload/restart commands.
- Parent: haproxy.reload
- Type: string
- Required: false
yamlhaproxy:reload:reload_strategy: custom
yamlhaproxy:reload:reload_strategy: custom
restart_cmd Jump to heading
The reload section’s restart_cmd directive sets the command to restart HAProxy.
- Parent: haproxy.reload
- Type: string
- Required: false
yamlhaproxy:reload:restart_cmd: "systemctl restart haproxy"
yamlhaproxy:reload:restart_cmd: "systemctl restart haproxy"
service_name Jump to heading
The reload section’s service_name directive sets the name of the HAProxy service when deriving systemd/s6 commands.
- Parent: haproxy.reload
- Type: string
- Required: false
yamlhaproxy:reload:service_name: "haproxy.service"
yamlhaproxy:reload:service_name: "haproxy.service"
start_cmd Jump to heading
Enterprise feature
This is an enterprise feature.
The reload section’s start_cmd directive sets the command to start HAProxy.
- Parent: haproxy.reload
- Type: string
- Required: false
yamlhaproxy:reload:start_cmd: "/usr/bin/systemctl start hapee-3.4-lb"
yamlhaproxy:reload:start_cmd: "/usr/bin/systemctl start hapee-3.4-lb"
status_cmd Jump to heading
The reload section’s status_cmd directive sets the command for checking if HAProxy is running.
- Parent: haproxy.reload
- Type: string
- Required: false
yamlhaproxy:reload:status_cmd: "systemctl status haproxy"
yamlhaproxy:reload:status_cmd: "systemctl status haproxy"
stop_cmd Jump to heading
Enterprise feature
This is an enterprise feature.
The reload section’s stop_cmd directive sets the command to stop HAProxy.
- Parent: haproxy.reload
- Type: string
- Required: false
yamlhaproxy:reload:stop_cmd: "/usr/bin/systemctl stop hapee-3.4-lb"
yamlhaproxy:reload:stop_cmd: "/usr/bin/systemctl stop hapee-3.4-lb"
validate_cmd Jump to heading
The reload section’s validate_cmd directive executes a custom command to perform the HAProxy configuration check. Set it to empty to use the HAProxy binary.
- Parent: haproxy.reload
- Type: string
- Required: false
yamlhaproxy:reload:validate_cmd: /usr/local/bin/validate-haproxy.sh
yamlhaproxy:reload:validate_cmd: /usr/local/bin/validate-haproxy.sh
validate_files_after Jump to heading
This section applies to:
- HAProxy Data Plane API 3.4 and newer
The reload section’s validate_files_after directive sets a list of configuration files to be loaded after the main file for validation.
- Parent: haproxy.reload
- Type: string[]
- Required: false
yamlhaproxy:reload:validate_files_after: ["/etc/haproxy/myconf1.cfg", "/etc/haproxy/myconf2.cfg"]
yamlhaproxy:reload:validate_files_after: ["/etc/haproxy/myconf1.cfg", "/etc/haproxy/myconf2.cfg"]
validate_files_before Jump to heading
This section applies to:
- HAProxy Data Plane API 3.4 and newer
The reload section’s validate_files_before directive sets a list of configuration files to be loaded before the main file for validation.
- Parent: haproxy.reload
- Type: string[]
- Required: false
yamlhaproxy:reload:validate_files_before: ["/etc/haproxy/myconf1.cfg", "/etc/haproxy/myconf2.cfg"]
yamlhaproxy:reload:validate_files_before: ["/etc/haproxy/myconf1.cfg", "/etc/haproxy/myconf2.cfg"]
keepalived directives Jump to heading
Enterprise feature
This is an enterprise feature.
This section applies to:
- HAProxy Data Plane API 3.4 and newer
HAProxy Data Plane API supports the following configuration file directives in its keepalived section. This section configures VRRP (Keepalived) management.
It requires the hapee-extras-vrrp22 package. Prepare the transaction and backup directories before enabling management:
shsudo install -d -m 0750 /etc/hapee-extras/keepalived/transactions /etc/hapee-extras/keepalived/backups
shsudo install -d -m 0750 /etc/hapee-extras/keepalived/transactions /etc/hapee-extras/keepalived/backups
Example VRRP configuration:
yamlkeepalived:config_file: /etc/hapee-extras/hapee-vrrp.cfgstart_cmd: /usr/bin/systemctl start hapee-extras-vrrpreload_cmd: /usr/bin/systemctl reload hapee-extras-vrrprestart_cmd: /usr/bin/systemctl restart hapee-extras-vrrpstop_cmd: /usr/bin/systemctl stop hapee-extras-vrrpstatus_cmd: /usr/bin/systemctl --quiet is-active hapee-extras-vrrpgetpid_cmd: /usr/bin/pgrep hapee-vrrpsignal_cmd: /bin/killread_dump_cmd: /bin/catvalidate_cmd: /bin/sh -c '/opt/hapee-extras/sbin/hapee-vrrp --config-test -f "$KEEPALIVED_TRANSACTION_FILE"'reload_delay: 5transaction_dir: /etc/hapee-extras/keepalived/transactionsbackups_dir: /etc/hapee-extras/keepalived/backupsbackups_number: 10
yamlkeepalived:config_file: /etc/hapee-extras/hapee-vrrp.cfgstart_cmd: /usr/bin/systemctl start hapee-extras-vrrpreload_cmd: /usr/bin/systemctl reload hapee-extras-vrrprestart_cmd: /usr/bin/systemctl restart hapee-extras-vrrpstop_cmd: /usr/bin/systemctl stop hapee-extras-vrrpstatus_cmd: /usr/bin/systemctl --quiet is-active hapee-extras-vrrpgetpid_cmd: /usr/bin/pgrep hapee-vrrpsignal_cmd: /bin/killread_dump_cmd: /bin/catvalidate_cmd: /bin/sh -c '/opt/hapee-extras/sbin/hapee-vrrp --config-test -f "$KEEPALIVED_TRANSACTION_FILE"'reload_delay: 5transaction_dir: /etc/hapee-extras/keepalived/transactionsbackups_dir: /etc/hapee-extras/keepalived/backupsbackups_number: 10
backups_dir Jump to heading
The keepalived section’s backups_dir directive sets the directory for VRRP configuration backups.
- Parent: keepalived
- Type: string
- Required: false
yamlkeepalived:backups_dir: /etc/hapee-extras/keepalived/backups
yamlkeepalived:backups_dir: /etc/hapee-extras/keepalived/backups
backups_number Jump to heading
The keepalived section’s backups_number directive sets the number of backups to retain. Defaults to 0, which disables backups.
- Parent: keepalived
- Type: integer
- Required: false
yamlkeepalived:backups_number: 10
yamlkeepalived:backups_number: 10
config_file Jump to heading
The keepalived section’s config_file directive sets the VRRP configuration to manage.
- Parent: keepalived
- Type: string
- Required: false
yamlkeepalived:config_file: /etc/hapee-extras/hapee-vrrp.cfg
yamlkeepalived:config_file: /etc/hapee-extras/hapee-vrrp.cfg
getpid_cmd Jump to heading
The keepalived section’s getpid_cmd directive sets the command for printing the VRRP PID. Defaults to pgrep hapee-vrrp.
- Parent: keepalived
- Type: string
- Required: false
yamlkeepalived:getpid_cmd: /usr/bin/pgrep hapee-vrrp
yamlkeepalived:getpid_cmd: /usr/bin/pgrep hapee-vrrp
read_dump_cmd Jump to heading
The keepalived section’s read_dump_cmd sets the command for reading the appended state-dump file. Defaults to sudo -n cat.
- Parent: keepalived
- Type: string
- Required: false
yamlkeepalived:read_dump_cmd: /bin/cat
yamlkeepalived:read_dump_cmd: /bin/cat
reload_cmd Jump to heading
The keepalived section’s reload_cmd sets the command for reloading the VRRP service after committing changes.
- Parent: keepalived
- Type: string
- Required: false
yamlkeepalived:reload_cmd: /usr/bin/systemctl reload hapee-extras-vrrp
yamlkeepalived:reload_cmd: /usr/bin/systemctl reload hapee-extras-vrrp
reload_delay Jump to heading
The keepalived section’s reload_delay directive sets the reload interval in seconds. Defaults to 5, and must be positive to initialize management.
- Parent: keepalived
- Type: integer
- Required: false
yamlkeepalived:reload_delay: 5
yamlkeepalived:reload_delay: 5
restart_cmd Jump to heading
The keepalived section’s restart_cmd directive sets the command for restarting the VRRP service.
- Parent: keepalived
- Type: string
- Required: false
yamlkeepalived:restart_cmd: /usr/bin/systemctl restart hapee-extras-vrrp
yamlkeepalived:restart_cmd: /usr/bin/systemctl restart hapee-extras-vrrp
signal_cmd Jump to heading
The keepalived section’s signal_cmd directive sets the command for sending signals with an appended -s SIGNAL PID. Defaults to sudo -n kill.
- Parent: keepalived
- Type: string
- Required: false
yamlkeepalived:signal_cmd: /bin/kill
yamlkeepalived:signal_cmd: /bin/kill
start_cmd Jump to heading
The keepalived section’s start_cmd directive sets the command for starting the VRRP service. Required when management is enabled.
- Parent: keepalived
- Type: string
- Required: false
yamlkeepalived:start_cmd: /usr/bin/systemctl start hapee-extras-vrrp
yamlkeepalived:start_cmd: /usr/bin/systemctl start hapee-extras-vrrp
status_cmd Jump to heading
The keepalived section’s status_cmd directive sets the command for checking whether VRRP is running.
- Parent: keepalived
- Type: string
- Required: false
yamlkeepalived:status_cmd: /usr/bin/systemctl --quiet is-active hapee-extras-vrrp
yamlkeepalived:status_cmd: /usr/bin/systemctl --quiet is-active hapee-extras-vrrp
stop_cmd Jump to heading
The keepalived section’s stop_cmd directive sets the command for stopping the VRRP service.
- Parent: keepalived
- Type: string
- Required: false
yamlkeepalived:stop_cmd: /usr/bin/systemctl stop hapee-extras-vrrp
yamlkeepalived:stop_cmd: /usr/bin/systemctl stop hapee-extras-vrrp
transaction_dir Jump to heading
The keepalived section’s transaction_dir directive sets the directory containing the VRRP transaction files.
- Parent: keepalived
- Type: string
- Required: false
yamlkeepalived:transaction_dir: /etc/hapee-extras/keepalived/transactions
yamlkeepalived:transaction_dir: /etc/hapee-extras/keepalived/transactions
validate_cmd Jump to heading
The keepalived section’s validate_cmd directive sets the command for validating the VRRP configuration.
It validates KEEPALIVED_TRANSACTION_FILE before commit. Keepalived validation commands support quoted arguments but don’t expand variables themselves; the example explicitly invokes /bin/sh -c to expand the environment variable. Use absolute paths, because validation receives only that environment variable.
- Parent: keepalived
- Type: string
- Required: false
yamlkeepalived:validate_cmd: /bin/sh -c '/opt/hapee-extras/sbin/hapee-vrrp --config-test -f "$KEEPALIVED_TRANSACTION_FILE"'
yamlkeepalived:validate_cmd: /bin/sh -c '/opt/hapee-extras/sbin/hapee-vrrp --config-test -f "$KEEPALIVED_TRANSACTION_FILE"'
log_targets directives Jump to heading
The log_targets section lets you 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
yamllog_targets:- log_to: filelog_file: /var/log/dataplaneapi.loglog_level: infolog_format: textlog_types:- app
yamllog_targets:- log_to: filelog_file: /var/log/dataplaneapi.loglog_level: infolog_format: textlog_types:- app
log_format Jump to heading
Logging format, allowed values are text, JSON.
- Parent: log_targets
- Type: string
- Required: false
yamllog_targets:- log_to: filelog_file: /var/log/dataplaneapi.loglog_level: infolog_format: textlog_types:- app
yamllog_targets:- log_to: filelog_file: /var/log/dataplaneapi.loglog_level: infolog_format: textlog_types:- app
log_level Jump to heading
Logging level, allowed values are trace, debug, info, warning, error.
- Parent: log_targets
- Type: string
- Required: false
yamllog_targets:- log_to: filelog_file: /var/log/dataplaneapi.loglog_level: infolog_format: textlog_types:- app
yamllog_targets:- log_to: filelog_file: /var/log/dataplaneapi.loglog_level: infolog_format: textlog_types:- app
log_to Jump to heading
Log target, can be stdout, file, or syslog.
- Parent: log_targets
- Type: string
- Required: false
yamllog_targets:- log_to: stdoutlog_level: debuglog_format: jsonlog_types:- access- app
yamllog_targets:- log_to: stdoutlog_level: debuglog_format: jsonlog_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
yamllog_targets:- log_to: stdoutlog_level: debuglog_format: jsonlog_types:- access- app
yamllog_targets:- log_to: stdoutlog_level: debuglog_format: jsonlog_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
yamllog_targets:- log_to: sysloglog_level: infosyslog_address: 127.0.0.1syslog_protocol: tcpsyslog_tag: dataplaneapisyslog_level: debugsyslog_facility: local0log_types:- access
yamllog_targets:- log_to: sysloglog_level: infosyslog_address: 127.0.0.1syslog_protocol: tcpsyslog_tag: dataplaneapisyslog_level: debugsyslog_facility: local0log_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
yamllog_targets:- log_to: sysloglog_level: infosyslog_address: 127.0.0.1syslog_protocol: tcpsyslog_tag: dataplaneapisyslog_level: debugsyslog_facility: local0log_types:- access
yamllog_targets:- log_to: sysloglog_level: infosyslog_address: 127.0.0.1syslog_protocol: tcpsyslog_tag: dataplaneapisyslog_level: debugsyslog_facility: local0log_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
yamllog_targets:- log_to: sysloglog_level: infosyslog_address: 127.0.0.1syslog_protocol: tcpsyslog_tag: dataplaneapisyslog_level: debugsyslog_facility: local0log_types:- access
yamllog_targets:- log_to: sysloglog_level: infosyslog_address: 127.0.0.1syslog_protocol: tcpsyslog_tag: dataplaneapisyslog_level: debugsyslog_facility: local0log_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
yamllog_targets:- log_to: sysloglog_level: infosyslog_address: 127.0.0.1syslog_protocol: tcpsyslog_tag: dataplaneapisyslog_level: debugsyslog_facility: local0log_types:- access
yamllog_targets:- log_to: sysloglog_level: infosyslog_address: 127.0.0.1syslog_protocol: tcpsyslog_tag: dataplaneapisyslog_level: debugsyslog_facility: local0log_types:- access
syslog_tag Jump to heading
String to tag the syslog messages.
- Parent: log_targets
- Type: string
- Required: false
yamllog_targets:- log_to: sysloglog_level: infosyslog_address: 127.0.0.1syslog_protocol: tcpsyslog_tag: dataplaneapisyslog_level: debugsyslog_facility: local0log_types:- access
yamllog_targets:- log_to: sysloglog_level: infosyslog_address: 127.0.0.1syslog_protocol: tcpsyslog_tag: dataplaneapisyslog_level: debugsyslog_facility: local0log_types:- access