AWS Getting Started
Getting Started with AWS RDS PostgreSQL and AWS Aurora
You can use pgDash with AWS RDS and Aurora, just like with any other PostgreSQL database server.
pgDash supports AWS RDS PostgreSQL and AWS Aurora with a PostgreSQL engine. For AWS Aurora, there is no difference between a reader and writer instance as far as pgmetrics and pgDash are concerned. Serverless and Global versions of Aurora are also supported.
The steps for using pgDash with AWS RDS PostgreSQL and with an Aurora reader/writer instance are the same.
The following steps should help you get up and running with monitoring your RDS instance with pgDash in just a few minutes.
In a nutshell, it involves setting up a periodic (cron) job on a system with access to the database (typically an EC2 instance in the same subnet) that connects to the RDS instance, collects metrics, and sends them to pgDash.
pgmetrics is an open-source, command-line tool that collects metrics from your RDS instance. It can display the results in a easy-to-read text format, or as JSON for sending it to other tools. pgmetrics is a single, statically-linked binary, which makes it easy to deploy. It also uses, by design, almost exactly the same arguments as the standard
psql
command. It also understands the same environment variables and .pgpass
file that other PostgreSQL CLI tools do.You can download the latest release of pgmetrics from GitHub here: https://github.com/rapidloop/pgmetrics/releases
Unpack the release and copy the
pgmetrics
binary to an EC2 instance with access to the database.The pgdash CLI tool is a simple command-line tool to send the output of pgmetrics to pgDash.
You can download the latest release of pgdash CLI from GitHub here: https://github.com/rapidloop/pgdash/releases
Unpack the release and copy the
pgdash
binary to the same EC2 instance as before.Assume you're able to connect to your database using
psql
like this:~$ psql -h mydbinstance.cipenhlkhjrl.us-east-1.rds.amazonaws.com -U wheel mydb
Password for user wheel:
Timing is on.
Null display is "~".
psql (10.6 (Ubuntu 10.6-0ubuntu0.18.10.1), server 11.1)
WARNING: psql major version 10, server major version 11.
Some psql features might not work.
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.
mydb=>