Chapter 10 Configuration Utilities

Table of Contents

10.1 Service Manager Configuration Utilities
10.2 Agent Configuration Utility

This chapter describes the utilities delivered with MySQL Enterprise Service Manager and MySQL Enterprise Monitor Agent.

10.1 Service Manager Configuration Utilities

Note

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 SystemPath
Microsoft WindowsC:\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.

Service Manager Configuration Utilities

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-user=<value>

--mu=<value>

MySQL username for the Service Manager repository. The password is requested via STDIN when the command is run. The default value is service_manager.

--mysql-port=<value>

--mp=<value>

MySQL port for the Service Manager repository. The port the target MySQL server listens on. The default is 13306.

--mysql-db=<value>

--md=<value>

MySQL database for the Service Manager repository. The name of the database used for the repository. The default is mem.

--mysql-server=<value>

--ms=<value>

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.

--sm-admin-user=<value>

Service Manager manager username. The user defined here is added to the manager role.

--sm-agent-user=<value>

Service Manager agent username. The user defined here is added to the agent role.

--auto-update

Enable automatic checking for online updates.

--purge-quan=<value>

Defines the Query Analyzer data retention policy. Query Analyzer data older than the number of days defined here is deleted. Default is 28 days.

--purge-data=<value>

Defines the historical data retention policy. Historical data older than the number of days defined here is deleted. Default is 28 days.

--proxy-host=<value>

HTTP Proxy host

--proxy-port=<value>

HTTP Proxy port

--proxy-user=<value

HTTP Proxy username


Important

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.

Important

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

Service Manager Certificate Utilities

This section describes the SSL certificate utilities.

Table 10.3 Service Manager Certificate Utilities

Name Description

--tomcat-backup-path=<value>

--tbp=<value>

Tomcat backup path to be used to perform upgrade

--upgrade

--upg

Upgrades certificates on an existing non OS X installation

--upgrade-osx

--upgo

Upgrades certificates on an existing non OS X installation

--new-install

--ni

Generates a keystore with a fresh self-signed certificate for a new installation

--accept-keystore-password

--akp

If specified, the user will be asked the keystore password, otherwise the password "changeit" will be used to access the keystore


10.2 Agent Configuration Utility

The agent.sh/agent.bat script is used to configure an Agent. Its location:

Table 10.4 MEM Agent Configuration Tool Location (default)

Operating SystemPath
Microsoft WindowsC:\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.

Agent Connection Utilities

This section describes the utilities available for agent connections and testing.

Table 10.5 Agent Connection Utility

Name Description

--test-credentials

-T

Test MySQL connection credentials.

--test-privileges

Test admin user's privileges to manage other users.

--create-connection

-c

Create or Modify a MySQL connection.

--delete-connection

-d

Close and Delete a MySQL connection (must also specify --connection-id)

--show

-s

Show information about all MySQL connections on this agent

--auto-manage-extra-users

-m

Auto-create general / limited users (Actions: Create, Modify)

--host=<value>

-h <value>

Host for the MySQL instance (Actions: Create, Modify)

--port=<value>

-P <value>

Port for the MySQL instance (Actions: Create, Modify)

--socket=<value>

-S <value>

Socket for the MySQL instance (Actions: Create, Modify)

--limited-user=<value>

-l <value>

Limited level credentials (Actions: Create, Modify)

--general-user=<value>

-k <value>

General user credentials

--admin-user=<value>

-j <value>

Admin user credentials

--connection-id=<value>

-i <value>

Connection ID

--connection-group=<value>

-g <value>

MEM Group to use for created/modified connection

--force-plain-stdin,

-f

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-topology-discovery

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.

--mysql-identity-source=<value>

Source of identity for the MySQL instance for this connection, default or host_plus_datadir. default uses either the server_uuid variable, if present, or generates a new uuid. host_and_datadir uses a hash of the host identity and the path to the MySQL instance's data directory to create a unique identity.

--require-encryption

Require the use of TLS for the MySQL connection.

--allow-self-signed-certs

When using --require-encryption, allow self-signed TLS certificates.

--ca-file-path=<value>

When using --require-encryption, but using a private certificate authority, the path to the CA file.


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"

Agent Configuration Utilities

This section describes the utilities available for agent configuration.

Table 10.6 Agent Configuration Utility

Name Description

--agent-user=<value>

-u <value>

Set the credentials that the Agent uses to connect to the Service Manager

--url=<value>

-U <value>

Set the URL for the Service Manager

--uuid=<value>

-I <value>

Set the Agent UUID

--agent-group=<value>

-G <value>

Set the MEM Group to use for all MySQL connections from this Agent

--force-plain-stdin

-f

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)

--run-collection-tests

-t

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