Loading

MySQL Enterprise module

Warning

This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.

This is a module for different types of MySQL logs. Currently focusing on data from the MySQL Enterprise Audit Plugin in JSON format.

To configure the the Enterprise Audit Plugin to output in JSON format please follow the directions in the MySQL Documentation.

Tip

Read the quick start to learn how to configure and run modules.

This module has been tested against MySQL Enterprise 5.7.x and 8.0.x

You can further refine the behavior of the mysqlenterprise module by specifying variable settings in the modules.d/mysqlenterprise.yml file, or overriding settings at the command line.

You must enable at least one fileset in the module. Filesets are disabled by default.

Each fileset has separate variable settings for configuring the behavior of the module. If you don’t specify variable settings, the mysqlenterprise module uses the defaults.

For advanced use cases, you can also override input settings. See Override input settings.

Tip

When you specify a setting at the command line, remember to prefix the setting with the module name, for example, mysqlenterprise.audit.var.paths instead of audit.var.paths.

Example config:

- module: mysqlenterprise
  audit:
    var.input: file
    var.paths: /home/user/mysqlauditlogs/audit.*.log
var.paths
An array of glob-based paths that specify where to look for the log files. All patterns supported by Go Glob are also supported here. For example, you can use wildcards to fetch all files from a predefined level of subdirectories: /path/to/log/*/*.log. This fetches all .log files from the subfolders of /path/to/log. It does not fetch log files from the /path/to/log folder itself. If this setting is left empty, Filebeat will choose log paths based on your operating system.
var.tags
A list of tags to include in events. Including forwarded indicates that the events did not originate on this host and causes host.name to not be added to events. Defaults to [mysqlenterprise-audit].

MySQL Enterprise Audit fields are mapped to ECS in the following way:

MySQL Enterprise Fields ECS Fields
account.user server.user.name
account.host client.domain
login.os client.user.name
login.ip client.ip
startup_data.os_version host.os.full
startup_data.args process.args
connection_attributes._pid process.pid
timestamp @timestamp

For a description of each field in the module, see the exported fields section.