Agent (recommended)
OtterTune provides an open source agent capable of observing database and CloudWatch metrics that runs on your hosts. This allows OtterTune to optimize and monitor your database without needing direct access.
Selecting Ottertune Agent access method during Database Creation
The source code for OtterTune's agent is available on Github: https://github.com/ottertune/ot-agent

Agent Setup

When choosing to set up a database that is monitored by the OtterTune agent, you will be redirected to an Agent Setup page. If you need to return to this setup page you can navigate to the database you are interested in, navigate to the settings gear at the bottom left, and choose "View Agent Setup instructions".

Deployment Method

Cloudformation
Docker
Kubernetes
Helm
Ottertune will provide an external link to create a Fargate Container via AWS CloudFormation. Some fields will be prefilled for you, while others you will need to fill in.
You will need to supply the SecurityGroupIDs and SubnetIDs parameters such that the specified security groups and subnets allow:
    1.
    The container to connect to your database
    2.
    Outbound https traffic to 0.0.0.0/0 so that the container can push data to OtterTune.
For the other fields to fill in, see Agent Information below.
OtterTune provides a prebuilt docker container on dockerhub. A simple docker run command is provided on the AgentSetup page. Some values will be prefilled for you, while others need to be filled in. See Agent Information section below for more details.
OtterTune does not currently supply Kubernetes configurations. The OtterTune agent docker image may be used within your own helm setup if you would like to do so.
OtterTune does not currently supply Helm configurations. The OtterTune agent docker image may be used within your own helm setup if you would like to do so.

API Key

OtterTune will generate a secret API Key that can be used to authenticate Agent information being passed to the OtterTune service. This value can be retrieved by navigating to the Agent Setup page for any of your databases.
This API Key is a Secret value. Do not share it publicly.

Agent Information

Value
Description
OTTERTUNE_DB_IDENTIFIER
Amazon Web Services (AWS) db identifier for your database in Relational Database Service (RDS).
OTTERTUNE_DB_USERNAME
Username within DBMS software for Ottertune Agent to act as.
OTTERTUNE_DB_PASSWORD
Password for OtterTune to sign into the DBMS.
OTTERTUNE_API_KEY
Secret value used to authenticate your organization's agents with the OtterTune service.
AWS_REGION
AWS region your DBMS is located in (eg: us-east-2)
OTTERTUNE_DB_KEY
Identifier for the DBMS this agent is collecting information from. Should be autofilled by OtterTune.
OTTERTUNE_ORG_ID
Public identifier for your organization. Should be autofilled by OtterTune.
POSTGRES_OTTERTUNE_DB_NAME
Specific database in DBMS to collect metrics from. Only needed by agents connecting to a Postgres database. OtterTune collects table and index statistics in that specific database. You can set it to your busiest database.

AWS Credentials / Roles

Note: If you deployed via CloudFormation, you can skip this section. The proper policies and roles will be set up for you by CloudFormation.
The OtterTune Agent needs valid AWS credentials for a user or role to inspect the database and collect CloudWatch metrics for the database you wish to optimize. We recommend one of the following approaches:

Task Execution Role

Ensure your environment (e.g., kubernetes pod, fargate task, EC2 instance profile) is running as an IAM role with the appropriate permissions.
Additional Environment Variables
In addition to the environment variables mentioned in the Agent Information section, please provide the AWS access and AWS secret access keys for a user that has the appropriate AWS permissions.
Environment Variable
Description
AWS_ACCESS_KEY_ID
Access key of IAM user
AWS_SECRET_ACCESS_KEY
Secret access key of IAM user

Policies

The AWS role or user should contain at least the following permissions :
1
{
2
"Version": "2012-10-17",
3
"Statement": [
4
{
5
"Action": [
6
"rds:Describe*",
7
"cloudwatch:Get*",
8
],
9
"Resource": [
10
"*"
11
],
12
"Effect": "Allow"
13
},
14
]
15
}
Copied!

Agent Status

See possible Agent Statuses below for more information.
Uninitialized
Disconnected
Connected
Loading
Unknown
OtterTune has never seen an agent successfully report monitoring data for this database. Double check your agent setup. If you would like help reach out to [email protected] via email or to our team on slack.
OtterTune has never seen an Agent report observations succesfully for this database. Double check your agent setup. If you would like help reach out to [email protected] via email or to our team on slack.
OtterTune has seen your agent report information succesfully. No action needed.
Note: OtterTune considers an agent to be connected if it has reported data in the last 5 minutes, so expect a delay when you disable an agent.
OtterTune currently determining agent status. Remain on the page to see status.
OtterTune was not able to determine your current agent status. Try reloading the page. If you would like help reach out to [email protected] or reach out to our team on slack.
Last modified 15d ago