52
Peter Zaitsev, CEO, Percona Percona Technical Webinars March 19, 2014 Monitoring MySQL with MONyog

Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

Peter Zaitsev, CEO, Percona

Percona Technical Webinars March 19, 2014

Monitoring MySQL with MONyog

Page 2: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

This Webinar

• MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live Demo • Questions

Page 3: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

About MONyog

• Monitoring solution for “MySQL” Server • MySQL • Percona Server • Amazon RDS • MariaDB

• Agentless design • On Premises Solution • Simple to Use • Monitors MySQL and Operating System

Page 4: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

MONyog as a Platform

• Powerful extension possibility through JavaScript • Graphing/Trending • Advisors • Alerting • Dashboard

Page 5: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Percona Advisors for MONyog

• Custom Advisors and Monitors created by Percona Team

• Additional Metrics • Tailored advice to modern realities and

best practices • Ever-improving part of Support

Subscription

Page 6: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Single Throat to Choke

• Available as solution to Percona Gold/Platinum Support Customers

• We will provide • Installation Help • Advice on Monitoring and

Interpretation • Handle bug fixes and Feature requests

• Working with MONyog team as a partner

Page 7: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Installation

Page 8: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Customer Portal

• Log in to https://customers.percona.com to see download instructions

Page 9: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Install the “Platform”

• Simple one RPM install on Linux

Page 10: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Install Percona Advisors

• Download and unpack the archive • Need to have Stock MONyog adviser in

order for process to work

Page 11: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Restart the Service

• Needed to refresh advisors from the database

Page 12: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Log In

• Things to Know • Default MONyog port is 5555 • Default user name is “admin” • Default Password is Empty

• Watch the firewall!

Page 13: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Adding the Server

Page 14: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Things to note

• MONyog can use SSH Tunnel to reach MySQL with no direct access

• Use SSH connection to capture OS metrics and access logs

• Consider Configuring email in Notification Settings to get Alerts by Email • Mail settings must be configured with

SMTP server as well

Page 15: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Email alert example

Page 16: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Advanced Settings

Page 17: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Advanced Configuration

• Collection Interval • Consider 1 minute for better resolution

• Data retention time frame • Increase to keep data longer

• Beware database growth when having many servers

Page 18: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Configuring Log Files

• Configure MySQL Server Error log and Slow Query Log Paths • Will not be autoconfigured!

Page 19: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Sniffer

• Track queries server is running, store as history

• Can use PROCESSLIST and MySQL Proxy • No Support for Log file or

PERFORMANCE_SCHEMA • Very valuable information but can be costly to

capture • Provides additional information in Wayback

Machine

Page 20: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Deadlocks

• Enable to capture Innodb Deadlock information

Page 21: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Monitors

• Enable “Linux” if want to see OS Information

Page 22: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Feature Tour

Page 23: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Dashboard

• View Most important data side by side

Page 24: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Real Time Monitoring

• Watch Real Time server operation • PROCESSLIST Based

• Aggregated data by accessed tables, databases, users etc

• Locking information from Innodb Information Schema Tables

Page 25: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Real Time Example

• Queries for last few minutes

Page 26: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Processlist

• Look at Current Processlist • Look at several servers with one view • Can EXPLAIN or Kill running Queries

Page 27: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Replication

• Watch basic replication status • Shows Seconds_Behind_Master for

replication lag monitoring

Page 28: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Query Analyzer

• Analyze queries from MySQL Logs, or “Sniffer”

• Will only analyze about last 1MB of the slow log file by default

• Configure “Change Filter” to analyze more and configure other settings

Page 29: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Query Analyzer Example

• Note queries will be shown with “?” • SELECT c from sbtest where id between ? and ?;”

Page 30: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Server Configuration

• Compare Server configuration • Servers side by side

• Server to the Previous configuration information

Page 31: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Server Configuration

• Looking at what has changed over time

Page 32: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Disk Information

• Get disk usage information from INFORMATION_SCHEMA • Beware it can be slow if

innodb_stats_on_metadata is enabled

• Can drill down to see usage by database and table

• Only Database space usage • Not log files, binary logs etc.

Page 33: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Disk Usage

Page 34: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Events

• Summary of “Events” as reported by Advisors

• Can view current state and History • “Close” Warning/Critical alerts to

acknowledge them

Page 35: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Wayback Machine

• Track what has been happening with Server through Time

• Information about • Number of threads connected • Queries (with Sniffer enabled) • Status counters • Changes to Global Variables

• Can select interval on graph to Zoom in

Page 36: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Queries

• Note it is only query which could be sampled from PROCESSLIST • Thousands of quick queries were

unseen

Page 37: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Status Variables

Page 38: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Monitors

• Majority of Functionality is here • Monitors purposes

• Show current state • Information available for trending • Provide actionable advice • Generate Alerts when certain

conditions are met

Page 39: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Monitors Example

Page 40: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Monitoring Timeframe

• “Current” – information from MySQL start till now

• “Delta” • Information for 1 data capture interval

• “History” • Information for selected period of time

Page 41: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Detailed History Reports

• Specify Time Frame and Grouping Interval • Will See Data in the Table And

Histogram view

Page 42: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Trending the Value

• View history for last several data captures • Refreshes with new data

Page 43: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Advisor Information

• Provides the Description, Advice and Further Reading information

Page 44: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Customize Advisors

• Can change and define customize advisors with JavaScript

Page 45: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

“Advanced Customization”

• Configure Numeric “Levels” for Alerts

Page 46: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Practical Usage Tips

Page 47: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Day to day Operations

• Enable Email Alerts for what is important for your application

• Dashboard Provides great overview for general server health and load

• Processist can be used to visually watch for surprises • Too many active queries • Some overly slow queries

Page 48: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

When something goes wrong

• Server Load is likely to change • Changes on Dashboard ? • Weird looking “Processlist” ?

• Look at “Linux” advisors series to see load on OS level

• Check out Way Back Machine to see changes to the query pattern

• Check “Server Config” for possible unexpected changes

Page 49: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

DEMO!

Page 50: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

!Special Discount for Webinar Attendees:

Use Code WebinarSC to receive 15% off of standard rates (new registrations only)

!http://bit.ly/MySQLUC2014

!!!

Page 51: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#›

Now with Open Source Appreciation Day!

• March 31, 2014 • http://bit.ly/1gysW6B

• Two Events To Chose From • CentOS Dojo • OpenStack Today

• Attendance is FREE

Page 52: Monitoring MySQL with MONyog - Percona...‹#› This Webinar • MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live

www.percona.com‹#› www.percona.com

Peter Zaitsev [email protected]

Thank You!