Main Page
 The gatekeeper of reality is
 quantified imagination.

Stay notified when site changes by adding your email address:

Your Email:

Bookmark and Share
Email Notification
Project Analyzer
Purpose
The purpose of this tutorial is to illustrate how to get mySQL Jet Profiler setup to monitor a mySQL database in Amazon RDS (Relational Database Service) [link]. As you may already be aware of if you've worked with mySQL databases set up in Amazon RDS, you do not have the same level of administrative or root capability that you do if you were running your own mySQL database server locally; in most cases you probably would not realize it anyway.

In the case of mySQL database monitoring, a powerful tool is available called Jet Profiler which is similar to Microsoft's Query Analyzer. As you will see here, virtually any stat you can think of which you may need to be aware of (such as monitoring queries, as they come in) are at your disposal. Setting up Jet Profiler with a regular mySQL server is no different than the process used to set it up for a mySQL database in Amazon RDS with the exception of needing to perform a few "extra" steps.


(Enlarge)
  1. If you have a VPN VPC [link, link] setup and you've allowed access to the RDS instance, life should be fairly simple for you in connecting to the RDS instance.
  2. If you are not operating a VPN VPC, things are a little more involved. This tutorial will focus on the latter.
  3. One of the first things that need to be done is to setup a DB Security Group [link, link]. Once you have added your external-facing IP address to it, you should be able to connect to your RDS instance; I would recommend doing such over an SSH connection.
  4. The next thing that you will need to do it to set-up a database user who has sufficient permissions to allow Jet Profiler to work at its maximum capability. You can create a user (changing "jet-profiler-username" and "jet-profiler-password" with your own unique values) via:
    GRANT USAGE, SELECT, PROCESS, SHOW VIEW ON *.*
    TO jet-profiler-username@'%'
    IDENTIFIED BY 'jet-profiler-password';
  5. The first thing that you will want to do is to setup the poll interval in Jet Profiler (start with a long interval to "test the water" as it were and if you're not bogging down the instance, consider reducing the interval).

(Enlarge)
  1. Under "Connection Settings" you can set-up your connection to Amazon RDS. The "Server Host" that is asked for is what is known as the RDS instance endpoint in Amazon RDS-speak (which you can view by going into the RDS section and reviewing the database instance).
  2. The "Username" and "Password" is the user that you need to setup in the RDS instance that Jet Profiler will use to operate.
  3. While you could connect without using SSH, I'd recommend you utilize SSH. Jet Profiler has very similar SSH options as mySQL Workbench for our purpose of connecting to an RDS instance; see this screenshot of setting up mySQL Workbench to connect to an RDS instance by using the SSH pem file of an EC2 instance.
  4. You can ensure you have a successful connection by clicking on the button "Test Connection".

(Enlarge)
  1. As you can see here, from the "Top Queries" tab, queries as they are detected during a poll interval are shown.

(Enlarge)
  1. Top tables...

(Enlarge)
  1. Top schemas...

(Enlarge)
  1. Top users...

(Enlarge)
  1. Top IPs...
  2. Depending on how you've got things setup, the only IP's you would normally see here are "localhost" (such as from rdsadmin, or your website) and your external-facing IP address that you are using Jet Profiler with.

(Enlarge)
  1. Top States...

(Enlarge)
  1. Threads...

(Enlarge)
  1. Tables...

(Enlarge)
  1. Schemas...

(Enlarge)
  1. Users...

(Enlarge)
  1. IPs...

(Enlarge)
  1. States...

(Enlarge)
  1. Database user connections...

(Enlarge)
  1. Questions (Queries performed)...

(Enlarge)
  1. Com (commands performed)...

(Enlarge)
  1. Locks...

(Enlarge)
  1. Net (network traffic)...

(Enlarge)
  1. Handler reads...

(Enlarge)
  1. Handler writes...

(Enlarge)
  1. Scans...

(Enlarge)
  1. Innodb cache (innodb is recommended with mySQL Amazon RDS)...

(Enlarge)
  1. Innodb disk...

(Enlarge)
  1. Temp tables...

(Enlarge)
  1. Cost...


About Joe