AIStor supports publishing audit logs to one or more configured Apache Kafka receivers. AIStor send an event for each API operation to the receiver for processing and storage.
The receiver is responsible for correctly processing events, including returning 200OK or similar success messages upon receipt of the event. AIStor cannot recover events that were successfully sent but not correctly stored on the receiver.
You can configure a new Kafka audit endpoint using either environment variables or runtime configuration settings. If you configure both, AIStor uses the environment variables.
The following example code block displays all environment variables related to publishing audit logs to a Kafka. Commented variables (starting with a #) are optional. Add these environment variables to the /etc/default/minio environment file on all AIStor nodes.
You can use the mc admin config set command and the audit_kafka configuration key to configure one or more kafka logging targets.
The following example code displays all configuration settings related to publishing server logs to a kafka. Commented settings (lines starting with a #) are optional.
For options that require specifying a directory path, ensure the minio-user user and group have read, write, and list access to those resources. Where possible use chown and chmod to limit access and ownership to only the minio-user.
Restart AIStor to apply the new settings.
You can specify multiple kafka loggers by appending a unique identifier to each group of environment variables or settings. For example, MINIO_AUDIT_KAFKA_ENDPOINT_PRIMARY or mc admin config set alias audit_kafka:primary.