Setting up PMM Clients
PMM Client is a package of agents and exporters installed on the host you wish to monitor.
Before installing, know your PMM Server’s IP address and make sure that it is accessible.
You will need root access on the database host where you install PMM Client (either logged in as a user with root privileges or have sudo
rights).
Note
Credentials used in communication between the exporters and the PMM Server are the following ones:
- login is
pmm
- password is equal to Agent ID, which can be seen e.g. on the Inventory Dashboard.
Supported platforms
PMM Client should run on any modern RedHat or Debian-based 64-bit Linux distribution, but is only tested on:
- RHEL/CentOS 6, 7, 8
- Debian 8, 9, 10
- Ubuntu 16.04, 18.04, 20.04
We recommended installing PMM Client via your system’s package management tool, using the software repository provided by Percona for popular Linux distributions.
If this option does not work for you, Percona provides downloadable PMM Client packages from the Download Percona Monitoring and Management page. As well as DEB and RPM packages, you will also find:
- generic tarballs that you can extract and run the included
install
script; - source code tarball to build the PMM client from source.
Storage requirements
A minimum of 100 MB of storage is required for installing the PMM Client package. With a good constant connection to PMM Server, additional storage is not required. However, the client needs to store any collected data that it is not able to send over immediately, so additional storage may be required if connection is unstable or throughput is too low.
Installing PMM Client with your Linux package manager
Using apt-get
(Debian/Ubuntu)
-
Configure Percona repositories using the percona-release tool. First you’ll need to download and install the official
percona-release
package from Percona:wget https://repo.percona.com/apt/percona-release_latest.generic_all.deb sudo dpkg -i percona-release_latest.generic_all.deb
Note
If you have previously enabled the experimental or testing Percona repository, don’t forget to disable them and enable the release component of the original repository as follows:
sudo percona-release disable all sudo percona-release enable original release
-
Install the PMM client package:
sudo apt-get update sudo apt-get install pmm2-client
-
Register your Node:
pmm-admin config --server-insecure-tls --server-url=https://admin:admin@<IP Address>:443
-
You should see the following output:
Checking local pmm-agent status... pmm-agent is running. Registering pmm-agent on PMM Server... Registered. Configuration file /usr/local/percona/pmm-agent.yaml updated. Reloading pmm-agent configuration... Configuration reloaded.
Using yum
(RedHat/Centos)
-
Configure Percona repositories using the percona-release tool. First you’ll need to download and install the official percona-release package from Percona:
sudo yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm
Note
If you have previously enabled the experimental or testing Percona repository, don’t forget to disable them and enable the release component of the original repository as follows:
sudo percona-release disable all sudo percona-release enable original release
See percona-release official documentation for details.
-
Install the
pmm2-client
package:yum install pmm2-client
-
Once PMM Client is installed, run the
pmm-admin config
command with your PMM Server IP address to register your Node within the Server:pmm-admin config --server-insecure-tls --server-url=https://admin:admin@<IP Address>:443
You should see the following:
Checking local pmm-agent status... pmm-agent is running. Registering pmm-agent on PMM Server... Registered. Configuration file /usr/local/percona/pmm-agent.yaml updated. Reloading pmm-agent configuration... Configuration reloaded.
Connecting PMM Clients to PMM Server
With your server and clients set up, you must configure each PMM Client and specify which PMM Server it should send its data to.
To connect a PMM Client, enter the IP address of the PMM Server as the value
of the --server-url
parameter to the pmm-admin config
command, and
allow using self-signed certificates with --server-insecure-tls
.
Note
The --server-url
argument should include https://
prefix and PMM Server credentials, which are admin
/admin
by default, if not changed at first PMM Server GUI access.
Run this command as root or by using the sudo
command
pmm-admin config --server-insecure-tls --server-url=https://admin:admin@192.168.100.1:443
For example, if your PMM Server is running on 192.168.100.1, you have installed PMM Client on a machine with IP 192.168.200.1, and didn’t change default PMM Server credentials, run the following in the terminal of your client. Run the following commands as root or by using the sudo
command:
pmm-admin config --server-insecure-tls --server-url=https://admin:admin@192.168.100.1:443
Checking local pmm-agent status...
pmm-agent is running.
Registering pmm-agent on PMM Server...
Registered.
Configuration file /usr/local/percona/pmm-agent.yaml updated.
Reloading pmm-agent configuration...
Configuration reloaded.
Checking local pmm-agent status...
pmm-agent is running.
If you change the default port 443 when running PMM Server, specify the new port number after the IP address of PMM Server.
Note
By default pmm-admin config
refuses to add client if it already exists in the PMM Server inventory database. If you need to re-add an already existing client (e.g. after full reinstall, hostname changes, etc.), you can run pmm-admin config
with the additional --force
option. This will remove an existing node with the same name, if any, and all its dependent services.
By default, the node name is the hostname. If you have non-unique client hostnames, specify the node name when adding the client:
pmm-admin add TYPE [options] NODE-NAME
Removing monitoring services with pmm-admin remove
Use the pmm-admin remove
command to remove monitoring services.
USAGE
Run this command as root or by using the sudo
command
pmm-admin remove [OPTIONS] [SERVICE-TYPE] [SERVICE-NAME]
When you remove a service, collected data remains in Metrics Monitor on PMM Server for the specified retention period.
SERVICES
Service type can be mysql, mongodb, postgresql or proxysql, and service
name is a monitoring service alias. To see which services are enabled,
run pmm-admin list
.
EXAMPLES
# Removing MySQL service named mysql-sl
pmm-admin remove mysql mysql-sl
# remove MongoDB service named mongo
pmm-admin remove mongodb mongo
# remove PostgreSQL service named postgres
pmm-admin remove postgresql postgres
# remove ProxySQL service named ubuntu-proxysql
pmm-admin remove proxysql ubuntu-proxysql
For more information, run pmm-admin remove --help
.
- Page updated 2020-12-10
Contact Us
For free technical help, visit the Percona Community Forum.To report bugs or submit feature requests, open a JIRA ticket.
For paid support and managed or professional services, contact Percona Sales.