This chapter describes the utilities delivered with MySQL Enterprise Service Manager and MySQL Enterprise Monitor Agent.
The parameters listed here, with the exception of the four repository connection parameters, correspond to those displayed on the Welcome to MySQL Enterprise Monitor page used for initial setup. For more information, see Section 13.1, “Initial Log-In”.
These parameters enable you to configure MySQL Enterprise Service Manager from script or command line.
The config.sh /
config.bat script is used to configure the
MySQL Server Repository for the Service Monitor. Its default
location:
Table 10.1 MEM Repository Configuration Tool Location (default)
| Operating System | Path |
|---|---|
| Microsoft Windows | C:\Program
Files\MySQL\Enterprise\Monitor\bin\config.bat |
| Linux / Solaris | /opt/mysql/enterprise/monitor/bin/config.sh |
| Mac OS X | /Applications/mysql/enterprise/monitor/bin/config.sh |
Use --help to view the options.
The Service Manager config utility contains the following sets of commands:
Service Manager Configuration Utilities: define or change the configuration of the MySQL Enterprise Service Manager.
Certificate Utilities: modify or upgrade the MySQL Enterprise Service Manager SSL certificates.
The config script enables you to define or
change any of the system configuration parameters such as
credentials used to connect to the repository, proxy connection
details, and MySQL Enterprise Service Manager user credentials.
Table 10.2 Service Manager Config Utilities
| Name | Description |
|---|---|
|
MySQL username for the Service Manager repository. The
password is requested via STDIN when the command is
run. The default value is
|
|
MySQL port for the Service Manager repository. The port the target MySQL server listens on. The default is 13306. |
|
MySQL database for the Service Manager repository. The
name of the database used for the repository. The
default is |
|
MySQL server for the Service Manager repository. This must be a resolvable name or IP address of the server where the MySQL instance is running. |
|
Service Manager manager username. The user defined here is added to the manager role. |
|
Service Manager agent username. The user defined here is added to the agent role. |
|
Enable automatic checking for online updates. |
|
Defines the Query Analyzer data retention policy. Query Analyzer data older than the number of days defined here is deleted. Default is 28 days. |
|
Defines the historical data retention policy. Historical data older than the number of days defined here is deleted. Default is 28 days. |
|
HTTP Proxy host |
|
HTTP Proxy port |
|
HTTP Proxy username |
Passwords are always requested via STDIN and are requested in the order manager, agent, and proxy, regardless of the order in which they are defined on the command line or in script.
The following example instructs the MySQL Enterprise Service Manager to use a
locally installed instance, listening on port 3306, the
mem database, and connect using the user
service_manager.:
config.sh --mysql-server=localhost --mysql-port=3306 --mysql-db=mem
--mysql-user=service_manager
The following is an example of a basic setup, defining the admin and agent users, only. :
config.sh --sm-admin-user=admin --sm-agent-user=agent
All other parameters are set to their default values.
You are prompted to define passwords for each of the users defined. Passwords are only accepted through STDIN.
Passwords are always requested in the order manager, agent, proxy, regardless of the order defined on the command line or in the script.
All other values are set to their defaults.
The following is an example of a complete setup, defining all available options:
config.sh --sm-admin-user=admin --sm-agent-user=agent --purge-quan=7
--purge-data=14 --proxy-host=localhost --proxy-port=9190
--proxy-user=proxy --auto-update
This section describes the SSL certificate utilities.
Table 10.3 Service Manager Certificate Utilities
| Name | Description |
|---|---|
|
Tomcat backup path to be used to perform upgrade |
|
Upgrades certificates on an existing non OS X installation |
|
Upgrades certificates on an existing non OS X installation |
|
Generates a keystore with a fresh self-signed certificate for a new installation |
|
If specified, the user will be asked the keystore password, otherwise the password "changeit" will be used to access the keystore |
The agent.sh/agent.bat
script is used to configure an Agent. Its location:
Table 10.4 MEM Agent Configuration Tool Location (default)
| Operating System | Path |
|---|---|
| Microsoft Windows | C:\Program
Files\MySQL\Enterprise\Agent\bin\agent.bat |
| Linux / Solaris | /opt/mysql/enterprise/agent/bin/agent.sh |
| Mac OS X | /Applications/mysql/enterprise/agent/bin/agent.sh |
Use --help to view its options.
This section describes the utilities available for agent connections and testing.
Table 10.5 Agent Connection Utility
| Name | Description |
|---|---|
|
Test MySQL connection credentials. |
|
Test admin user's privileges to manage other users. |
|
Create or Modify a MySQL connection. |
|
Close and Delete a MySQL connection (must also specify --connection-id) |
|
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 |
|
MEM Group to use for created/modified connection |
|
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"
This section describes the utilities available for agent configuration.
Table 10.6 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, such as calls from 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 the MySQL Enterprise Service Manager:
agent.sh --agent-user=agent --url=https://localhost:8443