@@ -45,7 +45,7 @@ decide whether you need to take actions:
45
45
* System events -- events related to modification or configuration of resources.
46
46
For example, such logs record the replacement of a space.
47
47
48
- * :ref: `User-defined events <audit-log-custom >`-- any events added manually using
48
+ * :ref: `Custom events <audit-log-custom >` -- any events added manually using
49
49
the audit module API.
50
50
51
51
The full list of available audit log events is provided in the table below:
@@ -62,7 +62,7 @@ The full list of available audit log events is provided in the table below:
62
62
* - Audit log enabled for events
63
63
- ``audit_enable ``
64
64
-
65
- * - :ref: `User-defined events <audit-log-custom >`
65
+ * - :ref: `Custom events <audit-log-custom >`
66
66
- ``custom ``
67
67
-
68
68
* - User authorized successfully
@@ -191,7 +191,7 @@ Tarantool provides the following event groups:
191
191
.. warning ::
192
192
193
193
Be careful when recording ``all `` and ``data_operations `` event groups.
194
- The more events you record, the slower the requests will be processed over time.
194
+ The more events you record, the slower the requests are processed over time.
195
195
It is recommended that you select only those groups
196
196
whose events your company really needs to monitor and analyze.
197
197
@@ -223,7 +223,7 @@ They are described in the following table.
223
223
- console
224
224
* - ``module ``
225
225
- Audit log module. Set to ``tarantool `` for system events;
226
- can be overwritten for user-defined events
226
+ can be overwritten for custom events
227
227
- tarantool
228
228
* - ``user ``
229
229
- User who triggered the event
@@ -544,10 +544,11 @@ Example:
544
544
545
545
.. _audit-log-custom :
546
546
547
- Create user-defined events
548
- --------------------------
547
+ Custom events
548
+ -------------
549
549
550
- Tarantool provides an API for writing user-defined audit log events.
550
+ Tarantool provides an API for writing custom audit log events.
551
+ To enable custom audit log events, specify the ``custom `` value in the :ref: `box.cfg.audit_filter <audit-log-filters >` option.
551
552
552
553
To add a new event, use the ``audit.log() `` function that takes one of the following values:
553
554
@@ -562,7 +563,7 @@ To add a new event, use the ``audit.log()`` function that takes one of the follo
562
563
Using the field ``audit.new() ``, you can create a new log module that allows you
563
564
to avoid passing all custom audit log fields each time ``audit.log() `` is called.
564
565
It takes a table of audit log field values (same as ``audit.log() ``). The ``type ``
565
- of the log module for writing user-defined events must either be ``message `` or
566
+ of the log module for writing custom events must either be ``message `` or
566
567
have the ``custom_ `` prefix.
567
568
568
569
Example
@@ -581,24 +582,16 @@ Example
581
582
tag = 'admin', description = 'Hello, Bob!'})
582
583
583
584
584
- Some user-defined audit log fields (``time ``, ``remote ``, ``session_type ``)
585
- are set in the same way as for a system event.
586
- If a field is not overwritten, it is set to the same value as for a system event.
585
+ It is possible to overwrite most of the custom audit log :ref: `fields <audit-log-structure >` using ``audit.new() `` or ``audit.log() ``.
586
+ The only audit log field that cannot be overwritten is ``time ``.
587
+ If a field is not overwritten, it is set to the same value as for a system event.
588
+ If omitted, ``session_type `` is set to the current session type, ``remote `` is set to the remote peer address.
587
589
588
- Some audit log fields you can overwrite with `` audit.new() `` and `` audit.log() ``:
590
+ .. note ::
589
591
590
- * type
591
- * user
592
- * module
593
- * tag
594
- * description
595
-
596
- .. note ::
597
-
598
- To avoid confusion with system events, the value of the type field must either be ``message `` (default)
599
- or begin with ``custom_ ``. Otherwise you will get the error message.
600
- User-defined events are filtered out by default.
601
- To enable user-defined audit log events, you must add ``custom `` to ``box.cfg.audit_filter ``.
592
+ To avoid confusion with system events, the value of the type field must either be ``message `` (default)
593
+ or begin with the ``custom_ `` prefix. Otherwise, you receive the error message.
594
+ Custom events are filtered out by default.
602
595
603
596
Example
604
597
~~~~~~~
0 commit comments