Getting to Know MySQL Enterprise Monitor

  • 6,330 views
Uploaded on

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 …

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.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
6,330
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
52
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1.  
  • 2. Getting To Know MySQL Enterprise Monitor Mark Leith (@MarkLeith)
  • 3. Agenda
    • The MySQL Enterprise Monitor Vision
    • 4. Architecture
    • A Tour Around The UI
    • Key Configuration
    • 5. Questions
  • 6. The MySQL Enterprise Monitor Team Vision
    • Continually monitor all aspects of MySQL environments
    • Analyze for problems, alerting when necessary
    • Streamline common “database problem” resolution
    • Simplify database management at scale
  • 7. The MySQL Enterprise Monitor Vision
    • “ MySQL is simple to use ” ... but … there are many complex interactions happening within the database
    • Much of what is happening within MySQL has historically been termed as “ a black-box ” … but … that is changing rapidly
    • No one person can continually monitor what a single database is doing, let alone 10's, or 100's, of instances
  • 8. The Obligatory Black Boxes
  • 9. The MySQL Enterprise Monitor Way
  • 10. Agenda
    • Architecture
    • A Tour Around The UI
    • Key Configuration
    • 11. Questions
  • 12. MEM Installation
    • A minimal installation consists of:
      • MEM Server (Tomcat app server, MySQL DB)
        • Ideally on dedicated resources
        • 13. App server and DB can have separate hardware
      • MEM Agent (C based, multiple plugins)
        • Ideally installed on each database server
        • 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
    • MySQL Proxy integrated in to the Agent process
      • Funnel “legacy” app traffic for analysis
      • 17. Data sent via the agent plugin
    • Connector Plugins for app side statement monitoring
      • Allows client side monitoring of statement latency
      • 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
    • A Tour Around The UI
    • Key Configuration
    • 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
    • Waiting support issues
      • MOS account in settings
    • Status of agent and MySQL
    • Open event counts & drill down
    • Visual status of key statistics
    • See Heatchart Advisor to tune
  • 27. MEM Advisors
    • A collection (>160) of simple expression based “ Rules ”
      • 100-((%Threads_created% / %Connections%)*100) < THRESHOLD
    • All check standard best practices for MySQL
    • 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 ”
      • Info -> Warning -> Critical
  • 31. The Advisors Tab – Current Schedule
    • Edit current settings
    • 32. Per Group / Server
    • 33. Quick enable/disable
  • 34. Advisors Tab - Manage Rules Overview
    • >1000 MySQL metrics
    • ~100 OS metrics
    • 40. Custom SQL possible
    Create Custom Edit defaults Even app specific
  • 41. Advisors Tab - Edit Rule
    • The Rule is the Expression
    • 42. Certified rules allow threshold and frequency changes
    • 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 the problem 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-Close wisely: Flapping events notify, a lot
  • 49. The Graphs Tab
    • Stacked for easy correlation
    • 50. Covering key subsystems
    • 51. InnoDB, Cluster, SQL layer activity, Query Cache, Thread Pool, Connection usage, Statement, Transaction and Row throughput, OS stats etc.
      ~75 Graphs
    ~182 series ~220 data points
  • 52. Graphs and Filtering
    • When groups are selected graphs summarize (avg/min/max)
    • 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
      • Keep defaults minimal
      • 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 Table Scan
  • 60. Statement Normalization
    • Normalization does the following:
      • Strip all literals, replacing each with “?”
      • 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 executed over 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
    • Key Configuration
    • Questions
  • 71. Key Configuration Of course, the first thing to get right is Advisors..
    • Let the monitor run for a while with no rules enabled
    • 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 mechanisms Data retention MOS credentials
  • 76. Notification Groups Short Messages MEM Server Events Custom Event subjects
  • 77. Query Analysis Configuration Collect Normalized Data Also get non-normalized example Threshold for how Long a statement Should run, before Generating an EXPLAIN
  • 78. Key Configuration Files $mem_server_dir/apache-tomcat/bin/setenv.sh
    • Configure Java options (heap space)
    $mem_server_dir/mysql/my.cnf
    • Database options – For larger installs, tune InnoDB
    $mem_agent_dir/share/items/items-mysql-monitor.xml
    • Tweak SQL based data collection items
  • 79. Tweaking / Adding SQL Collections <class> <namespace>mysql</namespace> <classname>foo_bar</classname> <query><![CDATA[SELECT foo, bar, FROM … ]]></query> <attributes> <attribute name=&quot;foo&quot; counter=&quot;false&quot; type=&quot;STRING&quot; /> <attribute name=&quot;bar&quot; counter=&quot;true&quot; type=&quot;INTEGER&quot; /> </attributes> </class>
  • 80. Some resources..
    • Download - https://edelivery.oracle.com/
    • http://dev.mysql.com/doc/mysql-monitor/2.3/en/index.html
    • http://www.slideshare.net/Leithal/extending-mysql-enterprise-monitor?type=powerpoint
  • 81. Q&A
  • 82.