Add Database
In this section, we discuss how to establish a connection between your database and OtterTune. This is how OtterTune collects database-specific metrics.
Important Before you can connect your database, make sure to complete the steps in Create IAM Role.

Configure Database Settings

Configure the following parameters in the DB parameter group. AWS does not allow you to modify parameters using the database command line, please follow the instructions to modify parameters in a DB parameter group.
MySQL
PostgreSQL
All versions of MySQL.
Knob
Value
Description
innodb_monitor_enable
module_trx
Required for collection of transaction counters. OtterTune uses such metrics to calcuate throughput. Please see the MySQL documentation for more information.
All versions of PostgreSQL.
Knob
Value
Description
shared_preload_libraries
pg_stat_statements
Required for collection of query latency metrics. OtterTune uses such metrics to calculate percentile query latency (like P99 query latency). Please see the PostgreSQL documentation for more information.
To calculate the percentile query latency (like P99 query latency) and use it as a target objective, you need to allow collecting query latency metrics from the target database.
MySQL
PostgreSQL
Please enable Performance Insights on your RDS instance.
(db.t3.micro and db.t3.small instances do not support Performance Insights)
Create the pg_stat_statements extension in the target database:
1
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
Copied!

Provider and Database System

Select Amazon AWS RDS for the provider and the system type for your RDS database:

Database Information

Enter the following database information:
  • Amazon DB Identifier: The DB identifier for the RDS instance assigned by AWS. You can find the field DB identifier or DB instance ID in the RDS Management Console.
  • Region: The AWS region where the RDS instance is hosted.
  • Database Name (PostgreSQL only): The name of the specific database on your PostgreSQL server to collect metrics from. OtterTune collects table and index statistics from that database. You can view all of the databases on the PostgreSQL server by connecting to psql and running the \list (or \l) meta-command.
  • Database Nickname: A nickname of your choice for the RDS instance to display in the OtterTune Dashboard.

Networking

Use one of the following methods to connect your database for metric collection. The Agent is recommended.
  • Agent (recommended): Run the OtterTune agent on your hosts. It connects to your database and sends metrics back to OtterTune.
  • Guarded Public Access: Modify the database instance to be publicly accessible so that approved external actors outside the VPC can connect to the instance. You define the security groups for supported external actors.
Last modified 1mo ago