Percona Monitoring and Management (PMM) is an open-source monitoring platform designed for monitoring and gaining insights into database systems and having support for popular databases like MySQL, PostgreSQL, and MongoDB. It offers health monitoring, behavior analysis, troubleshooting, and database management capabilities across on-premises and cloud environments. PMM collects a wide range of performance metrics from databases and their hosts, visualizing the data through its web-based user interface. Additionally, PMM includes advisors that offer valuable insights and recommendations for assessing and improving database health.

It allows you to observe the health of your database systems, explore new patterns in their behavior, troubleshoot them, and perform database management operations no matter where they are located on-prem or in the cloud.

This tutorial focuses on Percona Monitoring & Management (PMM) and provides step-by-step instructions on installing it through Civo Marketplace. It also highlights the benefits of PMM and explains how to access and utilize its features for effective database monitoring and management.

Prerequisite

Before we are going to start, there are some prerequisites:

  1. Civo account
  2. Install Kubectl
  3. Kubernetes cluster launched

Installing PMM through the Civo marketplace

There are two ways to install PMM through Civo Marketplace:

1. Civo Marketplace UI

After successfully creating the Kubernetes cluster, login to the Civo dashboard and go to "Kubernetes" > "Kubernetes Cluster" > "Marketplace" as shown in the screenshot below:

Percona Monitoring & Management (PMM) on Civo marketplace

In the Marketplace section, select the ‘Monitoring’ tab, and click on ‘PMM.’ Click “Install Apps” from here to install the Percona Monitoring & Management application inside the cluster.

2. By using Civo CLI

To install PMM through CLI, please use the following command to install it:

civo kubernetes applications add PMM --cluster <CLUSTER-NAME>

For CLUSTER-NAME use the actual name of the Kubernetes cluster.

If there is no error during installation, the PMM application has been successfully installed into your cluster.

Note: During the installation of PMM via Civo Marketplace, please note that a load balancer will be automatically created at an additional cost. It is important to be aware that separate charges will apply for the load balancer service.

Accessing your Percona Dashboard

Now that we have installed the PMM in our Kubernetes cluster, and the PMM is exposed through the load balancer, we need to get the IP address of the load balancer. You can get the load balancer's IP through UI and the CLI.

To get the IP of LB through UI go to Kubernetes > Kubernetes Cluster. Then go to the load balancer section and copy the IP from the Civo Dashboard.

To get the IP of the load balancer through CLI, run the commands in the terminal given below:

export SERVICE_IP=$(kubectl get svc monitoring-service -o jsonpath="{.status.loadBalancer.ingress[0].ip}")
echo https://$SERVICE_IP

To access the PMM dashboard, open your preferred web browser and enter the IP address of the load balancer in the format https://{IP-OF-LOADBALANCER}. It will open the window with message "Your Connection is not Private". It appears due to a self-signed certificate, click on "Advanced" and then choose "Proceed to {IP-OF-LOADBALANCER}" to continue. You will be redirected to the PMM login page.

PMM dashboard

The default user name is "admin" and to get the password go to “Kubernetes” > “Kubernetes Cluster” > “Installed Application Tab” then click on PMM. Here you will see the username and password for the PMM dashboard, copy the credentials and use them to log in to PMM dashboard.

Now you have access to the PMM dashboard, let’s explore the PMM dashboard.

Overview of PMM

The PMM Dashboard UI consists of different sections:

  • User Interface: Provides an overview of the dashboard and navigation options.
  • Percona Alerting: Enables configuration and management of alerts for monitoring purposes.
  • Backup and Restore: Offers functionality for managing database backups and restoration.
  • Query Analytics: Provides tools and insights for analyzing and optimizing database queries.
  • Advisors: Offer automated insights and recommendations within PMM.

Each section offers distinct views and functionalities for monitoring, alerting, managing backups, analyzing queries, and configuring user roles and permissions. The UI provides a comprehensive interface for monitoring and managing your database environment. Let’s explore each section in detail.

User Interface

PMM Dashboard UI

The User Interface (UI) of Percona Monitoring and Management (PMM) offers a comprehensive dashboard for monitoring and managing your database environment. It provides visual representations of metrics, graphs, and charts to showcase performance data. The UI allows easy navigation across sections, providing access to various functionalities and customization options. Acting as a central hub, it enables efficient monitoring and analysis of database health and performance, empowering users to make informed decisions and optimize their systems.

Percona Alerting

PMM offers the Alerting feature, which helps detect unusual activities in your database environment and promptly notifies you to identify and resolve issues efficiently. When specific conditions require attention, Percona Alerting can be configured to send notifications via designated contact points. To access the Alerting feature, click on the Alert icon.

Percona Alerting

Within the Alerting feature, you can create two types of alerts: Percona templated alerts and Grafana managed alerts. You also have the flexibility to define alert rules, specifying the circumstances under which you want to be alerted. To create alert rules, navigate to the alert rules section on the Percona Alerting page and click on "New Alert Rule" as you can see in the screenshot below:

Percona New Alert Rule

In addition, you can leverage other functionalities within Alerting, such as creating alert rule templates, setting up notification policies, and more, to customize your alerting configuration based on your specific requirements.

Backup & Restore

As data backup is crucial for data protection, PMM offers backup management capabilities for MongoDB and MySQL databases. In the PMM dashboard, you can enable the Backup Management option through Advanced Settings to activate the backup functionalities.

PMM provides several functionalities for backup and restore operations. These include:

  • Create and restore backups for MongoDB and MySQL databases.
  • Automate backup scheduling to ensure regular and consistent backups.
  • Set retention policies to define how long backups should be retained.
  • Monitor backup and restore activities to track the status and progress of backup operations.

To perform backups in PMM, navigate to the Backup section within the PMM dashboard, for this click on the backup icon, this will take you to the backups page where you can manage your backups.

PMM Backup & Restore

To create a backup, click on the "Create Backup" button. Fill in the necessary details required to create the backup. Once you have provided the required information, initiate the backup creation process.

Query Analytics

The Query Analytics dashboard in PMM presents a user-friendly interface with a filter panel on the left and an overview panel on the right. The filter panel allows you to customize and apply filters based on your preferences. The overview panel displays the results based on the selected filters, providing an overview of query performance. To go to query analytics, click on the bar graph icon.

PMM Query Analytics dashboard

Clicking on a specific query listed in the overview section opens the Details panel, offering a comprehensive view of the query details. This panel provides additional information and insights about the query execution, helping users analyze and understand its behavior, performance metrics, and execution plans, as you can see in the screenshot below:

PMM performance metrics

Overall, the Query Analytics dashboard in PMM offers a convenient and informative interface to filter, analyze, and explore query performance data, enabling users to optimize query execution and enhance the overall efficiency of their database systems.

Advisors

Percona Advisors offers automated insights and recommendations within Percona Monitoring and Management (PMM) to proactively identify and address potential issues in your database environment. These advisors are categorized into Security, Configuration, Performance, and Query, with each category focusing on specific types of issues. Each advisor category includes a set of automated checks that investigate a range of possible problems, such as security risks, misconfigurations, and poor performance. To access the Advisor, click on the Advisor icon.

Percona Advisors

The availability of specific advisor checks depends on whether your instance is connected to the Percona Platform and your current subscription plan. The list of available advisor checks may vary accordingly. By leveraging the power of Percona Advisors, you can stay ahead of potential issues and take appropriate actions to ensure the security, stability, and optimal performance of your database environment.

Benefits of using Percona

Feature Description
Performance optimization PMM provides real-time monitoring and analysis of your database performance. It helps identify bottlenecks, slow queries, and other performance issues, allowing you to optimize your database environment for better performance and scalability.
Proactive monitoring and alerting PMM continuously monitors key performance metrics, such as CPU usage, memory usage, disk I/O, and query response times. It sends alerts and notifications when thresholds are breached, enabling you to identify and address potential issues before they impact your application's performance.
Query analytics and optimization PMM includes query analytics tools that capture and analyze SQL queries executed against your database. It helps you identify slow or inefficient queries, optimize them, and improve overall query performance.
Visualization and reporting PMM offers a user-friendly interface with intuitive dashboards and visualizations that provide a comprehensive view of your database performance. It allows you to track trends, identify patterns, and generate detailed reports for better decision-making and capacity planning.
Integration with popular databases PMM supports popular databases such as MySQL, PostgreSQL, and MongoDB, providing specific monitoring and management capabilities tailored to each database system. It integrates seamlessly with these databases, making it easy to deploy and use.
Scalability and resource optimization With PMM, you can monitor the resource utilization of your database servers and make informed decisions about scaling your infrastructure. It helps you identify underutilized resources and optimize resource allocation to improve efficiency and reduce costs.

Conclusion

In this tutorial, we have discussed the installation of the PMM through Civo Marketplace. We have explored the process of accessing and utilizing the PMM dashboard, along with its associated benefits.

For further insights into the PMM, you can take a look at: https://docs.percona.com/percona-monitoring-and-management/index.html

I hope you found this tutorial valuable and informative!

Further resources

If you're interested in learning more on this topic, check out these further resources: