Skip to content

Export server_audit.log to LOK AWS

0

Good morning.

I have an audit turned on, as per documentation below. https://aws.amazon.com/en/blogs/database/configuring-an-audit-log-to-capture-database-activities-for-amazon-rds-for-mysql-and-amazon-aurora-with- mysql-compatibility/

for that I would like to know if there is the possibility of exporting these logs to a system table, loki or making the logs be written in a table within mysql 5.7 in RDS

3 Answers
0

The document here indicates that the output will be in "/rdsdbdata/log/audit/".
In other words, the output is not in a table but in a file.
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.AuditPlugin.html

EXPERT
answered 3 years ago
EXPERT
reviewed 3 years ago
0

https://opsverse.io/2023/03/10/export-spring-boot-access-logs-to-grafana-loki/

Data can be pushed into Loki using log collection agents like Promtail. Promtail is an agent that runs on each node running your application servers and ships logs to a preconfigured Grafana Loki instance. For instance, a Spring Boot application can be configured to generate JSON-formatted access logs, and Promtail can pick up these logs and ship them to Loki​.

You may try to use Promtail to forward logs to the Loki

EXPERT
answered 3 years ago
0

Loki will need a shipper to push the log streams to its endpoint. Its easy to install an agent on a compute platform such as EC2 and run the log shipping agents on it (promtail, filebeat, etc). However, it is not possible to do that on an RDS. However, there are ways to extract the logs from RDS ( using an EC2 agent, lambda function, etc) and push it to loki to solve the log ingestion part. However, you will need a visualizer such as Grafana to view logs.

For your usecase, Cloudwatch is a possible option : https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.Procedural.UploadtoCloudWatch.html

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.