{{template "header.tpl" .}} {{template "server/navbar.tpl" .}} {{template "server/sidebar.tpl" .}}

Integrations Setup

{{if .Upgrade}}
{{end}} {{if (and .RDS (not .IntShowCW))}}

Setting Up AWS CloudWatch Integration

You can pull in metrics about the AWS RDS instance or Aurora replica associated with this PostgreSQL server into pgDash, via AWS CloudWatch. This supplies system-level information to complement the existing Postgres-level metrics to provide a comprehensive picture of the entire system.

To collect information via CloudWatch, add one more option to your existing pgmetrics command:

export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=us-west-2

pgmetrics --aws-rds-dbid=MYDBIDENTIFIER {..other args..} | pgdash {..other args..}
where MYDBIDENTIFIER is the "database identifier" you've specified in your AWS RDS configuration. In case of Aurora, specify the database identifier of the reader or writer replica you're connecting to. Instead of environment variables, you can also use IAM roles (if pgmetrics is running on an EC2 instance) or shared credentials files.

pgmetrics will also collect Enhanced Monitoring information if available. Turning this on for your RDS instance or Aurora replica is recommended.

Finally, note that AWS will charge you for the usage of CloudWatch APIs.

{{end}} {{if not .IntShowPgB}}

Setting Up PgBouncer Integration

If you are running PgBouncer instances that pool incoming connections to this PostgreSQL server, you can monitor them using pgDash.

To monitor a PgBouncer instance running on host PGBOUNCER-HOST listening on port PGBOUNCER-PORT, that has an admin user called ADMIN-USER, use the following command:

pgmetrics -h PGBOUNCER-HOST -p PGBOUNCER-PORT -U ADMIN-USER -wfjson pgbouncer |
  pgdash -a {{.APIKey}} report-pgbouncer {{.Name}} PGBOUNCER-HOST

If you need to supply a password, you can do:

PGPASSWORD=MYPASSWORD \
  pgmetrics -h PGBOUNCER-HOST -p PGBOUNCER-PORT -U ADMIN-USER -wfjson pgbouncer |
  pgdash -a {{.APIKey}} report-pgbouncer {{.Name}} PGBOUNCER-HOST

Set this command up as a cron job running every few minutes to regularly collect and report your PgBouncer metrics. Repeat for each PgBouncer instance pooling connections to this PostgreSQL server.

{{end}}
{{template "server/delete-modal.tpl" .}} {{template "server/sharing-modal.tpl" .}} {{template "footer-pre.tpl" .}} {{template "server/common-vars.tpl" .}} {{template "footer-post.tpl" .}}