The agent.sh
/agent.bat
script is used to configure an Agent. The following table lists
the default locations for each supported operating system:
These parameters enable you to configure MySQL Enterprise Monitor Agent from script or command line and should only be run while the MySQL Enterprise Monitor Agent is stopped.
Table 11.4 Default Location of Agent Configuration Utility
Operating System | File Location |
---|---|
Microsoft Windows |
|
UNIX/Linux |
|
macOS |
|
Use --help
to view its options.
The Service Manager configuration utility contains the following sets of commands:
Agent Connection Utilities: test or edit the connections of MySQL Enterprise Monitor Agent to the monitored MySQL instance.
Agent Configuration Utilities: configure or edit the connection from MySQL Enterprise Monitor Agent to MySQL Enterprise Service Manager.
It is not possible to run agent.sh
from the
command line as root
, but only as
mysql
.
The following parameters enable you to create, test, and edit the connections from MySQL Enterprise Monitor Agent to the monitored MySQL instance.
Table 11.5 Agent Connection Utility
Name | Description |
---|---|
|
Test the MySQL connection credentials. |
|
Test the admin user's privileges to manage other users. |
|
Create or modify a MySQL connection. |
|
Closes and deletes a MySQL connection. This parameter
requires |
|
Show information about all MySQL connections on this agent |
|
Auto-create general / limited users (Actions: Create, Modify) |
|
Host for the MySQL instance (Actions: Create, Modify) |
|
Port for the MySQL instance (Actions: Create, Modify) |
|
Socket for the MySQL instance (Actions: Create, Modify) |
|
Limited level credentials (Actions: Create, Modify) |
|
General user credentials |
|
Admin user credentials |
|
Connection ID |
|
Specify the name of the group to add this connection to.
If the named group does not exist, it is created and the
connection added to it. This parameter can be used
multiple times in the
|
|
Force the use of STDIN for password inputs (password input is not masked - this option is useful only for very specific uses of these utilities, like calls from within automated scripts) |
|
Disable replication topology discovery. Use this parameter if you are not using replication, or if you want to discover the topology at a later time. Topology discovery can be time-consuming. |
|
Source of identity for the MySQL instance for this
connection, |
|
Require the use of TLS for the MySQL connection. |
|
When using --require-encryption, allow self-signed TLS certificates. |
|
When using |
The following example tests credentials for the root user on
localhost:3306
:
agent.bat --test-credentials --admin-user=root --host=localhost --port=3306
The following example creates a connection using only the admin user for localhost:3306:
agent.bat -c --admin-user=root --host=localhost --port=3306
The following example creates a connection, using only the admin user, to localhost:3306, and forces STDIN password:
agent.bat -c --admin-user=root --host=localhost --port=3306 -f
The following example creates a connection, using only the admin user, to localhost:3306, and add to the groups Standard, Special, and Third:
agent.bat -c --admin-user=root --host=localhost --port=3306
--connection-group=Standard --connection-group="Special Group"
--connection-group="Third Group"
The following parameters enable you to configure or edit the connection from MySQL Enterprise Monitor Agent to MySQL Enterprise Service Manager.
Table 11.6 MySQL Enterprise Monitor Agent Configuration Utility
Name | Description |
---|---|
|
Set the credentials that the Agent uses to connect to the Service Manager |
|
Set the URL for the Service Manager |
|
Set the Agent UUID |
|
Set the MEM Group to use for all MySQL connections from this Agent |
|
Force the use of STDIN password inputs (password input is not masked - this option is useful only for very specific uses of these utilities, like calls from within automated scripts) |
|
Discover, and attempt to collect OS related assets and dump them to STDOUT (for debugging) |
The following example sets the user name and URL used by the agent to connect to MySQL Enterprise Service Manager:
agent.sh --agent-user=agent --url=https://localhost:8443