pmm for rds - percona for … · 27/02/2018  · don’t use t2 instances for rds they don’t have...

16
Monitor RDS using PMM Mykola Marzhan Version: 27.02.18

Upload: others

Post on 17-Aug-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

Monitor RDS using PMMMykola Marzhan

Version: 27.02.18

Page 2: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

Mykola MarzhanRelease Engineer, Percona

AWS Certified Solutions Architect - Professional

I have been developing monitoring systems since 2004.

Page 3: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

CHAPTER 1: WHAT RDS IS?

AMAZON RELATIONAL DATABASE SERVICE

Page 4: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

CHAPTER 2: WHAT PMM IS?

Page 5: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

FREE, OPEN SOURCE DATABASE MONITORING PLATFORM FOR

MYSQL AND MONGODB

PERCONA MONITORING AND MANAGEMENT

Page 6: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

ON-PREMISES SOLUTION (NOT A SAAS)

PERCONA MONITORING AND MANAGEMENT

Page 7: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

PERCONA MONITORING AND MANAGEMENT

➤ Provides metric informationfor database/os performance optimization

➤ Displays current queries and statisticsfor query optimization

Page 8: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

HTTPS://PMMDEMO.PERCONA.COM/

PERCONA MONITORING AND MANAGEMENT

Page 9: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

CHAPTER 3: HOW TO RUN TOGETHER?

+

RDS

=

PMM PERFORMANCE

Page 10: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

ENABLE PERFORMANCE_SCHEMA

(TO COLLECT QUERY ANALYTICS DATA)

AMAZON RELATIONAL DATABASE SERVICE

Page 11: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

ENABLEENHANCED MONITORING

(TO COLLECT OS LEVEL METRICS)

AMAZON RELATIONAL DATABASE SERVICE

Page 12: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

➤ Don’t use T2 instances for RDSthey don’t have enough resources to handle replication and performance_schema load

➤ Use Elastic IP for PMM instanceto preserve Public IP between reboots

➤ Create separate DB userto provide only needed, read-only rights for PMM

➤ Create separate IAM User/Roleto provide only needed, read-only rights for PMM

AMAZON RDS RECOMMENDATIONS

Page 13: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD ON *.* TO '<DB_USER>'@'%' IDENTIFIED BY '<DB_PASSWORD>' WITH MAX_USER_CONNECTIONS 10;

GRANT SELECT, UPDATE, DELETE, DROP ON performance_schema.* TO '<DB_USER>'@'%';

DATABASE USER PERMISSIONS

Page 14: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

{ "Version": "2012-10-17", "Statement": [{ "Sid": "Stmt1508404837003", "Effect": "Allow", "Action": [ "rds:DescribeDBInstances", "cloudwatch:GetMetricStatistics", "cloudwatch:ListMetrics" ], "Resource": ["*"] }, { "Sid": "Stmt1508410723001", "Effect": "Allow", "Action": [ "logs:DescribeLogStreams", "logs:GetLogEvents", "logs:FilterLogEvents" ], "Resource": ["arn:aws:logs:*:*:log-group:RDSOSMetrics:*"] } ]}

IAM PERMISSIONS

Page 15: PMM for RDS - Percona for … · 27/02/2018  · Don’t use T2 instances for RDS they don’t have enough resources to handle replication and performance_schema load Use Elastic

LIVE DEMO

AMAZON RELATIONAL DATABASE SERVICE➤ Create Parameter

group

➤ Apply Parameter group to RDS instance

➤ Enable enhanced monitoring

➤ Create separate IAM User/Role

➤ Create separate DB user

➤ Start PMM instance

➤ Assign Elastic IP

➤ Update PMM