Monitoring PostgreSQL with Percona Monitoring and Management

提高性能和瓶颈的可视性PostgreSQL 将PostgreSQL服务器整合到您已经用于MySQL和MongoDB的相同监控平台中


1. Monitoring PostgreSQL with Percona Monitoring and Management (PMM) Michael Coburn Percona

2.Michael Coburn ● Product Manager for PMM (as well as for Percona Toolkit) ● At Percona for 6 years across multiple MySQL roles ○ Principal Architect, Managing Consultant, Technical Account Manager 2

3.What is PMM ● Free, Open Source database troubleshooting and performance optimization platform for MySQL, MongoDB, and PostgreSQL ○ We also support: ■ ProxySQL ■ Amazon RDS MySQL & Aurora MySQL ■ Remote MySQL & PostgreSQL instances ● Runs in your secure environment (this is not a SaaS product!) and on your equipment ● Secured with SSL between client and server 3

4.Amazon RDS and Aurora PostgreSQL

5.Add Instances 5

6.List Instances 6

7. Remote PostgreSQL For when you don't have shell, or run an unsupported platform (eg. PostgreSQL on Windows)

8.Add Remote Instances 8

9.Command Line Click to add text

10.Command Line ● yum -y install pmm-client ● pmm-admin config --server ● pmm-admin add postgresql ○ linux:metrics ○ postgresql:metrics 10

11.Dashboards Click to add text

12.PostgreSQL Overview 12

13.Using Grafana Alerting Click to add text

14.Grafana Alerting ● Rules are added to graphs that react based on defined thresholds ● Alerts are sent to pre-defined Notification Channels ○ You can have multiple channels defined 14

15.Grafana Alerting 15

16.Grafana Notification Channels ● Defines how you will learn about new alerts ● Over a dozen are available: ○ Email ○ Slack ○ PagerDuty ○ AlertManager ○ ... 16

17.What's on the Roadmap ● PostgreSQL Query Analytics ● Vacuum statistics ● Replica metrics 17

18.Rate My Session 18