Running PMM in Production at Tessi Valentin Traen, Jonathan Gourdon, Michael Coburn Tessi, Percona
What’s New in PMM2? ● New performance and usability query improvements. ● New query analytics for PostgreSQL. ● New labeling with Leverage Standard (system-generated) and Custom tags. ● New administrative API. ● New service-level dashboards. ● Enhanced security protocols to ensure data is safe. 2
Why You Should Upgrade to PMM2 ● Still (and always) free and open source. ● A single pane of glass. ● An enhanced version of our award-winning database monitoring tool. ● Keeps your revenue engine up and running. ● Spend less time managing complex environments. ● Speed up development. ● Improve the quality of your releases and applications. ● Enterprise-ready. 3
ABOUT THE PRESENTATION ABOUT TESSI REASON TO MIGRATE TO PMM CUSTOMIZATION AUTOMATED DEPLOYMENT 4
01 / TESSI 5
Tessi, Business Process Services 6
02 / MIGRATE TO PMM 7
MIGRATE TO PMM PROCESS Improve MySQL 6 Months project Production Ready monitoring 3 Members 300+ Instances POC Automated Deployment Acceptance test Customization Deployment 8
MIGRATE TO PMM REASON TO MIGRATE TO PMM WHAT WE HAD Symptom Oriented Focuses on availability & response time Don’t know how application works / Hard to debug Does not expose Application-level metrics 9
MIGRATE TO PMM REASON TO MIGRATE TO PMM WHAT WE WANT Combine Server & Application metrics Detect Both Hardware & Software Potential Problems Capacity Planning / Find under & over resource utilization Database Queries monitoring 10
MIGRATE TO PMM WHAT WE GOT MULTIPLE DATABASES OBSERVABILITY TECHNOLOGIES COMBINE SERVERS & DB METRICS HIGHLY CUSTOMIZABLE DETECT SATURATION / ERRORS NOT CLOUD BASED SPEEDS UP TROUBLESHOOTING & EASY TO SETUP QAN OPEN SOURCE STACK PROMETHEUS GRAFANA 11
MIGRATE TO PMM LIMITATIONS Single Docker Scalabily & Requires an Agent Container Flexibility 12
03 / CUSTOMIZATION 13
PMM CUSTOMIZATION OF HOME DASHBOARD : ALL YOU NEED TO KNOW ON YOUR SCREEN Features : ● MySQL Instance state ● Global SWAP/RAM usage ● QAN enabled instances ● Number of instances/clusters ● MySQL versions ● Disk usage Dashboard id : 10583 14
PMM USE VARIABLES TO GROUP YOUR INSTANCES ● Grouping by database name ● Custom metric 15
PMM DON’T FORGET TO PERSONNALIZE YOUR QUERIES-MYSQLD.YML mysql_custom_metric_get_schema_name: query : "SELECT SCHEMA_NAME,0 AS VALUE FROM information_schema.SCHEMATA;" metrics : - SCHEMA_NAME : usage : "LABEL" description : "The name of the MySQL schema" - VALUE : usage : "GAUGE" description : "Fixed value" valentinmysql (repository : MYSQL_PMM-Custom-YAML) 16
PMM THE COMMUNITY IS NECESSARY Status Dot by btplc 17
PMM GROUP REPLICATION DASHBOARD Features : ● Node state ● Node role ● Automatic cluster enrolment ● MySQL Router server name Dashboard id : 10006 18
PMM TAG : A POWERFUL FEATURE 19
PMM CHECK YOUR RAM USAGE ADJUST YOUR SERVER RESOURCES Based on https://www.abhinavbit.com/p/mysql-memory-calculator.html Dashboard id : 10654 20
PMM CHECK YOUR RAM USAGE ADJUST YOUR SERVER RESOURCES Dashboard id : 10654 21
PMM LET YOUR DBA CHANGE THE CONFIGURATION OF YOUR INSTANCE … 22
PMM LET YOUR DBA CHANGE THE CONFIGURATION OF YOUR INSTANCE … 23
04 / AUTOMATION 24
AUTOMATION DEPLOYMENT AWX GIT PROJECT DYNAMIC INVENTORY PULL CUSTOMIZATION FROM ANSIBLE GIT MySQL Servers PMM Server 25
AUTOMATION CONTINUOUS INTEGRATION & DEPLOYMENT Include PMM to our CI/CD workflow RELEASE IRM TEST DEPLOY OPERATE 26
AUTOMATION QAN INTEGRATION EXAMPLE - name: Search Host in PMM API uri: url: "https://{{ pmm_server_url }}/{{ pmm_qan_api.instances }}" method: GET status_code: 200 body_format: json return_content: yes register: instances_list - name: Search Host in Json Response set_fact: server_instances: "{{ instances_list.json | json_query(query) }}" vars: query: "[?Name=='{{ ansible_hostname }}'].Name" 27
AUTOMATION BEST PRACTICES CREATE ATOMIC ROLES IDEMPOTENCY NAME ALL TASKS, NAME IT RIGHT ! DO NOT EDIT CONFIGURATION FILES, MANAGE THEM THROUGH TEMPLATES CREATE TESTING LIFECYLCE & STAGE ENVIRONMENTS 28
AUTOMATION CREATE DOCUMENTATION FOR EACH ROLE ● Readme.md for each role ● Automate Build & Deploy Docs ● Should include: ● Based on Readme.md ● Using GITLAB Pipelines o Name o Description o Dependencies o Variables o Examples o Author 29
05 / WHAT’S NEXT ? 30
PMM WHAT’S NEXT ? Improve Alert Upgrade to PMM 2.0 Explore PMM Manager Plugins 31
Follow Us
Rate My Session 33
We’re Hiring! Percona’s open source database experts are true superheroes, improving database performance for customers across the globe. Our staff live in nearly 30 different countries around the world, and most work remotely from home. Discover what it means to have a Percona career with the smartest people in the database performance industries, solving the most challenging problems our customers come across. 34
Recommend
More recommend