pmm (Percona Monitoring and Management) installation procedure

Introduction

Using QNAP's Container Station [pmm (Percona Monitoring and Management)] I set up (https://www.percona.com/doc/percona-monitoring-and-management/index.html), so it's a work record (sorry, it's too concise).

server settings

--Monitoring side ――Since the interface is Grafana, I think many people are familiar with it. --This time, it was built with QNAP's [Container Station](how to use https://www.qnap.com/ja-jp/how-to/tutorial/article/container-station-), so it is omitted (Docker with a few clicks). Very convenient to start the container)

client settings

--The monitored side --Assuming that the mysql server is already installed

Yum install pmm2-client

sudo yum install pmm2-client

Check connection with server

The place of <user>: <password> is ʻadmin: admin` by default.

sudo pmm-admin config --server-insecure-tls --server-url=https://<user>:<password>@<server ip address>:443

If you get the following error, add --force to the above command and try again.

Checking local pmm-agent status...
pmm-agent is running.
Registering pmm-agent on PMM Server...
Failed to register pmm-agent on PMM Server: Node with name "xxxxxx" already exists..

Monitoring setting input

Below, input the monitoring settings by either method.

Method 1: Set by specifying the MySQL user name and password

# syntax
sudo pmm-admin add mysql --username=<mysql user> --password=<mysql user password> --query-source=<query source> <service name>
# example
sudo pmm-admin add mysql --username=john --password=johnpass --query-source=perfschema mysqlserver001

Method 2: Setting by specifying the socket

Adding MySQL Service Monitoring

Note It is also possible to add MySQL instance using UNIX socket with use of a special --socket flag followed with the path to a socket without username, password and network type:

sudo pmm-admin add mysql --socket=/var/path/to/mysql/socket

Port permission

It is necessary to allow the following ports for client inbound. Add port permission settings for firewalls and security groups according to the environment.

The following ports must be open to enable communication between the PMM Server and PMM clients.

42000 For PMM to collect genenal system metrics. 42002 For PMM to collect MySQL server metrics. 42003 For PMM to collect MongoDB server metrics. 42004 For PMM to collect ProxySQL server metrics. 42005 For PMM to collect PostgreSQL server metrics. Also PMM Server should keep ports 80 or 443 ports open for computers where PMM Client is installed to access the PMM web interface and the QAN agent.

Console connection

Access https: // <server ip address>: 443 from your browser When you log in for the first time, you will be asked to change your password.

Recommended Posts

pmm (Percona Monitoring and Management) installation procedure
eclipse installation procedure
Java (eclipse) installation procedure
Docker installation and initialization
Doorkeeper gem installation procedure
Rails, RSpec installation procedure