If you can't read please download the document
Upload
mark-leith
View
7.073
Download
2
Embed Size (px)
DESCRIPTION
MySQL Enterprise Monitor is the monitoring and management solution for DBAs and developers delivered as part of MySQL Enterprise Edition. It provides background monitoring, alerting, trending, and analysis of the MySQL database and the statement traffic that is running within it.View this session to learn how to install/configure, customize, and use MySQL Enterprise Monitor to suit your environment. Whether you use a single server or have hundreds of instances, MySQL Enterprise Monitor can provide great insights into how your environment is performing.
Citation preview
2. Getting To Know MySQL Enterprise Monitor Mark Leith (@MarkLeith) 3. Agenda
4. Architecture
5. Questions 6. The MySQL Enterprise Monitor Team Vision
7. The MySQL Enterprise Monitor Vision
8. The Obligatory Black Boxes 9. The MySQL Enterprise Monitor Way 10. Agenda
11. Questions 12. MEM Installation
13. App server and DB can have separate hardware MEM Agent (C based, multiple plugins)
14. Can also monitor remotely (less OS stats) 15. MEM Architecture Tomcat App Server MySQL Repository Admins MEM Server MEM Agent Monitored DB Instance 16. MEM Installation Statement Collection
17. Data sent via the agent plugin Connector Plugins for app side statement monitoring
18. Allow tracing statement origination 19. Also spreads the load of statement analysis 20. Data sent directly to the MEM server via REST 21. MEM Architecture Java Web App MySQL Repository Admins Java App Server(or .Net) MEM Traffic App Traffic Legacy App Users MEM Server Connector Plugins MEM Agent/Proxy 22. NEW PHP and the Aggregator Admins MEM Server MEM Agent Monitored Instance PHP App MEM Traffic App Traffic MEM Aggregator 23. Agenda
24. Questions 25. The Monitor Tab Server Overview Key Graphs Current Critical Events Selected Server Overview Key Indicators 26. The Monitor Tab Support Issues / Heat Chart
Status of agent and MySQL
27. MEM Advisors
28. Scheduled to run on a set frequency basis 29. Counters evaluate deltas, otherwise, evaluate totals 30. Rules trigger Events on three levels of Threshold
31. The Advisors Tab Current Schedule
32. Per Group / Server 33. Quick enable/disable 34. Advisors Tab - Manage Rules Overview
35. SHOW VARIABLES 36. SHOW SLAVE STATUS 37. SHOW INNODB STATUS 38. INFORMATION_SCHEMA 39. PERFORMANCE_SCHEMA ~100 OS metrics 40. Custom SQL possible Create Custom Edit defaults Even app specific 41. Advisors Tab - Edit Rule
42. Certified rules allowthresholdandfrequencychanges 43. Default values are generally conservative 44. Gather some graph data before refining 45. Events Tab Current / Worst Event states Where What When Drill In 46. Event Results Advice on the problem, and how to go about drilling in to it Recommended action to resolve theproblem after investigation 47. Event Results The actual evaluation Advisor Config 48. Closing Events Whether to Continue Monitoring this rule Track a history of changes made for events Choose Auto-Closewisely: Flapping events notify, alot 49. The Graphs Tab
50. Covering key subsystems 51. InnoDB, Cluster, SQL layer activity, Query Cache, Thread Pool, Connection usage, Statement, Transaction and Row throughput, OS stats etc.
~182 series ~220 data points 52. Graphs and Filtering
53. Drill in to servers to see raw stats 54. Filter by name with Contains matching or regex i.e ^row 55. ..or just select specific graphs 56. Time range filtering for history
57. Data points every minute 58. Graphs Query Correlation Select any portion of any graph to take you to a filtered Query Analyzer view for that time period 59. The Query Analyzer Tab Correlated Graph Advanced Filtering Normalized Statements (drill down) Key Aggregated Statistics TableScan 60. Statement Normalization
61. Strip pure comments, leading/trailing spaces 62. Make keywords UPPER CASE 63. Roll multi-row INSERT up to (?,?) /*, */ 64. Roll IN() lists to IN (? /*, */) 65. Query Analysis Example Queries Non-normalized Example statement Who it was executed by Where in the application it originated from (with connector plugins) When, and how long it took 66. Query Analysis Explain / History How the query executedover time (rows, bytes, time, execs) Execution plan if captured 67. The Replication Tab 68. Your replication page shows our replication topology incorrectly, that server isn't a slave any more... Actually... Your topology probably is configured like that : CHANGE MASTER TO MASTER _HOST = '' RESET SLAVE ALL (now in 5.5.16) 69. The Replication Slave Details 70. Agenda
71. Key Configuration Of course, the first thing to get right is Advisors..
72. Be selective on which rules you enable 73. When enabling rules, use graph info for thresholds 74. Set notifications wisely (do you need an email alert at 5 am that a user exists without a password?) 75. General Settings Notification mechanismsData retentionMOScredentials 76. Notification Groups Short Messages MEM ServerEvents Custom Event subjects 77. Query Analysis Configuration Collect NormalizedData Also getnon-normalizedexample Threshold for howLong a statement Should run, before Generating anEXPLAIN 78. Key Configuration Files $mem_server_dir/apache-tomcat/bin/setenv.sh
$mem_server_dir/mysql/my.cnf
$mem_agent_dir/share/items/items-mysql-monitor.xml
79. Tweaking / Adding SQL Collections mysqlfoo_barSELECT foo, bar, FROM 80. Some resources..
81. Q&A 82.