Enabling Databases
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.
After logging in, if you have already set up the IAM role integration with OtterTune, you will be navigated to the main dashboard. The dashboard shows all your databases with OtterTune enabled, as well as the rest of the AWS fleet that your IAM role has access to. If a database in your fleet is not displayed in the list, it might be because it was created very recently and we have not updated information from AWS, or because the DBMS of that database instance is not supported by OtterTune for now. (Currently, we only support MySQL, PostgreSQL, Aurora MySQL and Aurora PostgreSQL.)
Using the search box to find databases for which you would like to enable OtterTune
Here is how to enable OtterTune for a database in the fleet shown in the list:
  1. 1.
    Find the desired database. To use the search box, enter the AWS database identifier.
  2. 2.
    Click the "Enable OtterTune" button on the corresponding database entry. Verify that the AWS database identifier and the region are correct on the confirmation page.
  3. 3.
    Click "Confirm". When you see a success message, the basic functions of OtterTune has been enabled for this database, and you'll be redirected to an overview page of your database. You can establish connection between OtterTune and this database to get closer monitoring and start tuning now or later.
  4. 4.
    If you'd like to establish connection between OtterTune, follow the "Next Step" prompt on the overview page to proceed. More documentations on that can be found in the Connect Monitoring section.
Click here to proceed to connecting your database to OtterTune

Configure Database Settings

OtterTune needs some permissions to collect metrics from your database. 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.
pg_stat_statements.track
TOP
Required for pg_stat_statements to track top statements.
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
Postgres
Please enable Performance Schema on your RDS instance.
  • See this documentation to check whether Performance Insights is supported for your instance. If yes, please enable your Performance Insights to manage Performance Schema automatically. You don't need to reboot your instance.
  • If Performance Insights is not supported, you can follow this instruction to set the required Performance Schema parameters yourself, and reboot your instance.
Create the pg_stat_statements extension in the target database:
1
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
Copied!

Manually Enabling a Database

If you cannot find the desired database instance in the list of your AWS RDS fleet on dashboard, and you have verified that your IAM role has access to that database, you could manually add that database.

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.

Connect Monitoring

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.

Limitation to Add Instances

You may add more instances until reaching the limitation from your plan. For Aurora databases, each read/write replica will be counted as one instance.
Once you have reached the limitation, you may remove existing databases from OtterTune or upgrade your plan to add more databases.