Here is a small HowTo about installing the Percona Monitoring and Management (PMM) server using the AWS Marketplace.
Requirements:
AWS account
Web-browser with enabled JavaScript
Cup of coffee
For the first you need to open the AWS Marketplace page and search for “Percona Monitoring and Management Server” or just click to this direct link.
Here you click to Continue to Subscribe and you’ll be redirected to the Subscribe to this software page. On this page you may look at details about your subscription, additional taxes and etcetera.
Let’s click Continue to Configuration.
On the next page, called Configure this software you need to choose the version of PMM and region, then click Continue to Launch button.
On the Launch this software page you need to choose:
Choose action: Launch from website
EC2 Instance Type: Any type of instance that suits your needs, t2.medium will be used in this example
Scroll down to the VPC Settings block, here you can set:
Virtual Private Cloud (VPC) – If not exists, then need to create a new one
Subnet – For communication between instances in VPC
Security group – In settings of selected security group an Inbound and Outbound rules should have permissions for connection through SSH, HTTP and HTTPS protocols form any IP-addresses
Key pair – Need to create a new one if not exists
Click the Launch button when you are ready.
If everything is okay you’ll see a page like above, to check the initialization status go to the page EC2 Console.
From the Instances page you may copy an IP-address of the instance and connect to it via web-browser, ignore Self-Signed Certificate warning.
Here for login you need to input the ID of the instance from AWS Console, copy and paste it.
After that, the web-browser redirects you to the final setup page.
Here you need input username and password.
Default username: admin
Default password: admin
On the next step you may have to reset the default password or skip this step.
There are plenty of proprietary DB monitoring services, but did you know there is a great open-source alternative – Percona Monitoring and Management (PMM)? PMM provides monitoring, alerts, and query analysis for MySQL, PostgreSQL, MongoDB, and others. The package is open source, has a large community, and can be set up in minutes.
What do you get once the Percona PMM is set up?
There are 3 main features of Percona Monitoring and Management: monitoring, alerts, and query analytics.
Monitoring
Once you complete the PMM setup, you already have plenty of preset Grafana-based dashboards. These dashboards display the info about:
Your host machine
CPU load
RAM usage
Network usage
Disk usage
Disk space forecast
Uptime
Etc.
Your database
Connections
Queries Per Second
Uptime
Etc.
PMM Server UI
These default dashboards are already customisable dashboards that help you keep an eye on the infrastructure.
Alerts
Real-time alerts notify you if something goes wrong.
Query analysis
PMM helps you with troubleshooting by providing data from a high-level overview to query-level analytics.
5 Steps To Set Up DB Monitoring With PMM
The PMM consists of 2 parts:
Client (Agent)
Server
PMM Agent should be installed on your database host machine. It will be collecting telemetry data about the host machine and database(s) and sending it to the PMM Server.
PMM Arcitecture
Unlike most cloud-based monitoring services, the PMM Server is a part you should also care about. It will store and process all the telemetry data received from agents, and provide UI for analysis.
There are 5 steps to set up PMM for DB monitoring:
Set up a PMM Server
Set up a PMM Agent
Connect the Agent to the Server
Connect DB to the Agent
Customise Dashboards and Alerts
Let’s look into the details of each step.
1. Set up a PMM Server
You can get a fully managed PMM Server at hostedpmm.com in several clicks or deploy it by yourself.
If you want to host a PMM server by yourself, you need a VPS that meets PMM Server requirements. It will be processing all the telemetry data from your infrastructure, so it needs up to 2 GB per monitored DB. The PMM Server will also be storing all the telemetry data for some time. It requires around 1 GB of storage per monitored database per week.
Once you have a VPS, you can install PMM Server. For example, you can use an easy-install script by running
Not everyone wants to set up docker to their DB host machine just for monitoring. The binary package is hard to update compared to the package manager way to install. So we advise using package manager installation.
An option –server-insecure-tls should be used if you haven’t installed SSL certificates to the PMM Server.
💡 This process might be tricky but is recommended for security reasons. You can avoid this routine by getting a fully managed PMM server at hostedpmm.com. There you can get SSL ready PMM server in a few clicks.
After connecting the PMM agent to the PMM Server, you are already able to see your host machine metrics.
PMM Server metrics UI
But as you can see, there is N/A for all the DB-related metrics. So we need to connect DB to the agent.
4. Connect DB to the Agent
It is good practice to create a dedicated non-superuser account to connect the database instance to PMM Agent. E.g. user with name pmm, password pass, and the necessary permissions.
Connecting your DB to the PMM Agent depends on your DB. Basically, you need to run a command in DB. For example, MySQL commands look like this:
CREATE USER 'pmm'@'localhost' IDENTIFIED BY 'pass' WITH MAX_USER_CONNECTIONS 10;
GRANT SELECT, PROCESS, REPLICATION CLIENT, RELOAD, BACKUP_ADMIN ON *.* TO 'pmm'@'localhost';
Then you should add a service using PMM Server UI
After that, you should be able to see DB metrics in your PMM Server web UI.
The basic DB monitoring setup is done! We can improve it by customising PMM for your needs.
5. Customise Dashboards and Alerts
There are a lot of preset dashboards but you can customize them for your tasks and workflows.
E.g. if you want an alert for some condition, you can easily set it up.
That’s it! 🎉
Now you have great monitoring for your infrastructure setup. You can keep an eye on a load, check drive usage forecast, and scale in advance. Get alerts if something goes wrong and increase the availability of your service. Use query analysis to find out which requests need to be optimised and improve your service responsiveness.The easiest way to get PMM Server for DB monitoring is HostedPMM.
The easiest way to get PMM Server for DB monitoring is HostedPMM.
Get a Hosted PMM Server and Receive a $200 Bonus
The easiest way to get a PMM Server is hostedpmm.com. It takes several clicks and a couple of minutes.
Everyone who signs up through December 31 will receive a $200 bonus credit.
Get open source PMM up and ready for monitoring your databases in a few clicks.
We are excited to announce the launch of the HostedPMM beta release! Hosted PMM is a service that allows you easily spin up a fully managed PMM server for monitoring databases in minutes.
Percona Monitoring and Management (PMM) is an open-source database monitoring package loved by app developers and database administrators. PMM enables database performance monitoring, query analysis, real-time alerting, and much more! However, setting up PMM may be a complex process that involves deployment, network configuration, installing SSL certificates, and connecting agents. Managing PMM may also become a time-consuming distraction requiring specific skills.
HostedPMM removes all this trouble, by providing a ready-to-use PMM server, a perfect solution for database monitoring and query analysis. HostedPMM automates the following operations for each user:
Spawn a virtual machine
Deploy a PMM server to it
Perform initial configuration
Set up DNS and SSL for a custom domain
With HostedPMM you get a fully-functional PMM server in minutes!
PMM is a great open-source solution to find and resolve database issues. But it is a bit complicated to set up and support so we decided to make these processes as easy as possible. I believe that HostedPMM will help you spend more time on the product, not infrastructure.
Sergei Krupnik, HostedPMM Product Owner.
After you start a PMM server with HostedPMM can rely on us continuously taking care of it, including:
PMM server availability
Security updates
Infrastructure scaling
Telemetry data backups
Moreover, HostedPMM users can contact our team for support and assistance to get the most out of PMM using best practice methods for database monitoring.
We need to monitor several high-load MySQL database clusters. Previously we used a self-hosted PMM server and had to do a lot of work that seemed to be unnecessary. We were paying for VPS, kept eye on backups, and even had to monitor our monitoring system. That is ridiculous.
It is great that now we basically can outsource PMM hosting, monitoring, scaling, and support. HostedPMM just works and we are not bothered with these routines anymore.
Valery Panov, Head of Infrastructure team at Ivinco.
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies and agree to our Privacy Policy. However, you may visit "Cookie Settings" to provide a controlled consent.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.