The MySQL Enterprise Monitor Agent performs the following tasks:
Connects to a host and its MySQL server, and collects core information from the host where it lives, and information from all of the MySQL instances that it is configured to monitor. The core data is called the inventory. The inventory includes details such as the MySQL server version number, supported storage engines, and replication configuration. The data in the inventory helps to determine what other kinds of data can be collected from the MySQL servers and hosts.
Collects a set of standard data items that constitute the bulk of the data sent to the MySQL Enterprise Service Manager. This includes all of the information about the configuration, database objects and other content.
Collects information about the host operating system on which the agent is running, including CPU, RAM, and file system information and statistics.
With MySQL server 5.6.14 and above, digested Performance Schema data is collected and populates the query analyzer with data.
Collects any custom data items that you can optionally configure to provide unique monitoring and statistical information for your MySQL server.
The agent is a general purpose service that provides the basis for all this functionality and is the key component of MySQL Enterprise Monitor as it provides the MySQL Enterprise Service Manager with the information about each individual MySQL server and host.
Each MySQL Enterprise Monitor Agent requires a UUID to uniquely identify the MySQL Enterprise Monitor Agent to the MySQL Enterprise Service Manager. This UUID is independent of the UUID assigned to each monitored server. Do not copy the UUID from one instance of the agent to another, as that would cause incorrect associates within the inventory.
When the agent first starts, it performs the following operations:
Loads the configuration information.
Checks that the Agent UUID exists.
Generates what it thinks the current Host ID should be.
Compares whether the instance we are connected to has the same Host ID, to make sure we are not starting on a copied instance wrongly.
Runs the discovery process, waits to be told if the server wants it collected, and at what frequency with what parameters.
Runs the inventory process to determine the core information about the MySQL server.
Responds to the Service Manager with the inventory.
Receives schedule information for each data item from the MySQL Enterprise Service Manager.
Starts collecting data and sending it to the MySQL Enterprise Service Manager according to the schedule set during configuration.
Scans for and reports newly discovered MySQL instances to the MySQL Enterprise Service Manager, which are then displayed in the MySQL Enterprise Monitor User Interface "Unmonitored MySQL Instances" widget. This discovery process is managed by the MySQL Process Discovery advisor.
Once running, each MySQL Enterprise Monitor Agent periodically collects information from the monitored MySQL servers and hosts, and sends it to MySQL Enterprise Service Manager. It also continues to search for unmonitored MySQL instances as long as the MySQL Process Discovery advisor is configured to do so (it is by default).