Relic Solution: MySQL Integration - collecting data from Amazon RDS


How to make MySQL On Host Integration collect data from Amazon RDS.

Short introduction:

  • When using Amazon RDS monitoring integration customer has the following available Amazon RDS data.
  • When using On Host Integration an example MySQL On host Integration customer can see the following Metric data.
  • Here we will see how to collect metrics like query.slowQueriesPerSecond when using Amazon RDS MySQL. (Metrics like query.slowQueriesPerSecond are not supported by default when using only Amazon RDS monitoring integration).



1- Once you have installed the MySQL monitoring integration you will have the mysql-config.yml , Where you will enter the following credentials see the example below:

$ sudo vim /etc/newrelic-infra/integrations.d/mysql-config.yml

Please note: I skipped step 2 from Install and activate which says to create a new user for New Relic I just used the Master user admin already created by Amazon RDS which has the Master user account privileges. You can use the newrelic user if you prefer.

2- Once the mysql-config.yml file is updated restart the Infra-Agent with the command below:

sudo systemctl restart newrelic-infra

3- Once login to New Relic One Platform, you can see using Explore That you will have MySQL node “ node:yourRDSname"

4- In this case as we have the RDS integration enabled we can see the RDS instances as below too:

5- Below I had shown a quick test in order to populate the query.slowQueriesPerSecond:

A. I had Connected to the DB instance running the MySQL database engine

mysql -h -P 3306 -u admin -p

Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 24629
Server version: 5.7.33-log Source distribution
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


B. I ran the SELECT SLEEP(3) to simulate a slow query that would be running for 3 seconds. Please NOTE: That is your to configure the Slow queries on your RDS MySQL instance you have to follow the parameters configuration in this list:

mysql> SELECT SLEEP(3);
| SLEEP(3) |
| 0 |
1 row in set (3.01 sec)

C. Once you execute the Select Sleep command a few times, you can go to “Data Explore” ->> “Metrics” ->> Search for “Slow QueriesPerSecond” and you will see the populated data there:

I hope the above helps on those Concerns on how to have MySQL Integration collecting metrics For RDS MySQL Integration.