Update the database during runtime
Use the DeviceAtlas Update module to keep the contents of the device detection database current. This allows you to keep multiple HAProxy Enterprise nodes synced with the latest data.
Install a web server of your choice and host the database file at a URL where HAProxy Enterprise can access. For example, host the file at
http://192.168.122.1:8000/deviceatlas.json
.-
Install the package
hapee-2.8r1-lb-da-update
:$ # On Debian/Ubuntu $ sudo apt-get install hapee-2.8r1-lb-da-update
$ # On CentOS/RedHat/Oracle/Photon OS $ sudo yum install hapee-2.8r1-lb-da-update
$ # On SUSE $ sudo zypper install hapee-2.8r1-lb-da-update
$ # On FreeBSD $ sudo pkg install hapee-2.8r1-lb-da-update
-
Add the following lines to the
global
section of your configuration file, where the URL hosts an updated version of the file:global # ... other global settings module-load hapee-lb-da-update.so deviceatlas-update url
http://192.168.122.1:8000/deviceatlas.json delay 24h log
With this configuration, HAProxy Enterprise downloads the database every 24 hours and displays a message in the logs when it succeeds or if it encountered errors during the update.
deviceatlas-update
The deviceatlas-update
directive enables updating the database over HTTP from a specified URL. Updating a database with a newer version invalidates any cached lookups (if caching is used), unless you enable checksum
and the new and old database contents are identical.
The directive supports the following syntax:
deviceatlas-update url <url>
[delay <u> | xdelay <u s b r>]
[timeout <t>]
[retries <n>]
[checksum]
[hash]
[modified]
[source <addr>[:<port>]]
[log]
[dontlog-normal]
[param*]
where:
| Required. Specifies the database update URL. The updated data can be either JSON or precompiled JSON. |
| Specifies the period between each attempt to download a new database version. The delay is a simplified version of the |
|
|
| Specifies the HTTP connection timeout for attempts to download a new database vers - The value is set in milliseconds by default, but you can set it to any other unit if you add a unit suffix to the number. - Defaults to 5 seco |
| Specifies the number of retries to download a new DeviceAtlas database version. If not set, the global |
| If set, determines the use of the |
| If set, enables authentication of the downloaded d - Each file undergoing upgrade must have the associated file with |
| Specifies the use of the time from the |
| Sets the source address for outgoing connecti - |
| Specifies whether to log operation errors. |
| Deactivates logging of successful updates. |
| Lists other server parameters that are useful for configuring SSL features. |
Next up
DeviceAtlas API Reference