First, PMM Introduction
Second, PMM architecture analysis
Iii. Install and run PMM Server
Iv. installation and Operation PMM Client
Five, add MySQL monitoring
Vi. view monitoring and management platform
Seven, add MongoDB monitoring
Eight, instrument panel setup
Nine, frequently asked questions. First, PMM introduction
Percona Monitoring and Management (PMM) is an open source platform for managing and monitoring MySQL and MongoDB performance, with Third-party software PMM drawing to display DB monitoring data collected by Grafana clients.
PMM provides monitoring of MyISAM, InnoDB, Tokudb, and Pxc/glarera, and also provides the ability to query analytics to view which SQL directives are executed and to optimize the syntax for performing poorly. In addition, the MySQL replication topology structure is also supported in the new version. Demo Website: http://pmmdemo.percona.com
PMM for the operating system also provides hardware, network, CPU, and RAM monitoring, in particular it provides context switches, processes and interrupts monitoring, context Switches can see the CPU up and down the state of the text, processes can easily understand how many programs the system is waiting for I/O. Second, PMM architecture analysis
The PMM architecture is shown in the following figure
The PMM server is distributed as a Docker mirror, and PMM client is the normal RPM, which requires installing server-side and client-side software.
Server components
Query Analytics (QAN) is used to collect instructions and perform profiling, and its components are described as follows: Qan API: Store and read query data as Percona-qan-agent backend. QAN APP: Provides graphical analysis interface.
The Metrics Monitor (MM) component provides MySQL and MongoDB history monitoring information, and its components are described as follows: Prometheus: An open source service monitoring system and a time series database, which is connected to PMM The client's exporter gathers db's monitoring data.
–consul: The API allows PMM client to add and remove hosts remotely for Prometheus, and it also stores monitored metadata. Grafana: This is a third-party dashboard and graphics builder for visualizing the aggregated data in Prometheus for Web rendering.
–percona Dashboards: A set of dashboards developed by Percona for Grafana.
The above 2 Web pages can be directly linked from the PMM Landing page (the PMM homepage).
Client component ppm-admin: Command line PMM Client Management tool for adding and removing monitored data instance. Percona-qan-agent: Used to collect QAN query performance data while linking and transmitting data to the QAN APIs in PMM server. Node_exporter:prometheus exporter is used to collect general system information (Https://github.com/prometheus/node_exporter). Mysqld_exporter:prometheus exporter is used to collect information about MySQL server (https://github.com/percona/mysqld_exporter). Mongodb_exporter:prometheus exporter is used to gather information about MongoDB server (https://github.com/percona/mongodb_exporter). iii. Install and run PMM Server
Overview: Run the monitor with a server, the monitoring program is built on Docker. Then install Pm-admin on the server that needs to be counted, and the tool will send the data to a server in real time. A server analyzes the statistics and then displays the data on the web side.
Percona released a PMM Docker mirror, the user only need to download the mirror operation is all done, the Open box is very easy to use.
The Docker image of the PMM server is publicly hosted in Https://hub.docker.com/r/percona/pmm-server. If you are running PMM Server from a Docker image, the host must be able to run Docker 1.13 or later and have network access. For more information about using Docker, see the Docker documentation.
You can install Docker at high speed by executing the following command.
1 |
$ curl-ssl https://Get. Daocloud. Io/docker | Sh |
Suitable for most Linux ubuntu,debian,centos and so on, will be synchronized 3 hours Docker official resources.
3.1 Creating PMM Data containers
1 2 3 4 5 6 7 |
$ docker create \-v/opt/prometheus/data \-V/opt/consul |