Deploy this integration to ship logs from your MySQL database hosted on Amazon RDS to Logz.io using Docker.

Configuration

Before you begin, you’ll need:

  • MySQL database hosted on Amazon RDS
  • An active account with Logz.io
Pull Docker image
docker pull logzio/mysql-logs
Run the container
docker run -d --name logzio-mysql-logs -e LOGZIO_TOKEN=<<LOG-SHIPPING-TOKEN>> [-e LOGZIO_LISTENER=<<LISTENER-HOST>>] \
          -e AWS_ACCESS_KEY=<<AWS-ACCESS-KEY>> -e AWS_SECRET_KEY=<<AWS-SECRET-KEY>> -e RDS_IDENTIFIER=<<RDS-IDENTIFIER>> [-e AWS_REGION=<<AWS-REGION>>] \
          [-e RDS_ERROR_LOG_FILE=<<RDS-ERROR-LOG-FILE>>] [-e RDS_SLOW_LOG_FILE=<<RDS-SLOW-LOG-FILE>>] [-e RDS_LOG_FILE=<<RDS-LOG-FILE>>] \
          -v path_to_directory:/var/log/logzio -v path_to_directory:/var/log/mysql \
          logzio/mysql-logs:latest
Parameters
Parameter Description Required/Default
<<LOG-SHIPPING-TOKEN>> Your Logz.io account token. Replace <<LOG-SHIPPING-TOKEN>> with the token of the account you want to ship to. Required
<<LISTENER-HOST>> Your Logz.io account listener URL. Replace <<LISTENER-HOST>> with the host for your region. For example, listener.logz.io if your account is hosted on AWS US East, or listener-nl.logz.io if hosted on Azure West Europe. Required. Default: listener.logz.io
<<AWS-ACCESS-KEY>> A proper AMI credentials for RDS logs access (permissions for download-db-log-file-portion and describe-db-log-files are needed). Required
<<AWS-SECRET-KEY>> A proper AMI credentials for RDS logs access (permissions for download-db-log-file-portion and describe-db-log-files are needed). Required
<<RDS-IDENTIFIER>> The RDS identifier of the host from which you want to read logs from. Required
<<AWS-REGION>> AWS region of your account. Default: us-east-1
RDS-ERROR-LOG-FILE The path to the RDS error log file. Default: error/mysql-error.log
<<RDS-SLOW-LOG-FILE>> The path to the RDS slow query log file. Default: slowquery/mysql-slowquery.log
<<RDS-LOG-FILE>> The path to the RDS general log file. Default: general/mysql-general.log
<<INTERVAL-SECONDS>> RDS Sync interval. Default: 60 seconds
Check Logz.io for your logs

Give your logs some time to get from your system to ours, and then open Kibana.

If you still don’t see your logs, see log shipping troubleshooting.