and aurora with pmm monitoring amazon rds...3 percona monitoring and management (pmm) • free, open...
TRANSCRIPT
Monitoring Amazon RDS and Aurora with PMM
2
Mykola Marzhan Release Engineer, Percona
I have been working as Release Engineer/Release Manager/DevOps for 10 years.I have been developing monitoring systems since 2004.I love my 7 year old daughter, downhill skiing, inline skates, and I love to organize community events etc.
3
Percona Monitoring and Management (PMM)
• Free, Open Source database monitoring and management platform for MySQL and MongoDB
• Runs in your secure environment (not a SaaS), on your equipment
• Secured with SSL encryption between pmm-client and pmm-server
• Provides metric information that enables administrators to optimize database performance
• Displays current queries and highlights potential query issues to enable faster query optimization
4
PMM distribution methods
• Docker
- Most common deployment method for PMM today
• AWS AMI
- Production-ready
- Available in all AWS regions
- Coming to AWS Marketplace during Q4 2017
• OVF
- Designed for virtualized environments (VirtualBox, VMware, OpenStack, etc)
- Can be used for one-off troubleshooting tasks
5
Why PMM is needed for RDS?
• CloudWatch has high-level metric which are enough for detect performance degradation
• PMM Metrics Monitor has plenty of low-level metrics for performance debug
• PMM Query Analytics allow to see the queries running in Aurora & RDS
• PMM has user-friendly interface with graph descriptions which allow you to find performance issues without context switching (to console)
6
Recommendations
• Run PMM on AWS in the same Availability Zone
• Enable performance_schema option in Parameter Groups
• statements_digest and events_statements_history are needed (enabled by default)
• Create separate database user for monitoring
7
Enable performance_schema
8
Add DB User
• GRANT SELECT, PROCESS, REPLICATION CLIENT ON *.* TO '<DB_USER>'@'%' IDENTIFIED BY '<DB_PASSWORD>' WITH MAX_USER_CONNECTIONS 10;
• GRANT SELECT, UPDATE, DELETE, DROP ON performance_schema.* TO '<DB_USER>'@'%';
How-to configure PMMPart 1: Query Analytics, Metrics Monitor
10
Start PMM Server (AMI)
• aws ec2 run-instances \ --region <AZ_NAME> --image-id <AMI_ID> \ --security-group-ids <PMM_SG> --instance-type t2.large \ --subnet-id <SUBNET_ID> --key-name <SSH_KEY_NAME>
• Open Web Interface, setup credentials
11
Start PMM Client
• sudo pmm-admin config --client-name RDS --server <EC2_PRIVATE_IP> \ --bind-address <EC2_PRIVATE-IP> --client-address <EC2_PUBLIC_IP> \ --server-user <PMM_USER> --server-password <PMM_PASSWORD>
• sudo pmm-admin add mysql \ --host <DB_ID>.cluster-<xxx>.<region>.rds.amazonaws.com \ --user <DB_USER> --password <DB_PASSWORD> <DB_ID>
How-to configure PMMPart 2: CloudWatch
13
CloudWatch
• aws iam create-user --user-name <IAM_NAME>
• aws iam attach-user-policy \ --policy-arn arn:aws:iam::aws:policy/CloudWatchReadOnlyAccess \ --user-name <IAM_NAME>
• aws iam create-access-key --user-name <IAM_NAME>
• mkdir -p /usr/share/grafana/.aws
• echo "[default]aws_access_key_id = <ACCESS_KEY>aws_secret_access_key = <SECRET_KEY>" > /usr/share/grafana/.aws/credentials
Using PMM
15
16
17
18
19
Metrics Monitor
• Advanced Data Exploration
• Amazon RDS OS Metrics
• Cross Server Graphs
• Disk Performance
• Disk Space
• Summary Dashboard
• System Overview
• Trends Dashboard
• MongoDB Cluster Summary
• MongoDB InMemory
• MongoDB MMAPv1
• MongoDB Overview
• MongoDB ReplSet
• MongoDB RocksDB
• MongoDB WiredTiger
• MariaDB
• PXC/Galera Cluster Overview
• PXC/Galera Graphs
• ProxySQL Overview
• MySQL InnoDB Metrics
• MySQL InnoDB Metrics Advanced
• MySQL MyISAM Metrics
• MySQL MyRocks Metrics
• MySQL Overview
• MySQL Performance Schema
• MySQL Query Response
• MySQL Replication
• MySQL Table Statistics
• MySQL TokuDB Metrics
• MySQL User Statistics
20
PMM CloudWatch Graphs
21
PMM CloudWatch Graphs
22
PMM CloudWatch Graphs
23
Thank You Sponsors!
24
SAVE THE DATE!
CALL FOR PAPERS OPENING SOON!www.perconalive.com
April 23-25, 2018Santa Clara Convention Center
Monitoring Amazon RDS and Aurora with PMM