3.1.4 Using the MySQL Enterprise Agent Aggregator

The optional MySQL Enterprise Agent Aggregator component of the MySQL Enterprise Monitor Agent collects query performance data from additional sources, such as an instrumented application server, user-written scripts, or possible future connectors. It combines and formats the query data for display within the Query Analyzer window, using multithreading to avoid performance bottlenecks. (The .NET and Java connectors bypass the aggregator; they do their own multithreaded processing internally.)

The following figure shows the data flow between your application, various MySQL Enterprise Monitor components, and the database server when you use the MySQL Enterprise Agent Aggregator.

Figure 3.4 The MySQL Enterprise Monitor Architecture when using aggregator and agent services for the same MySQL Server

The MySQL Enterprise Monitor Architecture when using proxy and aggregator services for the same MySQL Server

From the illustration, query data is provided by each individual MySQL Enterprise Plugin for Connectors as queries are executed through the corresponding connector. Query data is distributed up to the aggregator, which reports the corresponding Query Analyzer data to the MySQL Enterprise Service Manager.

Note

When using the aggregator service, the MySQL Enterprise Monitor Agent requires a variable amount of memory overhead to collect and pass on the data from connectors to the MySQL Enterprise Service Manager. The amount depends on the number and text size of executed SQL statements.

You can configure support for the aggregator during the installation of the MySQL Enterprise Monitor Agent. This sets the correct configuration information within the agent configuration files. If you do not configure the MySQL Enterprise Agent Aggregator during installation, the corresponding lines for configuration are commented out.

To re-enable the aggregator service in your agent:

  1. Shut down the MySQL Enterprise Monitor Agent.

  2. Uncomment the MySQL Enterprise Agent Aggregator lines from the etc/mysql-monitor-agent.ini:

    # Aggregator Parameters
    aggr-address=:14000
    aggr-lua-script=lib/mysql-aggregator/lua/aggr.lua
    aggr-mem-baseurl=http://memserver:18080/v2/rest
    
  3. Add the aggr keyword to the plugins parameter. For example:

    plugins=aggr,agent
    
  4. Start the MySQL Enterprise Monitor Agent.

The key configuration option is aggr-address, which sets the address and port on which to listen for incoming aggregator information. The following table shows the list of available options for the aggregator.

Table 3.8 mysql-monitor-agent Aggregator Options

FormatOption FileDescriptionIntroduced
--aggr-addressaggr-addressListening address:port combination2.3.0
--aggr-flush-intervalaggr-flush-intervalThe interval in seconds between flushes of query data to the MySQL Enterprise Service Manager2.3.0
--aggr-lua-scriptaggr-lua-scriptPath to the Lua script2.3.0
--aggr-max-request-body-sizeaggr-max-request-body-sizeLimits the maximum size of requests sent to the Aggregator, to avoid potential out-of-memory errors2.3.8
--aggr-mem-baseurlaggr-mem-baseurlBase URL of the server2.3.0
--aggr-ssl-addressaggr-ssl-addressListening port:address combination for SSL connections2.3.0
--aggr-ssl-ca-fileaggr-ssl-ca-fileCA certificate file2.3.0
--aggr-ssl-cert-fileaggr-ssl-cert-fileServer certificate (PEM)2.3.0
--aggr-ssl-ciphersaggr-ssl-ciphersSupported ciphers for SSL2.3.0
--aggr-test-modeaggr-test-modeStart the aggregator in test mode2.3.0

For more information on setting these options and others, see Section C.2, “MySQL Enterprise Monitor Agent Reference”.