PMM for RDS - Percona for … · 27/02/2018 · Don’t use T2 instances for RDS they don’t have...
Transcript of PMM for RDS - Percona for … · 27/02/2018 · Don’t use T2 instances for RDS they don’t have...
![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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/1.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/2.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/3.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/4.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/5.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/6.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/7.jpg)
PERCONA MONITORING AND MANAGEMENT
➤ Provides metric informationfor database/os performance optimization
➤ Displays current queries and statisticsfor query optimization
![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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/9.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/10.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/11.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/12.jpg)
➤ 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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/13.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/14.jpg)
{ "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](https://reader036.fdocuments.net/reader036/viewer/2022071001/5fbd3dbdd23f4e267013ff42/html5/thumbnails/15.jpg)
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