]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#943] added example configuration for legal_log library using database
authorWlodek Wencel <wlodek@isc.org>
Fri, 13 Dec 2019 10:31:32 +0000 (17:31 +0700)
committerTomek Mrugalski <tomek@isc.org>
Fri, 13 Dec 2019 14:09:27 +0000 (14:09 +0000)
doc/sphinx/arm/hooks.rst

index eafb9ade9c78b020da386aecdaf922be3d8d89ca..44f1dd4be354c4843ae64f6e1ed9000622fcf32c 100644 (file)
@@ -810,11 +810,13 @@ Configuring the Forensic Log Hooks
 
 To use this functionality, the hook library must be included in the
 configuration of the desired DHCP server modules. The legal_log library
-is installed alongside the Kea libraries in ``[kea-install-dir]/var/lib/kea``
-where ``kea-install-dir`` is determined by the "--prefix" option of the
-configure script. It defaults to ``/usr/local``. Assuming the default
-value, configuring kea-dhcp4 to load the legal_log library could be
-done with the following Kea4 configuration:
+is able to save logs to text file or into database (created using
+``kea-admin`` see :ref:`mysql-database-create`, :ref:`pgsql-database-create`).
+Library is installed alongside the Kea libraries in
+``[kea-install-dir]/var/lib/kea`` where ``kea-install-dir`` is determined
+by the "--prefix" option of the configure script. It defaults to
+``/usr/local``. Assuming the default value, configuring kea-dhcp4 to load
+the legal_log library could be done with the following Kea4 configuration:
 
 ::
 
@@ -848,7 +850,7 @@ To configure it for kea-dhcp6, the commands are:
        ]
    }
 
-Two hooks library parameters are supported:
+Two hooks library parameters for text file are supported:
 
 -  path - the directory in which the forensic file(s) will be written.
    The default value is ``[prefix]/var/lib/kea``. The directory must exist.
@@ -857,6 +859,27 @@ Two hooks library parameters are supported:
    current system date to form the current forensic file name. It
    defaults to ``kea-legal``.
 
+And additional parameters for database connection e.g:
+
+::
+   "Dhcp6": {
+       "hooks-libraries": [
+           {
+               "library": "/usr/local/lib/kea/hooks/libdhcp_legal_log.so",
+               "parameters": {
+                   "name":"database-name",
+                   "password":"passwd",
+                   "type":"mysql",
+                   "user":"user-name"
+               }
+           },
+           ...
+       ]
+   }
+
+For more specific information about database related parameters please refer to
+:ref:`database-configuration6` and :ref:`database-configuration4`.
+
 If it is desired to restrict forensic logging to certain subnets, the
 "legal-logging" boolean parameter can be specified within a user context
 of these subnets. For example: