AUDITD-PLUGINS(5) | System Administration Utilities | AUDITD-PLUGINS(5) |
auditd-plugins - realtime event receivers
auditd can multiplex audit events in realtime. It takes audit events and distributes them to child programs that want to analyze events in realtime. When the audit daemon receives a SIGTERM or SIGHUP, it passes that signal to its child processes so that can reload the configuration or terminate.
The child programs install a configuration file in a plugins directory which defaults to /etc/audit/plugins.d. This can be controlled by a auditd.conf config option plugin_dir if the admin wished to locate plugins somewhere else. But auditd will install its plugins in the default location.
The plugin directory will be scanned and every plugin that is active will be started. If the plugin has a problem and exits, it will be started a maximum of max_restarts times as found in auditd.conf.
Config file names are not allowed to have more than one '.' in the name or it will be treated as a backup copy and skipped. Config file options are given one per line with an equal sign between the keyword and its value. The available options are as follows:
auditd has an internal queue to hold events for plugins. (See the q_depth setting in auditd.conf.) Plugins have to watch for and dequeue events as fast as possible and queue them internally if they can't be immediately processed. If the plugin is not able to dequeue records, the auditd internal queue will get filled. At any time, as root, you can run the following to check auditd's metrics:
auditctl --signal cont ; sleep 1 ; cat /var/run/auditd.state
If auditd's internal queue fills, it cannot dequeue any events from the kernel backlog. If the kernel's backlog fills, it looks at the value of backlog_wait_time to delay all processes that generate an event to see if there is eventually room to add the event. This will likely be noticed as slowing down various processes on the machine. The kernel's audit subsystem can be checked by running:
auditctl -s
When tuning the audit system's performance, you'd want to check both kernel and auditd metrics and adjust accordingly.
/etc/auditd/auditd.conf /etc/audit/plugins.d
Steve Grubb
Aug 2022 | Red Hat |