Papertrail can aggregate query logs from Amazon Relational Database Service (RDS), a hosted MySQL database service. Here’s how.
By default, Amazon RDS outputs slow query logs to a table in the RDS instance called
mysql.slow_log. If configured, all queries can be logged to
mysql.general_log. Here’s more.
2 methods exist to send RDS logs to Papertrail:
- William Cheung has created a standalone Play Framework app which retrieves these logs from RDS instances and aggregates them in Papertrail.
- Joe Shaw created a standalone Go app called rdstail to stream logs to Papertrail.
Setup: Play framework
To setup, read the README and watch this video:
Aggregating Amazon RDS query logs in Papertrail
To setup, visit rdstail README.
- In addition to the client-side filtering covered in the video, Papertrail can filter unnecessary messages. See log filtering.