You may want to ignore audit log generation for certain Admin API
requests, such as requests to the /status
endpoint for
health checking, or to ignore requests to a specific path prefix, for example, a given Workspace.
You can use the following configuration options in kong.conf
:
Parameter |
Description |
audit_log_ignore_methods
|
Comma-separated list of HTTP methods that
will not generate audit log entries. By
default, all HTTP requests will be logged.
|
audit_log_ignore_paths
|
Comma-separated list of request paths that
will not generate audit log entries. By
default, all HTTP requests will be logged.
|
For example, if you set audit_log_ignore_methods = GET,OPTIONS
, you won’t get any audit log entries for GET
or OPTIONS
requests.
The values of audit_log_ignore_paths
are matched via a Perl-compatible regular expression.
For example, when you configure audit_log_ignore_paths = /foo,/status,^/services,/routes$,/one/.+/two,/upstreams/
,
the following request paths don’t generate an audit log entry in the database:
/status
/status/
/foo
/foo/
/services
/services/example/
/one/services/two
/one/test/two
/routes
/plugins/routes
/one/routes/two
/upstreams/
bad400request
The following request paths generate an audit log entry in the database:
/example/services
/routes/plugins
/one/two
/routes/
/upstreams
As with request audit logs, you may want to skip generation of audit logs
for certain database tables:
Parameter |
Description |
audit_log_ignore_tables
|
Comma-separated list of database tables that
will not generate audit log entries. By
default, updates to all database tables will
be logged (the term “updates” refers to the
creation, update, or deletion of a row).
|
For example, audit_log_ignore_tables = consumers
would skip generating audit logs for changes to the Consumers table.