Chapter 1 MySQL Enterprise Monitor Introduction and Architecture

Table of Contents

1.1 MySQL Enterprise Monitor Component Overview
1.2 MySQL Enterprise Monitor Agent
1.3 MySQL Enterprise Service Manager
1.4 MySQL Enterprise Monitor Proxy and Aggregator
Important

This document is updated frequently. The most up-to-date version of this document is available at this location: MySQL Enterprise Products Documentation.

Note

MySQL Enterprise Monitor is available as part of the MySQL Enterprise subscription, learn more at http://www.mysql.com/products/.

MySQL Enterprise Monitor is a companion product to MySQL Server that enables monitoring of MySQL instances and their hosts, notification of potential issues and problems, and advice on how to correct issues. MySQL Enterprise Monitor can monitor all types of installation, from a single MySQL instance to large farms of database servers. MySQL Enterprise Monitor is a web-based application, enabling you to monitor MySQL instances on your network or on a cloud service.

This chapter describes the components of a MySQL Enterprise Monitor installation and provides a high-level overview of MySQL Enterprise Monitor architecture.

1.1 MySQL Enterprise Monitor Component Overview

The architecture of a typical MySQL Enterprise Monitor installation is shown in the following figure:

Figure 1.1 MySQL Enterprise Monitor Architecture

MySQL Enterprise Monitor Architecture

MySQL Enterprise Monitor has the following components:

  • MySQL Enterprise Monitor Agent monitors the MySQL instances and hosts, and collects data according to a defined schedule. The collection data is sent to the MySQL Enterprise Service Manager for analysis and presentation.

  • MySQL Enterprise Service Manager analyzes, stores and presents the data collected by the agent.

  • MySQL Enterprise Monitor Proxy and Aggregator intercepts queries as they are transmitted from client applications to the monitored MySQL instance and transmits them to the MySQL Enterprise Service Manager for analysis by the Query Analyzer.

It is also possible to perform what is called an Agent-less installation, where the Agent is not installed on the host machines, and all monitoring is done by the MySQL Enterprise Service Manager's built-in Agent.

Figure 1.2 MySQL Enterprise Monitor Agentless Architecture

MySQL Enterprise Monitor Agentless Architecture

Important

For performance reasons, the agentless installation is not recommended for monitoring large implementations. It is useful for testing, or very small-scale implementations. It is strongly recommended to install an agent on each host.

1.2 MySQL Enterprise Monitor Agent

The Agent collects data from the monitored instance and host, and transmits that data to the MySQL Enterprise Service Manager. The Agent can be installed on the same host as the MySQL instance or on a different host.

  • Provides the direct monitoring of the MySQL server, including checking the server accessibility, configuration, obtaining the server ID, and setting up the environment to enable collecting more detailed information. In addition to the information accessible by accessing variable and configuration information within the server, other configuration parameters, such as the replication topology, are also collected from the server.

  • Collects the operating system specific information, including RAM, disk storage and other data.

    Note

    The Agent can collect host data for the server on which it is installed, only. It cannot collect such data for a remotely monitored host.

  • Collects the data from the server, including obtaining the values and configuration of the MySQL server, status variables and other information.

  • Communicates with the MySQL Enterprise Service Manager. Data is collected at scheduled intervals according to the schedule defined on the Advisors. This information is then sent to the MySQL Enterprise Service Manager.

  • For MySQL 5.6.14 and greater, the Agent also collects digested query data from the Performance Schema and populates the Query Analyzer.

Important

If an Agent monitors a MySQL instance remotely, it cannot monitor the host and can only collect data from the monitored MySQL instance.

The Agent runs as a service. The data collected by the Agent is defined by enabling, or disabling, MySQL Enterprise Monitor Advisors.

1.3 MySQL Enterprise Service Manager

MySQL Enterprise Service Manager is the central hub of the MySQL Enterprise Monitor installation and is responsible for the following:

  • Receiving and storing information from the Agents.

  • Configuring the types of information collected by the Agents.

  • Analyzing the collected data using the Advisors.

  • Generating alerts and sending mail or SNMP notifications based on the Advisor configuration.

  • Displaying the collected data, events and notifications.

  • Graphing and reporting on the collected data.

  • Analyzing the SQL queries performed on the monitored instance, in real-time, using the Query Analyzer.

MySQL Enterprise Service Manager is a web application which runs on the Apache Tomcat server.

MySQL Enterprise Service Manager also contains its own Agent which, in a default installation, is used to monitor the repository and host. It can also be used to monitor other, remote MySQL instances. This Agent is installed automatically, as part of the MySQL Enterprise Service Manager installation.

MySQL Enterprise Service Manager Repository

The repository is a MySQL instance which stores all data collected by the Agent. The majority of the data collected by the Agent is analyzed on-the-fly by the Advisors, then stored in the repository. The graphs and reports utilise the stored data to present information in the MySQL Enterprise Monitor User Interface.

MySQL Enterprise Monitor installer installs and configures the MySQL repository. It is also possible to use an existing MySQL instance for this purpose.

MySQL Enterprise Monitor User Interface

The MySQL Enterprise Monitor User Interface is a web-based interface to the MySQL Enterprise Service Manager. MySQL Enterprise Monitor User Interface provides a quick overview of the current status of your hosts and MySQL instances, and enables you to drill down into the current status, events, and historical information submitted by each MySQL Enterprise Monitor Agent.

The main features of the MySQL Enterprise Monitor User Interface include:

  • A simple Overview dashboard that gives an overview of the current health and status of all assets, a list of top critical and emergency events that should be handled, and graphs that relay database statistical information.

  • The Configuration page lets you customize the Advisors and Event Handling for your system. For example, this includes setting thresholds for Advisors, and email addresses to send alerts.

  • The Query Analyzer page helps you identify problematic queries.

  • The Replication dashboard monitors the structure and health of your replication environment.

  • The Events page lists all monitored events, which can be sorted and searched.

  • The MySQL Instances dashboard lists all monitored MySQL instances, which can be analyzed, configured, and grouped.

  • The Graphs & Reports section includes graphs with compiled data for your system that are updated according to the chosen assets. This includes the All Timeseries Graphs and InnoDB Buffer Pool Usage graph pages.

  • The What's New? tab gives a live connection to the My Oracle Support site, with news about the latest releases, critical fixes and patches, current service requests, and suggestions for completing your installation.

MySQL Enterprise Advisors

Advisors filter and evaluate the information broadcast by the Monitoring Agents and present it to the Events page when the defined thresholds are breached. They also present advice on what caused the breach and how to correct it. There are more than 200 Advisors, all of which are enabled by default. Thresholds are the predefined limits for Advisors. If the monitored data breaches the defined threshold, an event is generated and displayed on the Events page. Advisor thresholds use a variety of different value types, depending on the monitored value. Some use percentages, such as percentage of maximum number of connections. Others use timed durations, such as the average statement execution time. It is also possible to check if specific configuration elements are present or correct.

The following types of Advisor are provided:

  • Administration: Checks the MySQL instance installation and configuration.

  • Agent: Checks the status of each MySQL Enterprise Monitor Agent.

  • Availability: Checks the availability of the MySQL process and the connection load.

  • Backup: Checks whether backup jobs succeed or fail, required resources, and information about MySQL Enterprise Backup specific tasks.

  • Cluster: Checks the status of the monitored MySQL Cluster.

  • Graphing: Data for graphs.

  • Memory Usage: Indicate how efficiently you are using various memory caches, such as the InnoDB buffer pool, MyISAM key cache, query cache, table cache, and thread cache.

  • Monitoring and Support Services: Advisors related to the MySQL Enterprise Monitoring services itself.

  • Operating System: Checks the Host Operating System performance.

  • Performance: Identifies potential performance bottlenecks, and suggests optimizations.

  • Query Analysis: Advisors related to Queries and Query Analysis.

  • Replication: Identifies replication bottlenecks, and suggests replication design improvements.

  • Schema: Identifies schema changes.

  • Security: Checks MySQL Servers for known security issues.

It is also possible to create custom Advisors.

The Advisors configure the type of data collected by the Agent. If you do not want to monitor for a specific type of data, disabling the Advisor responsible for that data type instructs the Agent to stop collecting that data.

Events and Notifications

The MySQL Enterprise Service Manager alerts you of Threshold breaches in the following ways:

  • Events: If an Advisor's defined Threshold is breached, an Event is generated and displayed on the Events page. This is the default alert method.

  • Notifications: MySQL Enterprise Service Manager can be configured to send alerts by e-mail, or SNMP traps. These methods must be configured and are not enabled by default.

Query Analyzer

The Query Analyzer enables you to monitor all SQL statements executed on the monitored MySQL databases. The query data can be provided in one of the following ways:

  • Performance Schema: for monitored versions of MySQL 5.6.14 or higher, the Agent retrieves query information from the Performance Schema.

  • MySQL Enterprise Monitor Aggregator: aggregates raw query statistics taken directly from client connections, but analyzed out-of-band and transmitted to the MySQL Enterprise Service Manager saving memory and processing overhead for client statements. MySQL Enterprise Monitor Aggregator can provide data from the Connector/PHP or, when used with the MySQL Enterprise Monitor Proxy, directly from the client application.

    For more information, see Chapter 11, Proxy and Aggregator Installation

  • MySQL Connectors: combined with the corresponding MySQL Enterprise Plugin can provide tracing and statistical information directly to MySQL Enterprise Service Manager.

    For more information, see Chapter 12, Configuring Connectors

Important

Currently, it is possible to use only one source for the Query Analyzer. That is, if you are using MySQL Enterprise Monitor Proxy and Aggregator, you must deactivate Performance Schema on the monitored instance. The same is true if you are using MySQL Connectors to aggregate query data for the Query Analyzer.

1.4 MySQL Enterprise Monitor Proxy and Aggregator

The MySQL Enterprise Monitor Aggregator collects and summarizes the raw query statistics sent from the client application. This data is sent to the MySQL Enterprise Service Manager where it populates the Query Analyzer.

The MySQL Enterprise Monitor Aggregator requires a framework, or chassis, to handle the communications between the client application and MySQL instance, and to enable the MySQL Enterprise Monitor Aggregator to communicate with the MySQL Enterprise Service Manager. The following frameworks are available:

  • MySQL Enterprise Monitor Proxy: the Proxy functions as the communications chassis for the Aggregator and is responsible for intercepting the communications between the client application and the MySQL instance. This enables the Aggregator to collect the raw query data sent from the client application to the MySQL instance. The MySQL Enterprise Monitor Proxy and Aggregator installer can install and configure both Proxy and Aggregator, or a standalone Aggregator if one of the MySQL connectors is used as the communications chassis. The client application must be configured to communicate with the MySQL Enterprise Monitor Proxy.

  • MySQL Connectors: the MySQL Connectors enable communication between the client application and the MySQL instance. If you intend to use a MySQL Connector as the communications framework for the MySQL Enterprise Monitor Aggregator, you must configure the Connector to communicate with the Aggregator. If you use a Connector with the Aggregator, you do not need to install the MySQL Enterprise Monitor Proxy.

Important

Currently, the Aggregator is only required by the MySQL Enterprise Plugin for Connector/PHP. The other connectors can be configured to communicate query data with MySQL Enterprise Service Manager and do not require MySQL Enterprise Monitor Aggregator.