Skip to content
MySQL plug-in

Prerequisites

View Markdown

Here are the prerequisites for deploying the plug-in and monitoring MySQL with it. Topics: 2.1 Enterprise Manager and agents · 2.2 MySQL Shell for Cluster and ClusterSet targets · 2.3 Network and ports · 2.4 The monitoring user · 2.5 TLS · 2.6 Unix-socket connections · 2.7 Backup-tool visibility · 2.8 Sizing and capacity · 2.9 MySQL Connector/J on agent hosts · 2.10 MySQL Router REST API · 2.11 Batch collection

The plug-in runs inside Enterprise Manager and reaches MySQL from a management agent, so both have to be in place before you add a target.

You need:

  • An Enterprise Manager 24ai (24.1) or 13.5 OMS with the plug-in deployed on the OMS. Both the EM 24ai and EM 13.5 editions of the plug-in are certified for this release; EM 13.5 is supported in GA and GA Update 1 and is not built for releases after that (see 1.3).
  • At least one Enterprise Manager 24ai or 13.5 management agent with the plug-in deployed on it. The agent runs every collection, so it needs a network path to each MySQL endpoint it monitors. Run the agent under a UTF-8 locale (for example LANG=en_US.UTF-8, the Linux default): the plug-in reads the monitoring password and Run EXPLAIN statements from the agent as UTF-8.
  • MySQL Connector/J on every agent host that will monitor a MySQL target, placed in the agent’s ip_plugin/xmys/lib directory before the plug-in is deployed to that agent. The driver is not distributed inside the plug-in; see 2.9 for the version, the download check and the exact directory. MySQL InnoDB ClusterSet targets have one further prerequisite; see 2.2.

Where the agent runs is your choice:

  • Remote monitoring is the normal case. The agent runs anywhere that can open a TCP connection to the MySQL port, and one agent can monitor many MySQL targets on many hosts.
  • A local agent (an agent installed on the MySQL server host itself) is required only when you want the plug-in to connect over a Unix socket instead of TCP. See 2.6.

Note: Deploying the plug-in on the OMS does not deploy it to agents. Deploy it to every agent that will monitor a MySQL target, as described in 3.3. Until you do, the MySQL target types are not offered for that agent on the Add Target page.

2.2 MySQL Shell for Cluster and ClusterSet targets

Section titled “2.2 MySQL Shell for Cluster and ClusterSet targets”

Besides Connector/J (2.9), which every target type needs, two target types use one external tool on the agent host: MySQL Shell. The MySQL InnoDB ClusterSet target needs it for its health verdict. The MySQL InnoDB Cluster target needs it for one metric group, Cluster Health.

The ClusterSet target runs MySQL Shell (mysqlsh) from the agent host to read AdminAPI status. Install MySQL Shell (mysqlsh) on every agent host that will monitor a ClusterSet target and make sure it is on the agent user’s PATH. Without it the plug-in cannot run AdminAPI and degrades to a repository rollup that reports fallback_reason MYSQLSH_NOT_FOUND. A rollup cannot assess ClusterSet-wide promotion readiness, so it does not claim a verdict either way: health_status reads UNKNOWN and dr_promotion_ready reads -1 (not assessed). The DR Promotion Ready alert fires only on 0 (a readiness check that ran and failed) so it does not raise on a rollup.

The rollup is a deliberate degradation, not an error: the target stays Up and its other columns keep collecting from the repository. A missing MySQL Shell is a prerequisite on the agent host, not a fault, so it raises no alert of its own; check health_status on the ClusterSet Health metric to see that readiness is not being assessed.

A member Shell cannot reach. Once MySQL Shell connects through one listed endpoint, the AdminAPI opens its own session to every member Group Replication still considers online, whether or not that member is in the endpoint list (2.3). A network path that reaches one listed member but not another therefore still degrades ClusterSet health, even though the endpoint list itself worked: fallback_reason reads MEMBER_UNREACHABLE, health_status reads UNKNOWN with dr_promotion_ready at -1, and the Fallback Reason alert raises WARNING after two consecutive collections until the path is open.

The remedy is the one 2.3 already asks for: a path from the agent host to every member of every cluster, on each member’s MySQL port, whether or not you listed the member on the target.

The same applies when the agent host can reach no member of the primary cluster at all. MySQL Shell still answers through a replica-cluster member but reports the primary’s state as unknown, and the plug-in reports MEMBER_UNREACHABLE and readiness not assessed rather than “not ready”, because from the agent host a path that is cut and a primary cluster that is down look the same. See Troubleshooting.

A replica cluster the agent cannot reach. When the agent host has no path to any member of a replica cluster, MySQL Shell does not fail. It reports that cluster UNREACHABLE (“Could not connect to any ONLINE members”) with global status UNKNOWN, and the JDBC read reaches no member of it. From the agent host a cut path and a replica cluster that is down look the same, so the plug-in asks the one server that can tell: the primary cluster’s primary.

A replica cluster that is running holds a ClusterSet replication connection to it, which the primary lists as a Binlog Dump GTID thread of an account named mysql_innodb_cs_<hex> whose host is a member of that replica cluster. The plug-in reads that from performance_schema.threads and matches the host against the member addresses in the InnoDB Cluster metadata. A thread of any other account, such as a plain asynchronous replica or a Router, does not count.

The same rule applies to both health sources:

What the primary cluster’s primary showsCluster rowHealth row
A live ClusterSet replication connection from the clusterGlobal status UNKNOWN, Fault Tolerance UNREACHABLE (a WARNING, 7.1), and a status text that says the cluster is running and the route is the problemreplica_clusters_healthy, replication_channel_ok, replica_clusters_complete, dr_promotion_ready at -1 and health_status UNKNOWN; the DR Promotion Ready alert does not fire. status_text names the cluster
No such connectionMySQL Shell: unchanged, with the finding added to the status text. JDBC: global status NOT_OK, Fault Tolerance UNREACHABLEMySQL Shell: unchanged, replica_clusters_healthy 0 and dr_promotion_ready 0 (the DR Promotion Ready alert fires). JDBC: replica_clusters_healthy 0; dr_promotion_ready stays -1
The check could not run (no known primary, the connection or the read failed, or performance_schema.threads does not list the monitoring session)Each source keeps the answer it gave before the check, and the status text says the check could not run and names the error class and numberUnchanged for each source

Which targets get the check. MySQL Shell contacts every member itself, so any replica cluster it reports UNREACHABLE is checked. On the JDBC read only a replica cluster with at least one member in the target’s endpoint list that the agent tried and could not reach is checked.

A target whose only endpoint is a MySQL Router, or a single member, never tries the members of the other clusters. Those clusters read UNKNOWN with Fault Tolerance NOT_ASSESSED, a status text that says no member is in the endpoint list, and no alert. Add the cluster’s members to the Host and Port lists to assess it.

An endpoint names a member when host and port both match the metadata. A listing under another name, such as an IP address for a host name, is matched by resolved address on the same port, within the check’s 15 seconds. A Router on a member’s host but another port is not that member. When the names cannot be resolved in time the cluster stays unassessed and its status text says that the endpoint list entries could not be matched to the cluster’s members.

What the check cannot tell. The thread’s host carries no port, so it is matched to a cluster by host name or address. When one host serves members of several clusters (a sandbox or a container host with one address and several ports, or a replica cluster that shares a host with the primary cluster), a thread from that host cannot be assigned to one of them, and the result for each of those clusters is “not checked” with the reason “a host is shared by several clusters”.

A thread whose host matches no member by name, with a name that cannot be resolved, is also “not checked”, never “no connection”. A socket target cannot reach the primary cluster’s primary, so its result is “not checked”.

How long a dead replica reads UNKNOWN. A replica cluster that is down and also unreachable from the agent keeps its dump thread on the primary until the primary’s TCP connection times out, which follows the operating system’s retransmission timeout rather than replica_net_timeout and can take up to about 15 minutes. Until the thread is gone the cluster reads UNKNOWN, as a running cluster does; then it reads 0 and the DR Promotion Ready alert raises.

While the cluster is unreachable but running. MySQL Shell’s own ClusterSet verdict is not part of the readiness gate, because Shell reads the unreachable cluster as a failure. A fault that only that verdict would catch therefore reads -1, not 0, until the route returns. Under AUTO a persistently blocked route also raises the Health Stale WARNING after three collections without a verdict (7.1). This is intended: it says that no readiness verdict has been made since the time it names.

A failure the readable clusters show still counts: with a second replica cluster that MySQL Shell reads as not healthy, dr_promotion_ready is 0 whatever the unreachable one is, and with every readable cluster healthy it is -1, never 1. The check adds one connection to the primary cluster’s primary, only in a collection that has an unreachable replica cluster, and all of it (connect, statements and name lookups) is bounded to 15 seconds; on expiry the result is “not checked” (the third row above). It needs SELECT on performance_schema.threads and on the metadata schema, which the global SELECT of 2.4 covers; no PROCESS is needed for it.

Health without MySQL Shell (segmented networks). When the agent host cannot be given a path to every member, or MySQL Shell cannot be installed, ClusterSet health can be read over JDBC instead. The mode is chosen with the Health Source Mode property (ip_mysql_clusterset_health_mode, 4.1):

  • AUTO (the default, and what an empty value means): MySQL Shell first, exactly as described above. When MySQL Shell is missing, times out, cannot reach a member, or cannot be used with the target’s Unix socket, Kerberos-through-Router or TLS setup, the plug-in reads the members it can reach over JDBC before it falls back to the repository rollup. health_source reads JDBC_METADATA and fallback_reason still names why MySQL Shell was not used, so the Fallback Reason and Collector Status alerts behave as they do for any MySQL Shell fault. A MySQL Shell failure that JDBC would meet too (AUTH_FAILED, UNREACHABLE, PARSE_FAILED, TLS_VERIFY_FAILED, KERBEROS_TICKET, KERBEROS_CONFIG_UNREADABLE) keeps the repository rollup.
  • ADMINAPI: MySQL Shell only, with no JDBC substitute.
  • JDBC_METADATA: MySQL Shell is never started. There is no MySQL Shell run, no MySQL Shell timeout and no MySQL Shell fault alert, because nothing failed: fallback_reason reads NONE. Use it when the agent host will never reach every member.

What the JDBC read does. It opens one connection to each endpoint listed on the target, all at once, and on each member that answers it reads three things with SELECT only: the InnoDB Cluster metadata schema (mysql_innodb_cluster_metadata), which every member holds for the whole ClusterSet; that member’s Group Replication view (performance_schema.replication_group_members); and its replication channels and applier timestamps (performance_schema.replication_connection_status, replication_applier_status and replication_applier_status_by_worker). The metadata names the domain, every cluster, its role and its configured members, so one reachable member is enough to name all of them.

The read needs no grant beyond the monitoring user’s global SELECT, PROCESS, REPLICATION CLIENT (2.4): the global SELECT covers the metadata schema. List members of every cluster on the target: a cluster is assessed only from a member of that cluster that answered.

What it cannot see that MySQL Shell can. A JDBC row says so itself: health_source is JDBC_METADATA and status_text names what is not assessed.

ValueADMINAPIJDBC_METADATA
dr_promotion_ready, health_status1 or 0; READY or NOT_READYAlways -1 and UNKNOWN. The gate needs the cross-cluster GTID comparison and MySQL Shell’s own ClusterSet verdict, which the metadata does not hold. A JDBC row can never report ready, and never raises the DR Promotion Ready alert (it fires only on 0).
gtid_lag, errant_gtid_count, and the per-cluster GTID counts and consistency statusMeasured-1 (empty on a cluster row): not assessed
status, status_text (MySQL Shell’s own ClusterSet verdict)MySQL Shell’s wordsstatus empty; status_text says the row came from JDBC
replica_cluster_count, domain_name, primary_clusterFrom MySQL ShellFrom the metadata: a count of 0 still means no replica cluster
primary_healthy, replica_clusters_healthy, replica_clusters_complete, per-cluster status and fault toleranceFrom MySQL ShellFrom the group view of a member of that cluster, with MySQL Shell’s quorum rule. A cluster no listed member reached is UNKNOWN (-1 on the health row, Fault Tolerance UNREACHABLE) when the primary cluster shows it running, and unhealthy (NOT_OK, 0) when the primary shows no live replication connection from it (the paragraph above)
replication_channel_ok, per-cluster replication status, time lagFrom MySQL Shell and the replica primaryFrom the replica cluster’s PRIMARY member only; -1 when that member was not reached

The readiness gate therefore behaves differently in the two modes, on purpose: MySQL Shell decides it, and without MySQL Shell it is not decided. Treat health_source JDBC_METADATA as monitoring of what the agent can see, and make a promotion decision from MySQL Shell (dba.getClusterSet().status()) run from a host that reaches every member.

Confirm the tool as the agent’s operating-system user, not as root, because the agent’s own PATH is what matters:

mysqlsh --version

Which MySQL Shell. The plug-in is tested with MySQL Shell 8.4 LTS, 9.7, 26.7 and 26.10. MySQL renumbered its Shell releases after 9.6, so the current release from MySQL’s repositories carries a 26.x version number; it works the same way. The agent picks up a newly installed or upgraded MySQL Shell on its next ClusterSet collection, with no restart.

A MySQL Shell newer than the ClusterSet it reads is fine. The 8.4 certification (1.3) read an 8.4.13 ClusterSet, whose metadata schema is version 2.3.0, with MySQL Shell 26.10, which recommends upgrading the metadata to 2.4.0 on every call. The recommendation goes to the Shell’s error stream, the status document is complete, and the plug-in reports the ClusterSet normally. Upgrading the metadata is the cluster administrator’s decision, not a monitoring prerequisite.

Supported range. Use MySQL Shell 8.4 or later, of the same release series as the monitored servers or a newer one. A release series is the first two numbers of the version, for example 8.4, 9.5 or 26.10. The rule is MySQL’s own: its documentation asks for a MySQL Shell version that is the same as or higher than the MySQL Server release, because an older MySQL Shell cannot manage features of a newer server. The ClusterSet target’s Monitoring Readiness page (5.3) shows the MySQL Shell version it found beside the server version, and marks a MySQL Shell outside this range as Attention.

MySQL Shell on a Cluster target. From this release a MySQL InnoDB Cluster target runs MySQL Shell once every 5 minutes for one metric group, Cluster Health. The group reports the cluster’s status and fault tolerance as MySQL Shell’s dba.getCluster().status() gives them (5.2). Every other Cluster group still connects over JDBC only and collects on an agent host without MySQL Shell.

Without mysqlsh on the agent user’s PATH, Cluster Health reports health_source UNAVAILABLE, fallback_reason MYSQLSH_NOT_FOUND and fault_tolerance NOT_ASSESSED, and raises no alert. The plug-in does not compute a verdict from SQL in its place. The supported range above, the TLS Mode and CA Certificate File (2.5) and the Kerberos rules below apply to a Cluster target in the same way as to a ClusterSet target.

MySQL Database targets do not use MySQL Shell. They connect over JDBC only, through the Connector/J driver you place on the agent host (2.9), and need nothing else.

Kerberos on a ClusterSet target. When the target carries a Kerberos Configuration File (4.1), the plug-in runs MySQL Shell with the authentication_kerberos_client plug-in and no password. The credential is the ticket in the agent operating-system user’s default credential cache, and KRB5_CONFIG is set to the target’s file. The credential set’s password is not used on this path, so a target registered for Kerberos needs no password at all.

Three things must be true on the agent host, none of which the plug-in can arrange for you:

  • the Kerberos client libraries are installed (MySQL Shell’s own package ships the client plug-in);
  • the agent’s operating-system user holds a keytab for the monitoring principal with an unattended refresh (k5start, or a scheduled kinit -kt), because a scheduled collection cannot type a password;
  • klist run as that user shows a valid ticket.

Every ClusterSet member must accept the principal through the server’s authentication_kerberos plug-in, because MySQL Shell opens its own session to every member, so the account must exist cluster-wide. MySQL Shell cannot log in with Kerberos through MySQL Router, so give a Kerberos ClusterSet target member endpoints (a node list, 4.1), not a Router port; behind a Router its health falls back to the repository rollup. The plug-in’s JDBC collections are not affected: they do authenticate with Kerberos through a Router.

When one of these is missing, fallback_reason names it:

fallback_reasonCause
KERBEROS_TICKETthe Kerberos exchange itself fails. A missing or expired ticket is the usual cause; an unreachable KDC, clock skew or a missing service principal look the same to MySQL Shell
KERBEROS_NOT_SUPPORTEDthe endpoint is a Router
KERBEROS_CLIENT_UNAVAILABLEMySQL Shell cannot load its Kerberos client plug-in
KERBEROS_CONFIG_UNREADABLEthe configuration file cannot be read
AUTH_FAILEDa member does not accept the principal

Each has its remedy in Troubleshooting.

Open the paths the agent needs before you add a target. A blocked path shows up as a target that stays Down after it is added.

A MySQL Database target needs one outbound TCP path:

FlowPortUsed for
Agent host → MySQL serverThe server’s listening port, 3306 by defaultEvery JDBC collection for the target

A MySQL InnoDB Cluster target needs the same kind of path to whatever endpoint you configure on it: any member of the cluster, or a MySQL Router instance on the classic-protocol port you configured for it.

Both container types accept a comma-separated list of endpoints in (Router) Host / (Router) Port (4.1); every member you list needs this same path from the agent host.

A MySQL InnoDB ClusterSet target needs two things:

  • The agent’s JDBC path to the host and port configured on the target, normally a MySQL Router endpoint.
  • A path from the agent host to every member of every cluster in the ClusterSet, on each member’s MySQL port, because MySQL Shell opens those connections itself when it reads AdminAPI status.
  • For a Cluster target, a path from the agent host to every member of the cluster, on each member’s MySQL port, for the same reason: MySQL Shell opens its own session to each member when it reads the cluster’s status for Cluster Health (2.2).

Note: mysqlsh member discovery uses hostnames, so the agent host must resolve every cluster member’s FQDN even when the database targets themselves are configured by IP address.

A MySQL Router target needs a path to the Router and not to MySQL:

FlowPortUsed for
Agent host → MySQL Router hostThe Router’s REST port, 8443 by default (HTTPS)Every collection for a MySQL Router target

The agent needs no path to the MySQL servers behind the Router for this target, and the Router host needs no agent (2.10).

Check the host firewall on the database side (firewalld, nftables, cloud security groups) as well as any network firewall in between, and confirm the server’s bind-address accepts connections from the agent’s address. For a Router target, check the same things on the Router host for its REST port.

The plug-in connects to MySQL as an ordinary read-only account. Create it on each server before you add the target.

Run these two statements as an account that can create users:

CREATE USER 'em_monitoring'@'%' IDENTIFIED BY '<strong password>';
GRANT SELECT, PROCESS, REPLICATION CLIENT ON *.* TO 'em_monitoring'@'%';

No SUPER and no write privilege is required. Because the SELECT grant is global, it already covers performance_schema, the mysql schema, mysql.backup_history and PERCONA_SCHEMA; no further grant is needed for any metric group or for backup monitoring.

What each privilege buys:

PrivilegeUsed for
SELECT on *.*Every collection that reads a table or view: performance_schema (including the Group Replication status tables), the sys schema, the mysql schema and the backup history tables
PROCESSServer-wide session and InnoDB engine status, including the process list and per-user activity
REPLICATION CLIENTSHOW REPLICA STATUS and SHOW BINARY LOG STATUS

When one of these privileges is missing, the group that needs it reads COLLECTION_ERROR in Collector Status, and the reason names the error: privilege denied for MySQL error numbers 1044, 1142, 1143, 1227 and 1370 (6.5). A CRITICAL alert names the group after two collections.

Note: Narrow the '%' host clause to your agent’s subnet if your security policy requires it. The agent connects over TCP, so the account’s host clause has to match the agent’s address as MySQL sees it, not localhost. Socket-connected targets are the exception; see 2.6.

The ClusterSet unreachable-replica check (2.2) reads performance_schema.threads on the primary cluster’s primary and needs no grant beyond this one. If the monitoring account cannot read that table, the check reports that it could not run in the cluster’s status text and each health source keeps its earlier answer; nothing else is affected.

After you add the target, its Monitoring Readiness page (5.1) checks PROCESS, REPLICATION CLIENT and SELECT on performance_schema, and separately checks that the sys schema is readable. For any that is missing it shows a GRANT statement for that one privilege, which can be narrower than the grant above. If you ran the grant above, you need none of them: it already covers every check.

Note: On Group Replication and InnoDB ClusterSet deployments CREATE USER and GRANT replicate like any other write. Run the two statements once on the (global) primary and the account exists on every member.

MariaDB. On MariaDB, REPLICATION CLIENT is an alias of BINLOG MONITOR and does not cover SHOW REPLICA STATUS or information_schema.SLAVE_STATUS, which need REPLICA MONITOR. Name both privileges instead of REPLICATION CLIENT:

CREATE USER 'em_monitoring'@'%' IDENTIFIED BY '<strong password>';
GRANT SELECT, PROCESS, BINLOG MONITOR, REPLICA MONITOR ON *.* TO 'em_monitoring'@'%';

SLAVE MONITOR is the same privilege as REPLICA MONITOR under its older name; use it on a server that does not accept the newer one. No SUPER and no write privilege is required, and the global SELECT covers performance_schema, information_schema and the mysql schema as it does on MySQL.

PrivilegeUsed for
SELECT on *.*The performance_schema tables; mysql.global_priv and mysql.roles_mapping for the two security groups; information_schema.global_variables
PROCESSSHOW ENGINE INNODB STATUS and the process list
BINLOG MONITORSHOW MASTER STATUS, which the plug-in sends to MariaDB at every version, and the Monitoring Readiness check for this privilege
REPLICA MONITORSHOW SLAVE STATUS (the replica activity group) and, on MariaDB 11.6 and later, information_schema.SLAVE_STATUS (the replication connection status and configuration groups). Without it these groups report an access error

On Amazon RDS for MariaDB 11.8.9 an account holding these four privileges on *.* collected the replication groups; the managed-service notes are in 4.4.

Statement text in the repository. Two kinds of collection store SQL text in the Enterprise Manager repository, every 5 minutes by default:

  • The statement rankings behind Query Analyzer and the Overview’s Top SQL (SysStatementByLatency, SysStatementByExecCount and SysStatementByFirstSeen) store the normalized statement text of the top digests. Normalized text has its literal values replaced by ?.
  • The SysProcesslist group behind the Sessions page stores each active session’s current statement as the session sent it, not normalized. It can include literal values, and so personal or other sensitive data.

Access to both is governed by Enterprise Manager’s target privileges. If your site has strict data-handling rules, disable the SysProcesslist collection in the target’s Metric and Collection Settings (7.2). The other metric groups are not affected; only the Sessions page stops filling. Query Analytics Trends keeps the digest and the figures, not the statement text (5.1).

Each target chooses its own transport security through the TLS Mode property; nothing is inherited from the server or from the agent.

The property takes four values, and leaving it empty is meaningful in its own right:

ValueBehavior
(empty)Same as disabled: the agent connects without TLS.
disabledThe agent connects without TLS.
requiredThe agent connects only if the session is encrypted.
verify_caThe agent connects only if the session is encrypted and the server’s certificate is signed by a certificate in the target’s CA Certificate File. The host name is not checked.
verify_identityAs verify_ca, and the server’s certificate must also name the host the target connects to.

Three behaviors matter operationally:

  • An empty TLS Mode means plaintext. Leaving the property blank is treated exactly as disabled, not as required. Set it explicitly on every target where the connection has to be encrypted. One path differs: on a ClusterSet target, the MySQL Shell session that reads ClusterSet health passes no ssl-mode when TLS Mode is empty, so MySQL Shell uses its own default, which encrypts the session without verifying the server certificate.
  • required fails closed. If the server cannot give the agent an encrypted session, the connection fails with an explicit SQLException and the target goes Down. There is no silent fallback to plaintext, so a target that is Up under required connected over TLS.
  • Any non-empty value the plug-in does not recognize fails closed to required. A typo in the property is treated as required rather than as disabled, so it cannot quietly switch encryption off, but an empty property is not a typo, and follows the first rule above.

Verifying the server’s certificate. verify_ca and verify_identity need the target’s CA Certificate File property. It is the absolute path of a PEM file on the agent host that holds the certificate of the CA that signed the server’s certificate. The file may hold several certificates, and several targets may name the same file. The agent’s operating-system user must be able to read it. It holds public certificates only, so it has no password.

To verify the certificate of a target’s server:

  1. Get the CA certificate. SHOW VARIABLES LIKE 'ssl_ca' names the file the server uses. On a server that uses the certificates MySQL generates at first start, it is ca.pem in the data directory. A managed service publishes its CA certificates as a PEM bundle.

  2. Copy it to the agent host, for example to /etc/ssl/mysql/db01-ca.pem, readable by the agent’s operating-system user.

  3. Set the target’s TLS Mode and CA Certificate File under Target Setup → Monitoring Configuration (4.5) or with EM CLI:

    emcli modify_target -name="db01" -type="ip_mysql_database" \
    -properties="ip_mysql_database_use_secure:verify_ca;ip_mysql_database_ca_file:/etc/ssl/mysql/db01-ca.pem" -on_agent
  4. Open the target’s Monitoring Readiness page. The Database connection check reads connected as <account>, MySQL <version>, TCP, TLS verify_ca.

  • The CA file is the only trust. The plug-in does not use the agent’s Java trust store for these connections, so replacing the agent’s Java runtime does not change what a target trusts.

  • A verify mode fails closed. When the certificate cannot be verified the target goes Down. Monitoring Readiness and the collection error of each metric group name the reason:

    ReasonMeaning
    TLS_CA_FILEThe CA Certificate File property is empty, or the file is not a readable PEM file of certificates on the agent host.
    TLS_CA_NOT_TRUSTEDNo certificate in the file signed the server’s certificate.
    TLS_HOST_MISMATCHverify_identity only: the server’s certificate does not name the host the target connects to.
    TLS_CERTIFICATE_EXPIREDA certificate the server presented is outside its validity period.
  • verify_identity needs a certificate that names the host. The certificates MySQL generates at first start carry no host name, so verify_identity cannot pass with them. Use verify_ca, or install a server certificate with the target’s Host as a subject alternative name. On a Cluster or ClusterSet target with a list of endpoints, the certificate each endpoint presents must name that endpoint.

  • The file must cover every endpoint. When members were given certificates by different CAs, put all of those CA certificates in the one file. When an endpoint is a MySQL Router port, the certificate presented is the Router’s, so the file holds the CA of the Router’s certificate.

  • ClusterSet health uses the same file. MySQL Shell is given the target’s TLS Mode and CA Certificate File. When MySQL Shell rejects a member’s certificate, the Fallback Reason reads TLS_VERIFY_FAILED. When the file is missing or unusable, the plug-in does not start MySQL Shell and the Fallback Reason reads TLS_TRUSTSTORE_REQUIRED.

  • The Run EXPLAIN job (8.1) uses the same two properties.

Note: The plug-in reads PEM files only. To use the certificates of a JKS or PKCS12 trust store, export them with keytool -exportcert -rfc and concatenate the output into one file.

Note: This section describes the MySQL connection of the MySQL Database, MySQL InnoDB Cluster and MySQL InnoDB ClusterSet targets. A MySQL Router target has its own REST TLS Mode for the Router’s REST port, and there verify_ca and verify_identity are available (2.10).

A MySQL server that shares a host with its management agent can be monitored over a Unix socket instead of TCP.

Requirements:

  • The management agent runs on the MySQL server host (a local agent, as described in 2.1).
  • The agent’s operating-system user can read and write the socket file. Confirm the path on the server with SELECT @@socket;.
  • The monitoring account exists as '<user>'@'localhost'. A socket connection arrives as localhost, and MySQL matches the most specific host value first, so create the account explicitly for that host value:
CREATE USER 'em_monitoring'@'localhost' IDENTIFIED BY '<strong password>';
GRANT SELECT, PROCESS, REPLICATION CLIENT ON *.* TO 'em_monitoring'@'localhost';

On the target, set Unix Socket Path to the socket file and leave Host empty.

Note: A target configured with both a host and a socket path connects over TCP. Leave Host empty to force the socket connection.

Note: MySQL matches the most specific host value first, and among rows that share a host value a named user beats the anonymous one. An anonymous account (''@'localhost') (shipped as a legacy default by some installations, and sometimes left behind by test fixtures) therefore shadows 'em_monitoring'@'%' on a local connection, but it does not shadow 'em_monitoring'@'localhost'. That is exactly why this section asks for the explicit @'localhost' account. If a socket target still fails to authenticate, list any anonymous rows with SELECT user, host FROM mysql.user WHERE user = ''; and drop the ones you do not need.

A socket connection authenticates a caching_sha2_password monitoring account on its own after a mysqld restart, with no TLS and no operator action: the plug-in registers a socket-aware client authentication plug-in for socket connections (see the release note in upgrade-notes.md for the mechanism). TLS Mode (2.5) means the same thing on a socket target as on a TCP one. The Unix Socket Path must be mysqld’s own socket: a Unix socket fronted by a proxy that forwards to the server over TCP (MySQL Router socket=, ProxySQL) is not a secure transport in the server’s eyes, and the socket-aware plug-in (like the mysql client) will not authenticate a caching_sha2_password account through it; point such a target at the proxy’s TCP port instead.

The plug-in reports backup age and backup failures by reading the history tables that backup tools write into MySQL, so what it can see depends on which tool you run and how you run it.

ToolHistory tableWritten when
MySQL Enterprise Backup (MEB)mysql.backup_historyOn every run, by default
Percona XtraBackup (PXB)PERCONA_SCHEMA.xtrabackup_historyOnly when the backup command includes --history

Both tables are already readable under the monitoring account in 2.4, because its SELECT is global.

When a tool’s history table is not present on the server, the plug-in reports that tool as not detected and raises no alert; the other tool’s metrics carry on collecting. A site that runs only one of the two tools sees the other reported as not detected, and that is the intended behavior rather than a fault: it is what keeps a shop that never installed MEB from seeing a permanent false “no backups” alarm.

Note: MEB writes history by default and --no-history-logging turns it off. There is no --backup-history flag to add: MEB does not recognize one and errors if you pass it. If MEB backups are not appearing, look for --no-history-logging in the backup job rather than for a missing flag.

Note: Logical dumps (mysqldump, mysqlpump, the MySQL Shell dump utilities) and storage or array snapshots leave no server-side record at all. No SQL-based collector, this plug-in included, can see them. An estate backed up only that way correctly shows no backup history.

Failure detection is asymmetric between the two tools. MEB writes a history row when a run fails, so the failed-backup condition works on MEB. XtraBackup writes no row for a failed run, so on XtraBackup-only estates that condition can never fire and backup age is the failure signal instead. Size the age thresholds (7.1) to your backup cadence with that in mind.

For the cluster pattern (back up on one member and monitor any member, because history rows replicate like any other write) and for the full tool-by-tool detail, see backup monitoring.

Plan the agent hosts and the repository before you add more than a handful of targets. The numbers here were measured on 2026-09-10 on our own lab, on the shipped default collection schedules, with the plug-in’s current collection architecture: the agent runs every collection as its own short-lived JVM, one per collection item per target. That architecture is what sets the cost per target, and a single co-located lab host showed exactly what happens when it is exceeded.

What one database target costs.

ResourceMeasured, per ip_mysql_database target at default schedules
Collection processesabout 14 JVM launches per minute (Response, wait profile and its summary every minute; about 56 items every 5 minutes; configuration once a day)
Agent-host CPUabout 0.3 of a vCPU, sustained (18 targets drove the oracle user to ~525 % of an 8-vCPU host; each launch costs 2 to 3 CPU-seconds including the JDBC connect; measured before the startup flags described under Cost per collection)
Repository ingestabout 52,000 metric rows per hour, 1.2 million per day

Cluster and ClusterSet targets are lighter on the repository but each health collection also runs MySQL Shell (2.2), which is a further CPU burst on the agent host (about 4 to 5 CPU-seconds measured on 2026-11-10); an endpoint-list target with six members costs the same as one.

Cost per collection. From this release the plug-in starts each collection JVM with flags sized for a process that lives a few seconds (one compiler tier, one garbage-collector thread). Measured on an 8-vCPU 13.5 agent host on 2026-11-10, a Response or Group Replication collection costs about 1.7 to 1.9 CPU-seconds (down from 2.3 to 2.7, about 20 to 30 percent less), and a ClusterSet health collection about 6 to 7 CPU-seconds, most of it MySQL Shell.

A ClusterSet target runs MySQL Shell once every 5 minutes. ClusterSet Health runs it, and ClusterSet Clusters, which the agent collects directly after it on the same schedule, reuses the status document that ClusterSet Health read. ClusterSet Clusters runs MySQL Shell itself only when ClusterSet Health could not read the status. The JVM count does not change: plan agent hosts by launches per minute, as below.

A Cluster target also runs MySQL Shell once every 5 minutes, for Cluster Health, which is one more collection per target every 5 minutes. Its cost on a Cluster target has not been measured separately; plan with the ClusterSet health figure above.

Where the repository rows come from. Five keyed groups are 70 percent of the ingest; the rest of the 59 groups together are the other 30 percent.

Metric groupRows per hour per targetWhy
Memory by Event (SysMemoryByEvent)~15,000one row per Performance Schema memory instrument (about 1,200), every 5 minutes
File I/O (SysIoByFile)~8,600one row per open file, every 5 minutes
Statements by latency, by execution count, by first seen~11,400three top-25 rankings, every 5 minutes
I/O by wait class (SysIoByWait)~2,500
Statement digest profile (Query Analytics Trends, 5.1)~2,400top 25 per 5-minute collection
Wait profile (Waits, 5.1)~1,400active events only, every minute

Agent hosts: the rule. Give the plug-in dedicated agent hosts and plan two database targets per vCPU on them, which leaves headroom for cluster targets, collection bursts and the agent’s own work. Never place these targets on an agent that shares a host with the Oracle Management Service or the repository database: on our 8-vCPU lab host that carries all three, 18 targets starved the repository’s log writer of CPU: commits queued for seconds (log file sync averaging over 2 s while the disk sat idle), the metric loader’s upload threads stuck on commit, and the OMS restarted itself repeatedly without finishing initialization.

A second combined OMS, repository and agent host (8 vCPU) showed the same with composite targets: 25 Cluster and ClusterSet targets and four database targets ran about 80 MySQL collection JVMs a minute, alongside other plug-ins’ collections, held the load average between 40 and 60 for days, and made an OMS restart take about 40 minutes; a blackout of 24 of those composite targets alone brought the load from about 58 to about 12.

Dedicated agent hostDatabase targets to plan for
4 vCPU8
8 vCPU16
16 vCPU32

Spread a larger estate across several agents (the bulk-onboarding script in 4.7 takes the agent per row), and keep the composite cluster and ClusterSet targets on the same agent as their members so a health collection does not add a network hop.

Repository: reduce what you do not read. At 100 targets the default schedules load about 5 million rows an hour into the repository. Size the repository host per Oracle’s Enterprise Manager sizing guidance for a large deployment, and reduce the collection frequency of the high-cardinality groups you do not use minute by minute.

From the target’s Metric and Collection Settings, move Memory by Event and File I/O to every 30 minutes and the three statement rankings to every 15 minutes. That removes about half of the ingest with no loss to the Overview, Query Analytics Trends or Waits pages: those read the statement digest profile and the wait profile, which should stay at their defaults.

Disabling Memory by Event entirely is reasonable in an estate that does not investigate memory instrument by instrument. The Week and Month totals on Query Analytics Trends and Waits (5.1) stay exact under a changed schedule: they are weighted by the collections that ran.

Recognizing overload. The symptoms arrive in this order: the Week and Month windows on the trend pages stay empty and the 24 Hours window stops advancing; emctl status oms -details on the OMS reports the management server down with “PBS may not be up” while the console still serves; the WebLogic server log shows [STUCK] ExecuteThread entries whose stacks end in MetricLoadShared.flushRows waiting on a JDBC commit; the repository shows log file sync waits of seconds with log file parallel write in single-digit milliseconds; and the agent log reports the OMS upload URL answering “Context not fully initialized - rejecting request”. A collection-error count of zero throughout is normal: the agent is collecting and the repository cannot absorb it.

Relief, in order: put the targets you can spare into a blackout with an explicit duration (emcli create_blackout -name=<name> -add_targets="<target>:ip_mysql_database;…" -reason="<reason>" -schedule="duration:168:00" for seven days) so the launch rate drops immediately. Give the duration as hours and minutes: on Enterprise Manager 24ai duration:-1 creates a one-hour blackout, not an indefinite one. emcli stop_blackout -name=<name> ends it early and leaves its record behind, so run emcli delete_blackout -name=<name> before creating another blackout with the same name. Once the launch rate has dropped, restart the OMS (emctl stop oms -all then emctl start oms), then move targets to additional agents or lower the schedules above before lifting the blackout. Restarting the OMS without reducing the load only repeats the stall.

Why the cost grows this way. Each metric group collects in its own process on its own interval, so the process launch rate grows with the number of targets times the number of groups. The figures above apply to this release. Batch collection (2.11) serves a target’s collections from one process and removes most of the launches; it is off by default.

The plug-in reaches MySQL through MySQL Connector/J, Oracle’s JDBC driver. Connector/J is licensed under the GPL with Oracle’s Universal FOSS Exception, or under a MySQL commercial license, so it is not distributed inside the plug-in. You place one copy on every management agent host that monitors a MySQL target, and the plug-in loads it from there. This applies to MySQL Database, MySQL InnoDB Cluster and MySQL InnoDB ClusterSet targets alike, and to the Run EXPLAIN job (8.1).

Which version. Connector/J 8.4.0 is the version this release ships its checksum for and the one to stage unless you have a reason not to; it is tested against MySQL 8.0, 8.4, 9.5, 9.7 and 26.10 servers. Connector/J 9.7.0 and 26.10.0 are also certified (2026-10-24, every metric group on every target type, the Kerberos, TLS, RDS and Unix-socket paths included), so a site that standardizes on a newer driver can use either. Other 8.4.x, 9.x and 26.x releases up to the 26.10 series are expected to work; if a collection stops after you install one of those, go back to 8.4.0 and tell us (1.4).

The supported range is 8.4.0 through 26.10.x. A driver outside it is not refused: the plug-in writes a warning to the plug-in log that names the driver version and the range, and collection continues. The warning appears at most once every 24 hours on each agent. The plug-in records the time of the last one in <agentStateDir>/ip_plugin/xmys/connector-j-range-warned; delete that file to see the warning again on the next collection. With batch collection on (2.11), the warning returns when the target’s collection helper next starts. Troubleshooting lists the message. The legacy mysql-connector-java-*.jar name (Connector/J 5.1 and 8.0) is not picked up: the plug-in looks for mysql-connector-j-*.jar.

Where it goes. The directory is <agentStateDir>/ip_plugin/xmys/lib/, where <agentStateDir> is the agent’s instance directory. emctl status agent prints it as Agent Home (the line above it, Agent Binaries, is a different directory):

$ /u01/app/em/agent/agent_24.1.0.0.0/bin/emctl status agent | grep 'Agent Home'
Agent Home : /u01/app/em/agent/agent_inst

With that value the driver directory is /u01/app/em/agent/agent_inst/ip_plugin/xmys/lib/. On Enterprise Manager 13.5 the instance directory usually sits under the agent home, for example /u01/app/em/agent/agent_13.5.0.0.0/agent_inst. The directory survives plug-in upgrades and undeploys; the plug-in never writes files into it, though a collection creates the empty directory if it is missing. Keep exactly one mysql-connector-j-*.jar in it.

Steps, on every agent host, as the agent’s operating-system user:

  1. Download mysql-connector-j-8.4.0.jar and check it. The plain jar is on Maven Central at https://repo1.maven.org/maven2/com/mysql/mysql-connector-j/8.4.0/mysql-connector-j-8.4.0.jar; its SHA-256 is:

    d77962877d010777cff997015da90ee689f0f4bb76848340e1488f2b83332af5 mysql-connector-j-8.4.0.jar

    The same jar is inside the Platform Independent archive on dev.mysql.com/downloads/connector/j (version 8.4.0 is under Archives). The checksum shown on that page is for the archive, not the jar; the value above is the jar’s.

  2. Create the directory and copy the jar into it, readable by the agent user:

    AGENT_HOME=$(emctl status agent | awk -F': *' '/Agent Home/ {print $2}')
    install -d -m 0755 "$AGENT_HOME/ip_plugin/xmys/lib"
    install -m 0644 mysql-connector-j-8.4.0.jar "$AGENT_HOME/ip_plugin/xmys/lib/"
    shasum -a 256 "$AGENT_HOME/ip_plugin/xmys/lib/mysql-connector-j-8.4.0.jar"
  3. Deploy the plug-in to the agent (3.3). If the plug-in is already deployed there, nothing needs restarting: the next collection uses the jar.

Permissions. The jar must be readable by the agent’s operating-system user, which runs every collection, and by the operating-system user of the target’s Host Preferred Credential, which runs Run EXPLAIN (8.1). They are usually the same user; mode 0644 in a 0755 directory covers both either way.

Upgrading the driver. Replace the jar with the new one, keeping exactly one in the directory. The next collection uses it; the plug-in does not need redeploying.

Licensing, for the record. Integration Plumbers does not redistribute MySQL Connector/J and has not sought a redistribution license from Oracle: you obtain the driver from Oracle under the license that applies to you, the GPL version 2 with the Universal FOSS Exception or a MySQL commercial license, and it never appears in the plug-in’s own third-party notices. The components that do ship inside the plug-in, and their licenses, are listed in THIRD-PARTY-NOTICES.txt, generated from the build’s software bill of materials and deployed next to the plug-in’s program in the agent’s plug-in scripts directory; the SBOM itself is delivered beside the plug-in archive.

When it is missing or wrong. Every collection of every MySQL target on that agent, and every Run EXPLAIN job, stops with one message that names the directory; the target does not report a MySQL problem. The messages and what to do about each are on the Troubleshooting page, under Install and deploy; the one you will see first is:

MySQL Connector/J not found: no mysql-connector-j-*.jar in /u01/app/em/agent/agent_inst/ip_plugin/xmys/lib; files present: none. Place exactly one Connector/J jar there.

A MySQL Router target reads the Router’s REST API. The Router has to serve that API, accept a REST user that you give the plug-in, and be reachable from the agent host on its REST port. This section covers those three prerequisites and the TLS choices for the REST connection. The target does not log in to MySQL, so it uses neither the monitoring account (2.4) nor MySQL Connector/J (2.9).

Which Routers. MySQL Router 8.4 LTS and 9.x (1.3). Both serve the same REST API version, 20190715. MySQL Router 8.0 is not offered.

Router version and server version. A MySQL Router supports MySQL Server versions equal to or below its own version, and does not support a server of a newer release series (the first two numbers of the version, for example 8.4 or 9.5). Keep every Router at the release series of the servers it routes to, or a newer one. A ClusterSet target checks this for you: its Monitoring Readiness page (5.3) reads the version of every Router registered in the ClusterSet metadata and marks a Router of an older release series than the server as Attention. The check reads the metadata over the ClusterSet target’s own connection, so it covers Routers that have no MySQL Router target.

Enable the REST API. A bootstrapped Router already serves it: bootstrap writes the REST configuration unless it ran with --disable-rest, and --https-port sets the port, which is 8443 by default. The generated configuration has an [http_server] section with ssl=1 and the REST plug-in sections [rest_api], [rest_router], [rest_routing] and [rest_metadata_cache]. The plug-in connects over HTTPS only; plain HTTP is not offered. A Router that was configured by hand needs the same sections, which the MySQL Router REST API setup documentation describes.

To check from the agent host that the Router serves the API, request its endpoint list. This request needs no user:

Terminal window
curl -k https://router01.example.com:8443/api/20190715/swagger.json

A JSON document that lists the Router’s endpoints means the REST port is reachable and the API is on. The -k option skips certificate verification, which is also what the default TLS Mode does (see below). If the request fails, the port is closed, blocked, or not served by that Router. The Router’s Monitoring Readiness page (5.4) later lists which REST plug-ins the Router has enabled.

Create a REST user. The plug-in sends the user name and password as HTTP basic authentication, so create the user in whichever authentication backend the Router’s REST realm uses. Create a dedicated user for the plug-in on each Router, one that nothing else uses. The plug-in only reads from the Router, and a dedicated user can be changed or removed without affecting any other client of the REST API.

A bootstrap sets the backend to metadata_cache, and the cluster metadata holds no REST account until one is added. A newly bootstrapped Router therefore serves the REST API and accepts no user until you take one of the two paths below. The Router certification (1.3) used the file backend.

  • File backend. The Router’s [http_auth_backend:default_auth_backend] section names a password file:

    [http_auth_backend:default_auth_backend]
    backend=file
    filename=/var/lib/mysqlrouter/rest_users

    On a bootstrapped Router, replace the line backend=metadata_cache in that section with these two lines. Then add the user to the file with mysqlrouter_passwd, on the Router host:

    Terminal window
    sudo mysqlrouter_passwd set /var/lib/mysqlrouter/rest_users router_monitor
    sudo chown mysqlrouter:mysqlrouter /var/lib/mysqlrouter/rest_users

    The command prompts for the password. It creates the file with mode 0600 if the file does not exist, owned by the user who ran the command, so the second line gives the file to the operating-system user the Router runs as. Restart the Router after you change its configuration file.

  • metadata_cache backend. The REST accounts are rows of the table router_rest_accounts in the cluster metadata schema mysql_innodb_cluster_metadata, which the Router reads through the view v2_router_rest_accounts. Every Router bootstrapped against that cluster shares them. The plug-in sends the same user name and password whichever backend the Router uses.

Enter the same user name and password on the target (4.1). A Router that refuses them shows a failed REST user accepted check on the target’s Monitoring Readiness page (5.4).

Network path. Open TCP from the agent host to the Router host on the REST port (2.3). The agent can run anywhere that has this path. The REST call always connects directly: it ignores JVM proxy settings such as https.proxyHost, socksProxyHost or java.net.useSystemProxies, so an HTTPS or SOCKS proxy configured on the agent host cannot stand in for this path. The Router host does not need an agent, which suits Routers that run on application hosts. The Router’s client ports are not used by a MySQL Router target.

TLS to the REST port. The REST TLS Mode (ip_mysql_router_rest_tls) chooses how the agent treats the Router’s certificate. Every mode encrypts the connection.

ValueBehavior
(empty)Same as required.
requiredThe connection is encrypted and the Router’s certificate is not verified. This is the default, and the mode that works on a new target without further steps, because the certificate a bootstrap generates is self-signed and no truststore trusts it.
verify_caThe Router’s certificate must be signed by a certificate in the REST CA Certificate File. The host name is not checked.
verify_identityAs verify_ca, and the host name or address in Router Host must also match the Router’s certificate.

A value that is not one of these, and a verify_ca or verify_identity target with no usable CA file, is reported as a configuration error on the collection. It does not turn the target Down. A Down Router target means the REST port did not answer or the TLS handshake failed; a refused user or password is a collection error, not Down. In verify_ca and verify_identity a certificate that fails verification is a failed handshake, so a CA file that does not match the Router, or a certificate past its expiry date, turns the target Down.

What required gives up is proof of the Router’s identity: a party on the network path between the agent and the Router could present its own certificate and capture the REST password. The target’s Monitoring Readiness page says the certificate is not being verified while the mode is required. The dedicated read-only REST user above limits what a captured password is worth. For production, switch to verify_ca:

  1. On the Router host, copy the CA certificate, as root. The file is ca.pem in the Router’s data directory, /var/lib/mysqlrouter on a package installation, beside the Router’s own certificate. It is owned by the Router’s operating-system user with mode 0600, in a directory with mode 0700, so reading it needs root:

    Terminal window
    sudo cat /var/lib/mysqlrouter/ca.pem > /tmp/router01-ca.pem

    Copy ca.pem only. The private keys beside it, ca-key.pem and router-key.pem, must never leave the Router host, and the agent does not need them.

  2. Move the copy to the agent host, to an absolute path that the agent’s operating-system user can read, for example /etc/ssl/router01-ca.pem with mode 0644. Check that it is the Router’s CA:

    Terminal window
    openssl x509 -in /etc/ssl/router01-ca.pem -noout -subject -enddate

    For a bootstrap CA the subject reads MySQL_Router_Auto_Generated_CA_Certificate, and notAfter is one year after the bootstrap.

  3. Set the target’s REST TLS Mode to verify_ca and its REST CA Certificate File to that path, under Target Setup → Monitoring Configuration (4.5) or with EM CLI:

    Terminal window
    emcli modify_target -name="orders-router-1" -type="ip_mysql_router" \
    -properties="ip_mysql_router_rest_tls:verify_ca;ip_mysql_router_rest_ca:/etc/ssl/router01-ca.pem" -on_agent
  4. Open the target’s Monitoring Readiness page (5.4). The TLS check is satisfied, and the REST CA certificate expiry line shows the expiry date read from the file.

Three facts about the CA file matter once more than one Router is involved:

  • Each Router has its own CA. Every bootstrap generates a new CA, and every one of them has the same subject name. A CA file verifies only the Router it came from; against another Router it fails the signature check.
  • The file may be a bundle. It can hold several certificates in PEM format, so append each Router’s ca.pem to one file and name that file on every Router target that agent monitors. A bundle of the CAs of two Routers verified both.
  • The CA and the Router certificate expire together, one year after the bootstrap. Monitoring Readiness shows the date, and warns 30 days before it. Renew before that date: after it, the Router’s certificate no longer verifies, and a target in verify_ca or verify_identity reads Down.

verify_identity cannot pass with a bootstrap certificate. The certificate has no subject alternative name, so a connection by IP address fails with No subject alternative names present, and its subject is the fixed name MySQL_Router_Auto_Generated_Router_Certificate, so no host name ever matches it. Use verify_identity only on a Router where you installed your own certificate with a subject alternative name for the address you enter in Router Host, and give the REST CA Certificate File the CA that signed it.

Note: The plug-in does not use the agent’s Java truststore for the REST connection. required verifies nothing, and the verify modes trust only the CA file, so replacing the agent’s Java runtime does not affect Router targets.

2.11 Batch collection: one Java process per target (optional)

Section titled “2.11 Batch collection: one Java process per target (optional)”

By default every collection starts its own short-lived Java process (2.8). With batch collection on, the first collection for a target starts a collection helper: one Java process that serves the target’s later collections, one at a time, over one MySQL connection. It exits after a quiet period, and the next collection starts a new one.

It is off by default. Until you turn it on, the plug-in starts one Java process per collection exactly as before.

Turning it on. Add the lines below to collection-throttle.conf in <agentStateDir>/ip_plugin/xmys/, the directory above the Connector/J directory from 2.9. Create the file if it does not exist. The Db2 plug-in reads the same file name and keys in its own directory.

[*] # every MySQL target on this agent
batch_collection = on
batch_max_helpers = 60 # about 2.5 times the targets on this agent; see below
[mysql-prod-01] # one target only; overrides [*]
batch_collection = off

A section name is the target’s name as Enterprise Manager shows it.

KeyDefaultMeaning
batch_collectionoffon turns batch collection on for the section
batch_idle_seconds120the helper exits after this many seconds with no collection (10–900)
batch_max_lifetime1800and after this many seconds in any case (60–7200)
batch_max_helpers25helpers running at once on this agent. Beyond this, a target collects as before (1–500)
batch_connectionsharedper_query opens a new MySQL connection for each query, as without batching

A value out of range uses the default. A change applies from the next collection. A running helper keeps its own idle time and lifetime. You do not need to restart the agent.

Sizing batch_max_helpers. A target can need two helpers: one for its availability check, and some replication groups on a database target, and one for its other groups. That is because those collections receive a slightly different set of credential fields. Set batch_max_helpers to about 2.5 times the number of MySQL targets on the agent. With fewer helpers than that, the targets without one collect as before, and part of the saving is lost (the table below).

What it changes. Measured on a lab host (8 vCPU, a 13.5 agent) on 2026-11-10: the collection schedules of 24 MySQL InnoDB Cluster and ClusterSet targets were replayed through the plug-in’s own launcher. Each collection’s connection was refused, so the figures count Java process starts and their cost, not query work.

OffOn, batch_max_helpers 25 (default)On, batch_max_helpers 60
Collections per minute44.144.143.8
Java process starts per minute44.122.36.8
Agent CPU for collection, cores1.130.850.54
CPU per collection1.5 s1.2 s0.7 s
Collections that ran in their own processall41 % (cap reached)none

With enough helpers, Java process starts fell by 85 percent and collection CPU by about half. With the default cap, these 24 targets (48 helpers) got only part of that. With a live database, each helper also reuses one connection instead of logging in for every query, which saves more than these figures show.

What it costs. Memory. A helper is a resident Java process of about 85 MB, for as long as its target collects more often than batch_idle_seconds. Every MySQL target does: the availability check runs every minute. Plan agent memory for batch_max_helpers of them: about 2.1 GB at the default of 25. Each helper also holds one MySQL session open on its target between collections.

The 85 MB was measured on 2026-11-27 on a 24ai agent host with 47 GB of memory, with one helper serving a MySQL 8.0 Database target at the default collection schedules: 74 MB three minutes after the helper started, 80 MB at 11 minutes and 84 MB at 24 minutes, with no further growth in the Java heap. The helper starts with a 32 MB heap that can grow to 512 MB, so its size does not depend on how much memory the agent host has. A target whose collections return unusually large results can grow its helper beyond this figure.

Sessions held on the monitored server. A helper keeps one MySQL session open between collections, until the helper exits. A target with two helpers (see Sizing batch_max_helpers above) therefore has two held sessions from each agent that monitors it. The availability check does not use the held session: it logs in afresh every time, and that login is one more session for a moment.

  • The held sessions count against the server’s max_connections and against the monitoring user’s MAX_USER_CONNECTIONS.
  • They appear in the processlist with the command Sleep, and they are part of the connection counts the plug-in itself reports for the target (ConnectionActivity, ThreadsActivity).
  • On a server whose wait_timeout is shorter than the interval between collections, the server closes the idle session, the helper logs in again at the next collection, and Aborted_clients rises by one each time.

Check the monitoring user’s limit before you turn batching on. If MAX_USER_CONNECTIONS is small enough that the held sessions use all of it, the availability check’s own login is refused and the target shows Down. Allow the held sessions plus the logins of the availability check and of the collections that run in their own process (License and Run EXPLAIN).

What stays the same.

  • Credentials still reach the collector only on its standard input, from the collection that starts the helper. They are never written to a file.
  • A helper serves one target with one set of credentials. A collection whose credentials differ, such as during a password change, gets its own helper.
  • The availability check (Response) logs in afresh every time, so a changed password or a locked account still shows as before.
  • License and the Run EXPLAIN job always run in their own process.

When anything goes wrong, collection carries on. If a helper is busy for 20 seconds, or stops, each waiting collection runs in its own process, as it would without batching. A collection already being served when its helper stops reports batch collection timed out after 240 seconds. A console page that asks for a metric group’s current values is served the same way, so it can wait up to 20 seconds while the target’s helper finishes a slow collection. To go back, delete the line or set it to off.

Files. The helper’s files are under <agentStateDir>/ip_plugin/xmys/batch/, readable only by the agent user. They are a per-agent random key, and one directory per target and credential set. Each such directory holds queued requests, replies, a heartbeat and the helper’s console log. A request carries the collection’s arguments and the target’s non-secret properties, and is deleted once answered.

fallback.log in the batch/ directory has one line for each collection that should have been batched but ran in its own process, or timed out waiting for its helper. Each line gives the time, the metric group and the reason. Past 64 KB it is renamed fallback.log.1 and a new one starts. Start there if an agent with batching on still starts many Java processes. batch_max_helpers reached there means the cap is too low.

Linux and Unix agents only. Batch collection applies to agents on Linux and Unix. On a Windows agent the setting is ignored, and every collection starts its own Java process as before.