Documentation Home
MySQL Enterprise Monitor 8.0 Manual
Related Documentation Download this Manual
PDF (US Ltr) - 6.0Mb
PDF (A4) - 6.0Mb


11.2 Agent Configuration Utility

The agent.sh/agent.bat script is used to configure an Agent. The following table lists the default locations for each supported operating system:

Important

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

C:\Program Files\MySQL\Enterprise\Agent\bin\agent.bat

UNIX/Linux

/opt/mysql/enterprise/agent/bin/agent.sh

macOS

/Applications/mysql/enterprise/agent/bin/agent.sh


Use --help to view its options.

The Service Manager configuration utility contains the following sets of commands:

Important

It is not possible to run agent.sh from the command line as root, but only as mysql.

Agent Connection Utilities

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-credentials

-T

Test the MySQL connection credentials.

--test-privileges

Test the admin user's privileges to manage other users.

--create-connection

-c

Create or modify a MySQL connection.

--delete-connection

-d

Closes and deletes a MySQL connection. This parameter requires --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>

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 --create-connection command. The connection is added to each group named.

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

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

--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, like calls from within 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 MySQL Enterprise Service Manager:

agent.sh --agent-user=agent --url=https://localhost:8443