Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Peter Zaitsev, CEO, Percona
Percona Technical Webinars March 19, 2014
Monitoring MySQL with MONyog
www.percona.com‹#›
This Webinar
• MONyog Basics • Percona Advisors for Monyog • Installation • Feature Overview • Practical Usage Tips • Live Demo • Questions
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
www.percona.com‹#›
MONyog as a Platform
• Powerful extension possibility through JavaScript • Graphing/Trending • Advisors • Alerting • Dashboard
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
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
www.percona.com‹#›
Installation
www.percona.com‹#›
Customer Portal
• Log in to https://customers.percona.com to see download instructions
www.percona.com‹#›
Install the “Platform”
• Simple one RPM install on Linux
www.percona.com‹#›
Install Percona Advisors
• Download and unpack the archive • Need to have Stock MONyog adviser in
order for process to work
www.percona.com‹#›
Restart the Service
• Needed to refresh advisors from the database
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!
www.percona.com‹#›
Adding the Server
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
www.percona.com‹#›
Email alert example
www.percona.com‹#›
Advanced Settings
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
www.percona.com‹#›
Configuring Log Files
• Configure MySQL Server Error log and Slow Query Log Paths • Will not be autoconfigured!
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
www.percona.com‹#›
Deadlocks
• Enable to capture Innodb Deadlock information
www.percona.com‹#›
Monitors
• Enable “Linux” if want to see OS Information
www.percona.com‹#›
Feature Tour
www.percona.com‹#›
Dashboard
• View Most important data side by side
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
www.percona.com‹#›
Real Time Example
• Queries for last few minutes
www.percona.com‹#›
Processlist
• Look at Current Processlist • Look at several servers with one view • Can EXPLAIN or Kill running Queries
www.percona.com‹#›
Replication
• Watch basic replication status • Shows Seconds_Behind_Master for
replication lag monitoring
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
www.percona.com‹#›
Query Analyzer Example
• Note queries will be shown with “?” • SELECT c from sbtest where id between ? and ?;”
www.percona.com‹#›
Server Configuration
• Compare Server configuration • Servers side by side
• Server to the Previous configuration information
www.percona.com‹#›
Server Configuration
• Looking at what has changed over time
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.
www.percona.com‹#›
Disk Usage
www.percona.com‹#›
Events
• Summary of “Events” as reported by Advisors
• Can view current state and History • “Close” Warning/Critical alerts to
acknowledge them
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
www.percona.com‹#›
Queries
• Note it is only query which could be sampled from PROCESSLIST • Thousands of quick queries were
unseen
www.percona.com‹#›
Status Variables
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
www.percona.com‹#›
Monitors Example
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
www.percona.com‹#›
Detailed History Reports
• Specify Time Frame and Grouping Interval • Will See Data in the Table And
Histogram view
www.percona.com‹#›
Trending the Value
• View history for last several data captures • Refreshes with new data
www.percona.com‹#›
Advisor Information
• Provides the Description, Advice and Further Reading information
www.percona.com‹#›
Customize Advisors
• Can change and define customize advisors with JavaScript
www.percona.com‹#›
“Advanced Customization”
• Configure Numeric “Levels” for Alerts
www.percona.com‹#›
Practical Usage Tips
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
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
www.percona.com‹#›
DEMO!
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
!!!
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