Percona Monitoring and Management Documentation Release 2.9.1
Total Page:16
File Type:pdf, Size:1020Kb
Percona Monitoring and Management Documentation Release 2.9.1 Percona LLC and/or its affiliates 2009-2020 Aug 05, 2020 CONTENTS 1 What is Percona Monitoring and Management?1 2 PMM Concepts 2 2.1 Client/Server Architecture - an Overview................................2 2.2 Services..................................................6 3 Installing PMM Server 11 3.1 Running PMM Server via Docker.................................... 11 3.2 Running PMM Server Using AWS Marketplace............................. 16 3.3 PMM Server as a Virtual Appliance................................... 27 3.4 Verifying PMM Server.......................................... 31 3.5 Configuring PMM Server........................................ 32 3.6 Updating a Server............................................ 38 4 Installing PMM Client 40 4.1 Installing Clients............................................. 40 4.2 Installing DEB packages using apt-get ................................ 41 4.3 Installing RPM packages using yum ................................... 41 5 Using PMM Client 43 5.1 Configuring PMM Client with pmm-admin config ......................... 43 5.2 Adding MySQL Service Monitoring................................... 44 5.3 Adding MongoDB Service Monitoring................................. 45 5.4 Adding a ProxySQL host......................................... 45 5.5 PostgreSQL................................................ 46 5.6 Adding Linux metrics.......................................... 48 5.7 Adding External Services........................................ 48 5.8 Removing monitoring services with pmm-admin remove ...................... 48 5.9 Annotating important Application Events................................ 49 6 Percona Platform 51 6.1 Introduction............................................... 51 6.2 Security Threat Tool........................................... 51 7 Service configuration for best results 53 7.1 MySQL.................................................. 53 7.2 MongoDB................................................ 58 8 Configuring AWS RDS or Aurora Services 60 8.1 Required AWS settings.......................................... 60 8.2 Adding an Amazon RDS MySQL, Aurora MySQL, or Remote Instance................ 64 i 9 Using PMM Metrics Monitor 68 9.1 Understanding Dashboards........................................ 68 9.2 Navigating across Dashboards...................................... 69 10 The Query Analytics Dashboard 72 10.1 Filters Panel............................................... 73 10.2 Overview Panel.............................................. 74 10.3 Details Panel............................................... 77 10.4 Query Analytics for MongoDB..................................... 80 11 Dashboards Reference 81 11.1 Insight.................................................. 81 11.2 OS Dashboards.............................................. 86 11.3 Prometheus Dashboards......................................... 94 11.4 MySQL Dashboards........................................... 94 11.5 MongoDB Dashboards.......................................... 113 11.6 PostgreSQL Dashboards......................................... 119 11.7 HA Dashboards............................................. 122 12 Contact Us 123 12.1 Contacting the developers........................................ 123 12.2 Reporting bugs.............................................. 123 12.3 Contributing to development....................................... 123 13 Glossary 124 14 Release Notes 125 14.1 Percona Monitoring and Management 2.9.1............................... 125 14.2 Percona Monitoring and Management 2.9.0............................... 126 14.3 Percona Monitoring and Management 2.8.0............................... 127 14.4 Percona Monitoring and Management 2.7.0............................... 127 14.5 Percona Monitoring and Management 2.6.1............................... 128 14.6 Percona Monitoring and Management 2.6.0............................... 129 14.7 Percona Monitoring and Management 2.5.0............................... 130 14.8 Percona Monitoring and Management 2.4.0............................... 131 14.9 Percona Monitoring and Management 2.3.0............................... 133 14.10 Percona Monitoring and Management 2.2.2............................... 134 14.11 Percona Monitoring and Management 2.2.1............................... 134 14.12 Percona Monitoring and Management 2.2.0............................... 136 14.13 Percona Monitoring and Management 2.1.0............................... 138 14.14 Percona Monitoring and Management 2.0.1............................... 139 14.15 Percona Monitoring and Management 2.0.0............................... 140 15 Frequently Asked Questions 141 15.1 How can I contact the developers?.................................... 141 15.2 What are the minimum system requirements for PMM?........................ 141 15.3 How to control data retention for PMM?................................ 141 15.4 How often are NGINX logs in PMM Server rotated?.......................... 142 15.5 What privileges are required to monitor a MySQL instance?...................... 143 15.6 Can I monitor multiple service instances?................................ 143 15.7 Can I rename instances?......................................... 143 15.8 Can I add an AWS RDS MySQL or Aurora MySQL instance from a non-default AWS partition?... 143 15.9 How do I troubleshoot communication issues between PMM Client and PMM Server?........ 144 15.10 What resolution is used for metrics?................................... 145 15.11 How do I set up Alerting in PMM?................................... 145 ii 15.12 How do I use a custom Prometheus configuration file inside PMM Server?.............. 146 16 Reference 147 16.1 pmm-admin - PMM Administration Tool................................ 147 Index 152 iii CHAPTER ONE WHAT IS PERCONA MONITORING AND MANAGEMENT ? Percona Monitoring and Management (PMM) is an open-source platform for managing and monitoring MySQL, PostgreSQL, MongoDB, and ProxySQL performance. It is developed by Percona in collaboration with experts in the field of managed database services, support and consulting. PMM is a free and open-source solution that you can run in your own environment for maximum security and reliabil- ity. It provides thorough time-based analysis for MySQL, PostgreSQL and MongoDB servers to ensure that your data works as efficiently as possible. 1 CHAPTER TWO PMM CONCEPTS 2.1 Client/Server Architecture - an Overview The PMM platform is based on a client-server model that enables scalability. It includes the following modules: • PMM Client installed on every database host that you want to monitor. It collects server metrics, general system metrics, and Query Analytics data for a complete performance overview. • PMM Server is the central part of PMM that aggregates collected data and presents it in the form of tables, dashboards, and graphs in a web interface. • Percona Platform provides value-added services for PMM. The modules are packaged for easy installation and usage. It is assumed that the user should not need to understand what are the exact tools that make up each module and how they interact. However, if you want to leverage the full potential of PMM, the internal structure is important. 2 Percona Monitoring and Management Documentation, Release 2.9.1 PMM is a collection of tools designed to seamlessly work together. Some are developed by Percona and some are third-party open-source tools. Note: The overall client-server model is not likely to change, but the set of tools that make up each component may evolve with the product. The following sections illustrates how PMM is currently structured. 2.1.1 PMM Client Each PMM Client collects various data about general system and database performance, and sends this data to the corresponding PMM Server. The PMM Client package consist of the following: • pmm-admin is a command-line tool for managing PMM Client, for example, adding and removing database instances that you want to monitor. For more information, see pmm-admin - PMM Administration Tool. 2.1. Client/Server Architecture - an Overview 3 Percona Monitoring and Management Documentation, Release 2.9.1 • pmm-agent is a client-side component a minimal command-line interface, which is a central entry point in charge for bringing the client functionality: it carries on client’s authentication, gets the client configuration stored on the PMM Server, manages exporters and other agents. • node_exporter is a Prometheus exporter that collects general system metrics. • mysqld_exporter is a Prometheus exporter that collects MySQL server metrics. • mongodb_exporter is a Prometheus exporter that collects MongoDB server metrics. • postgres_exporter is a Prometheus exporter that collects PostgreSQL performance metrics. • proxysql_exporter is a Prometheus exporter that collects ProxySQL performance metrics. To make data transfer from PMM Client to PMM Server secure, all exporters are able to use SSL/TLS encrypted connections, and their communication with the PMM server is protected by the HTTP basic authentication. 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. 2.1. Client/Server Architecture - an Overview 4 Percona Monitoring and Management Documentation, Release 2.9.1 2.1.2 PMM Server PMM Server runs on the machine that will be your central monitoring