Percona Monitoring and Management Documentation
Percona Monitoring and Management Documentation
Management
Documentation
2.37.1 (Jun 05, 2023)
Table of contents
1. Welcome 3
2. Setting up 7
3. Get Started 10
4. How to 12
5. Details 14
6. DBaaS 16
7. FAQ 27
7.9 Can I add an AWS RDS MySQL or Aurora MySQL instance from a non-default AWS partition? 28
7.14 What are my login credentials when I try to connect to a Prometheus Exporter? 30
7.16 How to change the PMM password for a default admin user? 31
8. Release Notes 33
1. Welcome
Percona Monitoring and Management (PMM) is an open source database monitoring, management, and observability solution
for MySQL, PostgreSQL, and MongoDB.
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.
• PMM collects thousands of out-of-the-box performance metrics from databases and their hosts.
This is the documentation for the latest release, PMM 2.37.1 (Release Notes).
Here’s how the home page looks on our free, live demo system.
PMM runs in the cloud, on-prem, or across hybrid platforms. It’s supported by our legendary expertise in open source
databases, and by a vibrant developer and user community.
A minimal PMM set-up comprises one server and a client agent on every system you want to monitor.
• Setting Up explains in detail how to set up PMM Server, clients, and how to add services.
• Setting up
• How to configure
• How to upgrade
• pmm-admin
• Architecture
For Users
• User interface
• Dashboards reference
Welcome
User Interface
Server Client Percona Alerting Manage Users
components
Linux
External Services
HA Proxy
Remote Instances
1.2.2 Contact us
For paid support and managed or consulting services , contact Percona Sales.
2. Setting up
There are three stages to installing and setting up PMM.
Summary
3. Add services.
Choose from:
Virtual 1. Easily import into Hypervisor of your 1. More system resources compared to Docker
appliance choice footprint.
The choices:
• With Docker;
How you do this depends on the type of service. You can monitor:
• MySQL (and variants: Percona Server for MySQL, Percona XtraDB Cluster, MariaDB);
• MongoDB;
• PostgreSQL;
• ProxySQL;
• Amazon RDS;
• Microsoft Azure;
• Google Cloud Platform (MySQL and PostgreSQL);
• Linux;
• External services;
• HAProxy;
• Remote instances.
2.3.1 Contact us
For paid support and managed or consulting services , contact Percona Sales.
3. Get Started
• User Interface
• Using the web-based user interface.
• Finding dashboards.
• Annotating events.
• Percona Alerting
• Backup and Restore
• Query Analytics, a specialized dashboard for detailed query analysis.
These features are currently only available for PMM Admin users:
• Backup
• DBaaS
• Percona Alerting
• Advisors
To use these features you must be logged in as a PMM Admin user and activate the features.
If you are logged in as a user that has a Viewer or Editor role you’ll see an ‘insufficient access’ message when trying to use these
features.
3.0.1 Contact us
For paid support and managed or consulting services , contact Percona Sales.
4. How to
• Configure via the PMM Settings page.
• Manage users via the PMM Users page.
4.0.1 Contact us
For paid support and managed or consulting services , contact Percona Sales.
5. Details
• Architecture: High-level architecture and main components.
• User interface components: Descriptions of the main menus and icons.
• PMM components and versions: PMM components and their version used in PMM.
• Commands:
• pmm-admin: The manual page for the PMM administration tool.
• pmm-agent: The manual page for the PMM Client agent program.
• ClickHouse: A third-party column-oriented database management system (DBMS) that facilitates the Query Analytics
functionality.
• PostgreSQL: An open source object-relational database management system used as the primary data store.
5.0.1 Contact us
For paid support and managed or consulting services , contact Percona Sales.
6. DBaaS
It allows you to utilize the benefits of Kubernetes and Percona’s operators to run and manage database clusters.
DBaaS feature is available for PMM Admin users DBaaS functionality is currently in technical preview and is subject to change.
Contact us
For paid support and managed or consulting services , contact Percona Sales.
DBaaS uses OLM to install and update operators. PMM installs OLM and Operator Catalog during the registration of the
Kubernetes cluster.
An Operator catalog is a repository of metadata that Operator Lifecycle Manager (OLM) can query to discover and install
Operators and their dependencies on a cluster. OLM always installs Operators from the latest version of a catalog and if a
new version of an operator becomes available, OLM can upgrade it once the user has accepted the upgrade. DBaaS uses its
own catalog for OLM that has the following operators:
1. DBaaS operator
2. PXC operator
3. PSMDB operator
Percona Catalog is an OLM catalog that stores ClusterServiceVersions and CustomResourceDefinitions for creation in a
cluster, and stores metadata about packages and channels. It’s a source of truth for the available versions of operators ready
to use in DBaaS
DBaaS operator is responsible for creating and managing databases following operator pattern and depends on underlying
operators for running database clusters. It provides a simplified API to manage database clusters via kubectl .
Contact us
For paid support and managed or consulting services , contact Percona Sales.
Database clusters can be created from templates using PMM. Database cluster Template allows operators to customize
Database Clusters based on their requirements, environments, or infrastructure.
Examples
• Data clusters: Different load patterns, such as simple reads, heavy writes, 50%/50% read/write, and the number of
connections.
• Infrastructure - Different parameters and tuning for the resulting cluster: such as network configuration (load
balancing, exposure), storage classes/types, etc.
• Environment: Combination of database cluster and infrastructure that will affect the database cluster configuration.
The following example shows how DBaaS users can create PXC DB clusters from a template that sets a custom MySQL
configuration. The default MySQL configuration is the following:
[mysqld]
wsrep_provider_options="gcache.size=600M"
Note
PXC DB configuration can be customized based on your needs. This can be accomplished by creating a template and changing that
field.
1. Identify the field(s) of interest by reading the PXC operator documentation and the PXC CRD. In this case, you have to
change the spec.pxc.configuration field.
2. Create a template CRD pxctpl-crd-pxc-configuration.yaml with just those small subset of fields.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null
name: pxctemplatepxcconfiguration.dbaas.percona.com
labels:
dbaas.percona.com/template: "yes"
dbaas.percona.com/engine: "pxc"
spec:
group: dbaas.percona.com
names:
kind: PXCTemplatePXCConfiguration
listKind: PXCTemplatePXCConfigurationList
plural: pxctemplatepxcconfiguration
singular: pxctemplatepxcconfiguration
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
pxc:
properties:
configuration:
type: string
type: object
type: object
status:
type: object
type: object
served: true
storage: true
In order for the dbaas-operator to apply the template it needs access to the template CRs:
DBAAS_OPERATOR_MANAGER_ROLE=$(kubectl get clusterroles | grep dbaas-operator | grep -v metrics | grep -v proxy | cut -f 1 -d ' '); kubectl get
clusterroles/"$DBAAS_OPERATOR_MANAGER_ROLE" -o yaml > dbaas-operator-manager-role.yaml
cat <<EOF >>dbaas-operator-manager-role.yaml
- apiGroups:
- dbaas.percona.com
resources:
- pxctemplatepxcconfiguration
verbs:
- get
- list
EOF
apiVersion: dbaas.percona.com/v1
kind: PXCTemplatePXCConfiguration
metadata:
name: pxc-config-max-connections-789
labels:
dbaas.percona.com/template: "yes"
dbaas.percona.com/engine: "pxc"
spec:
pxc:
configuration: |
[mysqld]
max_connections = 789
2. On the Advanced Settings panel, select the template from the Templates drop-down.
3. Click Create .
CONTACT US
For paid support and managed or consulting services , contact Percona Sales.
Caution
You can add a backup schedule while creating DB clusters in DBaaS. This feature is a fusion of backup management and
DBaaS in PMM. Currently, DBaaS only supports scheduled backups, which can only be enabled when a database cluster is
created.
Prerequisites
From the main menu, navigate to Configuration → Settings → Advanced Settings → Backup Management to enable
Backup management.
2. Add a backup storage location:
Note
From the main menu, navigate to Backups → Storage Locations → Add storage location and enter all the required
information to add a backup storage location. For details, see Prepare a storage location.
4. Set the schedule for when scheduled backups should take place:
From the drop-down select the Scheduled time when you want the backup to take place.
5. Click Create.
You can create a DBaaS cluster from a backup stored on S3. You can use backups from an existing cluster to spin up a new
database cluster from this backup.
4. Click Create.
Contact us
For paid support and managed or consulting services , contact Percona Sales.
7. FAQ
• Disk: 100 MB
See also
You must set up PMM 2 and connect your existing clients to it.
When all data is registered in PMM2 and expired in PMM1, decommission your PMM1 instance.
See also
See also
See also
Setting Up/Client/MySQL.
You can add multiple instances of MySQL or any other service to be monitored from the same PMM Client.
To do this, you provide a unique port and IP address, or a socket for each instance, and specify a unique name for each. (If a
name is not provided, PMM uses the name of the PMM Client host.)
For example, to add MySQL monitoring for two local MySQL servers:
See also
When you remove a monitoring service, previously collected data remains available in Grafana. However, the metrics are tied
to the instance name. So if you add the same instance back with a different name, it will be considered a new instance with a
new set of metrics. So if you are re-adding an instance and want to keep its previous data, add it with the same name.
7.9 Can I add an AWS RDS MySQL or Aurora MySQL instance from a non-default AWS
partition?
By default, the RDS discovery works with the default aws partition. But you can switch to special regions, like the GovCloud
one, with the alternative AWS partitions (e.g. aws-us-gov ) adding them to the Settings via the PMM Server API.
To specify other than the default value, or to use several, use the JSON Array syntax: ["aws", "aws-cn"] .
Standard 60 10 5
Frequent 30 5 1
Custom (defaults) 60 10 5
See also
Metrics resolution
For this, you must configure alerting rules that define conditions under which an alert should be triggered, and the contact
points used to send the alert (e.g. email).
Percona templated alerts enable you to create alerts based on built-in or custom templates to simplify the alert setup process.
Grafana managed alerts allows attaching rules to your dashboard panel and enables you to create more sophisticated alerting
rules. In addition, it can be easier to manage installations with a large number of hosts. This additional flexibility comes at
the expense of simplicity.
See also
Grafana Alerting
However, some users may want to change the generated configuration to add additional scrape jobs, configure remote
storage, etc.
From version 2.4.0, when pmm-managed starts the Prometheus file generation process, it tries to load the /srv/prometheus/
prometheus.base.yml file first, to use it as a base for the prometheus.yml file.
The prometheus.yml file can be regenerated by restarting the PMM Server container, or by using the SetSettings API call with an
empty body.
See also
• API
7.14 What are my login credentials when I try to connect to a Prometheus Exporter?
• User name: pmm
• Password: Agent ID
PMM protects an exporter’s output from unauthorized access by adding an authorization layer. To access an exporter, you
can use pmm as a user name and the Agent ID as a password. You can find the Agent ID corresponding to a given exporter by
running pmm-admin list .
See also
pmm-admin list
PMM_PASSWORD="mypassword"
echo "Waiting for PMM to initialize to set password..."
until [ "`docker inspect -f {{.State.Health.Status}} pmm-server`" = "healthy" ]; do sleep 1; done
docker exec -t pmm-server bash -c "grafana-cli --homepath /usr/share/grafana admin reset-admin-password $PMM_PASSWORD"
7.16 How to change the PMM password for a default admin user?
If you’re deploying through Docker, you can change the default password for an admin user after starting the Docker
container as follows:
docker exec -t pmm-server bash -c 'grafana-cli --homepath /usr/share/grafana --configOverrides cfg:default.paths.data=/srv/grafana admin reset-admin-password newpass'
--pmm-agent-listen-port=LISTEN_PORT
If you are using OVF/AMI, you can change the default password through SSH by using the following command:
change-admin-password <new_password>
7.18.1 Contact us
For paid support and managed or consulting services , contact Percona Sales.
8. Release Notes
• Percona Monitoring and Management 2.37.1
• Percona Monitoring and Management 2.37.0
8.0.1 Contact us
For paid support and managed or consulting services , contact Percona Sales.