An automation tool for generating pgBadger reports from Amazon RDS PostgreSQL database instances.
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.ruby-gemset
.ruby-version
Gemfile
Gemfile.lock
MIT-LICENSE
README.md
rds-pgbadger.rb

README.md

RDS PgBadger

A tool to easily download logs from an AWS RDS instance and generate pgBadger reports.

Dependencies

pgBadger must be installed. Download and install from the site or on OSX run brew install pgbadger.

Setup your AWS credentials in your ~/.fog file. Example:

env1:
  aws_access_key_id: tacos
  aws_secret_access_key: foobar
env1:
  aws_access_key_id: cats
  aws_secret_access_key: foobaz

If you do not have a fog file, the AWS SDK will try to use its regular credential resolving methods.

Usage

Execute the Ruby script proving the target environment and RDS instance identifier.

./rds-pgbadger.rb -e env1 -i my-rds-instance

It will download the log files and generate a report in the out folder named after the instance id and a timestamp of when the script executed.

You can additionally filter the retrieved log files by date:

./rds-pgbadger.rb -e env1 -i my-rds-instance -d 2015-01-13