Reputation: 11
I have MySQL database running in an EC2 ubuntu 18.04 instance. I want to monitor the MySQL database using Percona. Since I heard Percona is a free tool, I want to monitor my DB using it.
Can anyone help me with the steps to configure and use it?
Thanks in Advance
Upvotes: 0
Views: 586
Reputation: 178
I am familiar with PMM(Persona Monitoring and Management) docker installation on ec2 instance
Firstly you need to install Docker 1.12.6 or higher to carry out this installation
Steps:
docker pull percona/pmm-server:2
docker create --volume /srv \
--name pmm-data \
percona/pmm-server:2 /bin/true
3)Run the image
docker run --detach --restart always \
--publish 443:443 \
--volumes-from pmm-data \
--name pmm-server \
percona/pmm-server:2
Then you can access the pmm-ui/interface on http://public-ip-ec2-instace:80 or https://public-ip-ec2-instance:443
Further you need to install Pmm-agent for mysql on mysql-database ec2 instance, also create user for Pmm on mysql
MySQL> CREATE USER 'pmm'@'localhost' IDENTIFIED BY 'pass' WITH MAX_USER_CONNECTIONS 10;
MySQL> GRANT SELECT, PROCESS, SUPER, REPLICATION CLIENT, RELOAD ON *.* TO 'pmm'@'localhost';
# yum list all | grep pmm
# yum install pmm2-client -y
pmm-admin
pmm-admin --version
pmm-admin config --server-insecure-tls --server-url=https://admin:admin@<pmm-server-ip>:443 # Pmm-server credentials
pmm-admin add mysql --username=pmm --password=pass --query-source=perfschema # Using credentials created for mysql user
Upvotes: 1