Table of Contents
The parameters for the Tomcat hosting system used to support MySQL Enterprise Service Manager and MySQL Enterprise Dashboard can have an affect on the performance of the system.
The default settings for Java for Tomcat are as follows:
Description | Parameter | Default Value |
---|---|---|
Initial heap size | -Xms | 768MB |
Maximum heap size | -Xmx | 768MB |
Java stack size | -Xss | 128MB |
You can change these parameters to higher values, by editing the
JAVA_OPTS
setting within the corresponding
platform script.
On Unix/Linux and Mac OS X
Edit the values within
apache-tomcat/bin/setenv.sh
file within
your MySQL Enterprise Service Manager directory. You should avoid setting
maximum figures higher than the physical memory of your system
as this may reduce, rather than increase the performace.
If you change these parameters, you should shutdown and restart MySQL Enterprise Service Manager for the changes to take effect.
Windows
Edit the JAVA_OPTS
settings within the
apache-tomcat/bin/setenv.bat
file.
To enable the changes, you must re-install your service. To do this, shutdown your MySQL Enterprise Service Manager service and then reinstall the service by running:
shell> mysqlmonitorctl.bat uninstall shell> mysqlmonitorctl.bat install
On all platforms, changes to the JAVA_OPTS
using the above methods should be retained over an upgrade of the
MySQL Enterprise Service Manager service.
If you are running the MySQL repository and the Tomcat service on the same machine, you should keep take the memory allocated to MySQL into consideration when setting these values.
The SSL certificate that is provided with the server during installation is a sample certificate only. If you want to use SSL for communicating with your MySQL Enterprise Service Manager and MySQL Enterprise Dashboard you should replace the supplied certificate with your own certificate.
The certificate keystore is located in the
apache-tomcat/conf/myKeystore
file within
your MySQL Enterprise Service Manager installation.
To create a new, self-signed, certificate, use the keytool command (provided with Java SE Security) to create a new certificate file:
shell> keytool -genkey -alias tomcat -keyalg RSA -validity 1825 -keystore newKeystore
You will be prompted to fill in the certificate information and to provide a unique password for the certificate.
The -validity
specifies the length of the
certificate created, specified in days. The
-alias
is required to ensure that the
certificate is associated with tomcat
.
Once you have created the new keystore, you should shutdown
MySQL Enterprise Service Manager, copy the new keystore file to
apache-tomcat/conf/myKeystore
and restart
MySQL Enterprise Service Manager.
If you have an existing certificate that you would like to import into your keystore, you need to import the certificate using the following command:
shell> keytool -import -alias tomcat -keystore newKeystore -file public.pem
For more information on using SSL certificates in Tomcat see Apache Tomcat 6.0: SSL Configuration HOW-TO.
This section shows the location of the log and configuration files associated with the various components that make up the MySQL Enterprise Service Manager. These files can prove useful for debugging purposes.
All log files except catalina.out
are rotated
to ensure they do not grow beyond 10MB in size.
Table C.1. MySQL Enterprise Monitor: Log File Locations: Windows
Component | File Location |
---|---|
Apache/Tomcat | C:\Program Files\MySQL\Enterprise\Monitor\apache-tomcat\logs\catalina.out |
Repository | C:\Program Files\MySQL\Enterprise\Monitor\mysql\data |
Configuration Report | C:\Program Files\MySQL\Enterprise\Monitor\configuration_report.txt |
Service Manager | C:\Program Files\MySQL\Enterprise\Monitor\apache-tomcat\logs\mysql-monitor.log |
Table C.2. MySQL Enterprise Monitor: Log File Locations: Unix
Component | File Location |
---|---|
Apache/Tomcat | /opt/mysql/enterprise/monitor/apache-tomcat/logs/catalina.out |
Repository | /opt/mysql/enterprise/monitor/mysql/data |
Configuration Report | /opt/mysql/enterprise/monitor/configuration_report.txt |
Service Manager | /opt/mysql/enterprise/monitor/apache-tomcat/logs/mysql-monitor.log |
Table C.3. MySQL Enterprise Monitor: Log File Locations: Mac OS X
Component | File Location |
---|---|
Apache/Tomcat | /Applications/mysql/enterprise/monitor/apache-tomcat/logs/catalina.out |
Repository | /Applications/mysql/enterprise/monitor/mysql/data |
Configuration Report | /Applications/mysql/enterprise/monitor/configuration_report.txt |
Service Manager | /Applications/mysql/enterprise/monitor/apache-tomcat/logs/mysql-monitor.log |
All of these logs are viewable within MySQL Enterprise Dashboard. For more information, see Section 2.8.6, “Logs”.
The configuration_report.txt
file contains
the repository password in plain text. You may want to store
this file in a secure location.
On all operating systems, the Apache/Tomcat, and Repository directories contain both access and error files.
A MIB file is a requirement for using SNMP traps. A table showing the location of this file follows.
The repository user name and password are stored in in the
config.properties
file. A table showing the
location of this file follows:
Table C.5. MySQL Enterprise Monitor: The config.properties
File
Operating System | File Location |
---|---|
Windows | C:\Program Files\MySQL\Enterprise\Monitor\apache-tomcat\webapps\ROOT\WEB-INF |
Unix | /opt/mysql/enterprise/monitor/apache-tomcat/webapps/ROOT/WEB-INF |
Mac OS X | /Applications/mysql/enterprise/monitor/apache-tomcat/webapps/ROOT/WEB-INF |
You should make sure that the file is secured at the file system level so that it cannot be read by anybody but the administrator or Enterprise monitor.
The MySQL Enterprise Agent is responsible for providing all of the information from a monitor MySQL server to MySQL Enterprise Service Manager. In addition, the MySQL Enterprise Agent may provide MySQL Enterprise Agent Proxy Service functionality for providing query analyzer data.
The MySQL Enterprise Agent is configured through files located within the
etc
directory within agent installation
directory.
Configuration is stored in multiple files, according to a
predetermined file and directory layout. The primary configuration
file contains specific information about the agent and how the agent
communicates with MySQL Enterprise Service Manager. The main configuration is located
within the mysql-monitor-agent.ini
file.
Additional configuration files contain information about the MySQL
server that is being monitored. You can configure which directory is
used for storing this information within the
mysql-monitor-agent.ini
file. The default
location is the etc/instances
directory within
the MySQL Enterprise Agent directory.
The server you want to monitor should have a directory within the
specified location, optionally using the name of the server you are
monitoring, and within that directory, an
agent-instance.ini
file. This file contains the
configuration information for connecting to the MySQL server,
including the host name, port, user credentials and display name.
You can see an example of the file layout of the
etc
directory:
. ./init.d ./init.d/mysql-monitor-agent ./instances ./instances/agent ./instances/agent/agent-instance.ini ./mysql-monitor-agent.ini
For more information on the configuration of the
mysql-monitor-agent.ini
file, see
Section C.2.1, “MySQL Enterprise Agent Configurable Options”. For details
on the content of the individual MySQL instance configuration files,
see Section C.2.2, “MySQL Server (agent-instance.ini
) Configuration”.
The mysql-monitor-agent.ini
files contains
the base configuration information for the MySQL Enterprise Agent. The
file sets the core information about the supported functionality
for the entire agent.
You can see a sample of the configuration file below:
# WARNING - The UUID defined below must be unique for each agent. # # To use this INI file as a template for configuring additional # agents, do not simply copy and start a new agent without first # modifying the UUID and adjusting other parameters as necessary. # # WARNING - If you are upgrading from a previous 1.x release, please # note that we have changed the contents of the agent INI file and # split the contents across two files: # # <installdir>/etc/mysql-monitor-agent.ini - this file # <installdir>/etc/instances/mysql/agent-instance.ini - new file # # Refer to the documentation for more detailed information and # instructions. # # Version: 2.2.0.1708 [mysql-proxy] # Common Parameters plugins=proxy,agent keepalive = true log-file = mysql-monitor-agent.log pid-file=/opt/mysql/enterprise/agent/mysql-monitor-agent.pid # Agent Parameters agent-mgmt-hostname = http://nautilus:18080/heartbeat agent-mgmt-username = agent agent-mgmt-password = Tamsin mysqld-instance-dir= etc/instances agent-item-files = share/mysql-monitor-agent/items/quan.lua,share/mysql-monitor-agent/items/items-mysql-monitor.xml,share/mysql-monitor- agent/items/custom.xml agent-uuid = 68b4892c-1310-4f07-8924-3a8b3c0e850b user = root # Proxy Parameters proxy-address=:6446 proxy-backend-addresses = 127.0.0.1:3306 proxy-lua-script = lib/mysql-monitor-agent/lua/quan.lua
Do not copy the agent configuration information from one machine
to another without changing the agent-uuid
.
Each agent instance must have a unique agent id.
The main configuration information must be located within the
[mysql-proxy]
section of the configuration
file. The main configurable parameters within this file are:
The MySQL Enterprise Agent supports the following configurable options:
Table C.6. mysql-monitor-agent Help Options
Format | Option File | Description | Introduction | Deprecated | Removed |
---|---|---|---|---|---|
--help | Show help options | ||||
--help-admin | Show options for the admin-module | ||||
--help-agent | Show agent options | ||||
--help-all | Show all help options | ||||
--help-monitor | Show monitor options | ||||
--help-proxy | Show options for the proxy-module |
Table C.7. mysql-monitor-agent Admin Options
Format | Option File | Description | Introduction | Deprecated | Removed |
---|---|---|---|---|---|
--admin-address | admin-address | Defines the listening address and port for the admin module | |||
--admin-lua-script | admin-lua-script | Script to execute by the admin module | |||
--admin-password | admin-password | Password for authentication for admin module | |||
--admin-username | admin-username | Username for authentication for admin module | |||
--proxy-address | proxy-address | Listening address:port of the proxy server |
Table C.8. mysql-monitor-agent Agent Options
Format | Option File | Description | Introduction | Deprecated | Removed |
---|---|---|---|---|---|
--agent-backlog-timeout | agent-backlog-timeout | Maximum time in seconds that the Set the second after the minute when the data is sent to the server | 2.2.0 | ||
--agent-collector-plugins | agent-collector-plugins | Load the specified collector plugins | |||
--agent-connect-timeout | agent-connect-timeout | The timeout for the agent to connect to the MySQL server | 2.2.2 | ||
--agent-DNS-cachetimeout | agent-DNS-cachetimeout | The timeout for cache operations | 2.2.0 | ||
--agent-force-uncorking | agent-force-uncorking | Forcibly turn off corking (randomization of data collection intervals) | |||
--agent-generate-uuid | agent-generate-uuid | Generate a UUID for use with the agent-uuid | |||
--agent-heartbeat-interval | agent-heartbeat-interval | The interval for generating heartbeat operations | |||
--agent-host-id | agent-host-id | The host ID for the agent | |||
--agent-host-id-commandline | agent-host-id-commandline | The command to use to generate the agent host id | |||
--agent-hostname | agent-hostname | Hostname of the agent host | |||
--agent-IP-version | agent-IP-version | IP version (4 or 6) to force | 2.2.0 | ||
--agent-item-files | agent-item-files | List of data items for additional collections | |||
--agent-master-uuid-discovery | agent-master-uuid-discovery | Disable the use of the master_uuid for topology discovery | 2.2.1 | ||
--agent-max-response-size | agent-max-response-size | Maximum response size for agent data | |||
--agent-mgmt-hostname | agent-mgmt-hostname | URL of the management server | |||
--agent-mgmt-password | agent-mgmt-password | Password for the management server | 2.2.0 | ||
--agent-mgmt-username | agent-mgmt-username | User name with the management server | 2.2.0 | ||
--agent-net-timeout | agent-net-timeout | The timeout for the agent for established connections to the MySQL server | 2.2.2 | ||
--agent-report-network-fs | agent-report-network-fs | Enable data collection for networked filesystems | 2.2.0 | ||
--agent-report-offset | agent-report-offset | Set the second after the minute when the data is sent to the server | 2.2.0 | ||
--agent-run-os-tests | agent-run-os-tests | Run the operating system tests and shutdown | |||
--agent-sync-attempts | agent-sync-attempts | Synchronize the attempts to connect at resync | |||
--agent-track-alloc | agent-track-alloc | Enable the tracking of the allocation sizes | |||
--agent-uuid | agent-uuid | UUID of this agent | |||
--mysqld-instance-dir | mysqld-instance-dir | Location of the MySQL instance configuration (mysql.cnf/mysql.ini) files | 2.2.0 |
Table C.9. mysql-monitor-agent Monitor Options
Format | Option File | Description | Introduction | Deprecated | Removed |
---|---|---|---|---|---|
--monitor-interval | monitor-interval | Interval for executing queries against the backend | |||
--monitor-lua-script | monitor-lua-script | Script filename for the monitor | |||
--monitor-password | monitor-password | Set the password for the monitored MySQL Server | |||
--monitor-username | monitor-username | Set the username for the monitored MySQL Server |
Table C.10. mysql-monitor-agent Proxy Options
Format | Option File | Description | Introduction | Deprecated | Removed |
---|---|---|---|---|---|
--no-proxy | no-proxy | Don't start the proxy module | |||
--proxy-backend-addresses | proxy-backend-addresses | Address:port of the remote MySQL server | |||
--proxy-fix-bug-25371 | proxy-fix-bug-25371 | Enable the fix for Bug#25371 (for mysqld > 2.0.0.12) for older libmysql versions | |||
--proxy-lua-script | proxy-lua-script | Filename for Lua script for proxy operations | |||
--proxy-pool-no-change-user | proxy-pool-no-change-user | Don't use the protocol CHANGE_USER to reset the connection when coming from the connection pool | |||
--proxy-read-only-backend-addresses | proxy-read-only-backend-addresses | Address:port of the remote MySQL server (read-only) | |||
--proxy-skip-profiling | proxy-skip-profiling | Disabled profiling of queries |
Table C.11. mysql-monitor-agent Application Options
Format | Option File | Description | Introduction | Deprecated | Removed |
---|---|---|---|---|---|
--basedir | basedir | Specify the base directory to prepend to paths in the config | |||
--daemon | daemon | Start in daemon-mode | |||
--defaults-file | defaults-file | Specify the configuration file | |||
--keepalive | keepalive | Try to restart the proxy if a crash occurs | |||
--log-backtrace-on-crash | log-backtrace-on-crash | Try to invoke the debug and generate a backtrace on crash | |||
--log-file | log-file | Specify the file for logging error messages | |||
--log-level | log-level | Logging level | |||
--log-use-syslog | log-use-syslog | Log errors to syslog | |||
--lua-cpath | lua-cpath | Set the LUA_CPATH | |||
--lua-path | lua-path | Set the LUA_PATH | |||
--max-open-files | max-open-files | Specify the maximum number of open files to support | |||
--pid-file | pid-file | PID file to store the process ID (when in daemon mode) | |||
--plugin-dir | plugin-dir | Path to the plugin files | |||
--plugins | plugins | List of plugins to load | |||
--user | user | Specify the user to use when running mysql-monitor-agent | |||
--verbose-shutdown | verbose-shutdown | Report shutdown in the logs regardless of log level | 2.2.0 | ||
--version | version | Show the version information |
Command-Line Format | --help | ||
-? |
Show available help options.
Command-Line Format | --help-all |
Show all help options.
Command-Line Format | --help-admin |
Show options for the admin-module.
Command-Line Format | --help-proxy |
Show options for the proxy-module.
Command-Line Format | --help-monitor |
Show options for the monitor module.
Command-Line Format | --help-agent |
Show options for the agent module.
Command-Line Format | --admin-address | ||
Option-File Format | admin-address | ||
Permitted Values | |||
Type | string | ||
Default | :4041 |
Specify the host name (or IP address) and port for the
administration port. The default is
localhost:4041
.
Command-Line Format | --admin-lua-script | ||
Option-File Format | admin-lua-script | ||
Permitted Values | |||
Type | file name | ||
Default |
|
Specify the script to use for the administration module for the proxy.
Command-Line Format | --admin-password | ||
Option-File Format | admin-password | ||
Permitted Values | |||
Type | string | ||
Default |
|
Define the password to use to authenticate users wanting to connect to the administration module of mysql-monitor-agent. The administration module uses the MySQL protocol to request a username and password for connections.
Command-Line Format | --admin-username | ||
Option-File Format | admin-username | ||
Permitted Values | |||
Type | string | ||
Default | root |
Define the username to use to authenticate users wanting to
connect to the administration module of
mysql-monitor-agent. The default username
is root
. The administration module uses the
MySQL protocol to request a username and password for
connections.
--agent-collector-plugins=user
Command-Line Format | --agent-collector-plugins | ||
Option-File Format | agent-collector-plugins | ||
Permitted Values | |||
Type | numeric | ||
Default | collect_lua |
A comma-separated list of the plugins to be used and loaded by the agent and used to provide collector items.
When monitoring servers you must have the
agent
plugin configured. To
support Query Analyzer, you must also have the
proxy
module enabled. Plugins should be
specified as a comma separated list of plugin names.
If you enabled Query Analyzer during installation of the
agent, the default value is proxy,agent
. If
you disabled Query Analyzer during installation, the default
value is agent
.
--agent-connect-timeout=seconds
Version Introduced | 2.2.2 | ||
Command-Line Format | --agent-connect-timeout | ||
Option-File Format | agent-connect-timeout | ||
Permitted Values | |||
Type | numeric | ||
Default | 10 |
The timeout for the agent to connect to the MySQL server before a failure is reported.
--agent-DNS-cachetimeout=seconds
Version Introduced | 2.2.0 | ||
Command-Line Format | --agent-DNS-cachetimeout | ||
Option-File Format | agent-DNS-cachetimeout | ||
Permitted Values | |||
Type | numeric | ||
Default | 0 | ||
Valid Values | -1 | Never timeout | |
0 | Don't cache |
The timeout for caching the IP address of a given DNS name. By default, the operating system caching of the address is used and no caching in the agent is performed at all. If you specify -1 caching is enabled and never times out. Any other positive value specifies the timeout value.
Version Introduced | 2.2.2 | ||
Command-Line Format | --agent-net-timeout | ||
Option-File Format | agent-net-timeout | ||
Permitted Values | |||
Type | numeric | ||
Default | 10 |
The timeout for the agent to get a response from a MySQL server to which it is already connected before the failure is reported.
Version Introduced | 2.2.0 | ||
Command-Line Format | --agent-report-network-fs | ||
Option-File Format | agent-report-network-fs | ||
Permitted Values | |||
Type | boolean | ||
Default | off |
Enables data collection for network filesystems. In MySQL Enterprise Agent 2.2.2 and greater, the reporting of network filesystem information is disabled because the latency in determining and reporting the information can delay the collection and reporting of other information. You must manually enable collection if you need or use advisor and graphs that perform custom data collection on networked filesystems.
Command-Line Format | --agent-force-uncorking | ||
Option-File Format | agent-force-uncorking |
Forcibly turn off the corking of responses sent to MySQL Enterprise Service Manager. The corking mechanism tries to randomize the reporting interval of data sent up to the server to prevent flooding the server with information.
You can combine this option with the
---agent-report-offset
to specify the offset
when data is reported to the server. For more information, see
agent-report-offset
.
The frequency of collecting the data is not modified by this setting.
Command-Line Format | --agent-generate-uuid | ||
Option-File Format | agent-generate-uuid |
Regenerates a UUID for the agent. You can use this to generate a new UUID if you have copied configuration information for an agent from one machine to another. To use:
shell> /opt/mysql/enterprise/agent/bin/mysql-monitor-agent --agent-generate-uuid ee9296d7-f7cd-4fee-8b26-ead884ebf398 2009-03-05 11:49:37: (critical) shutting down normally
For more information, see Section 5.3.6, “Monitoring Multiple MySQL Servers”.
Command-Line Format | --agent-heartbeat-interval | ||
Option-File Format | agent-heartbeat-interval | ||
Permitted Values | |||
Type | numeric | ||
Default | 3 |
Specify the heartbeat interval. The agent sends heartbeat messages to MySQL Enterprise Service Manager to indicate that it is alive and still running and monitoring servers. The MySQL Enterprise Service Manager uses this information to help identify when an agent is available or not.
Command-Line Format | --agent-host-id | ||
Option-File Format | agent-host-id |
Define the agent host id. The host id should be a unique identifier for the host on which the agent is running, and is different to the agent UUID. You can override the host ID for use within HA environments where you have two identical agent configurations, one on a live server, and one on a backup server to be brought into use if the primary server fails. The host ID is used to identify the host by the server, and during failover you want the host ID to remain constant as you monitor either the original or failover (replacement) server.
Version Introduced | 2.2.0 | ||
Command-Line Format | --agent-IP-version | ||
Option-File Format | agent-IP-version | ||
Permitted Values | |||
Type | numeric | ||
Default | any | ||
Valid Values | 4 , 6 |
Specify the IP version to be used and supported by
MySQL Enterprise Agent. By default, the agent supports both IPv4 and
IPv6, or you can specify the version by specifying
4
or 6
.
Command-Line Format | --agent-host-id-commandline | ||
Option-File Format | agent-host-id-commandline |
Specify the command line to generate the host ID. By default, the host ID is generated by using a variety of methods configured for a specific platform, including using SSH keys and embedded host ID information. You can replace this with an alternative command-line
Command-Line Format | --agent-hostname | ||
Option-File Format | agent-hostname |
Override the automatically determined hostname. You can use this to specify an alternate hostname for the agent. This can be useful if your host has multiple hostnames and you want the machine identified by a specific hostname.
Setting the hostname using the Manage Servers tab within MySQL Enterprise Dashboard overrides this setting.
Command-Line Format | --agent-item-files | ||
Option-File Format | agent-item-files |
A comma separated list of the item files used to load data items that are then collected and sent to MySQL Enterprise Service Manager. For more information, see Section 4.1.8, “Creating a Custom Data Collection Item”.
The default value includes
share/mysql-proxy/items/quan.lua
(which
provides Query Analyzer data) and
share/mysql-proxy/items/items-mysql-monitor.xml
(which provides the core agent monitoring data).
Command-Line Format | --agent-max-response-size | ||
Option-File Format | agent-max-response-size | ||
Permitted Values | |||
Type | numeric | ||
Default | 65536 |
Specify the maximum size of the response packet sent to MySQL Enterprise Service Manager
Version Introduced | 2.2.1 | ||
Command-Line Format | --agent-master-uuid-discovery | ||
Option-File Format | agent-master-uuid-discovery | ||
Permitted Values | |||
Type | boolean | ||
Default | true |
By default, the MySQL Enterprise Agent uses the UUID of the
replication master to aid in identifying the replication
topology. Setting this option to false prevents the agent from
accessing the master.info
and using the
UUID obtained from the replication master. Instead, the
hostname and port information is used to determine the
topology and match the instance and master information.
Command-Line Format | --agent-mgmt-hostname | ||
Option-File Format | agent-mgmt-hostname |
Set the URL of the MySQL Enterprise Service Manager where collected data is
sent. The URL should include the username and password for the
agents, for example:
http://agent:password@memserver:18080/heartbeat
.
If you have the http_proxy
environment
variable configured within your environment, you should add
the value of agent-mgmt-hostname
to the
no_proxy
variable to ensure that data is
correctly transmitted to MySQL Enterprise Service Manager and not redirected
through the configured proxy address.
Version Introduced | 2.2.0 | ||
Command-Line Format | --agent-mgmt-username | ||
Option-File Format | agent-mgmt-username | ||
Permitted Values | |||
Type | string |
The username to be used when communicating with MySQL Enterprise Service Manager.
Version Introduced | 2.2.0 | ||
Command-Line Format | --agent-mgmt-password | ||
Option-File Format | agent-mgmt-password | ||
Permitted Values | |||
Type | string |
The password to be used when communicating with MySQL Enterprise Service Manager.
Version Introduced | 2.2.0 | ||
Command-Line Format | --agent-report-offset | ||
Option-File Format | agent-report-offset | ||
Permitted Values | |||
Type | numeric | ||
Default | random |
The offset, in seconds, past the minute when data is sent up to MySQL Enterprise Service Manager. You can use this to harmonize or synchronize agent report across multiple machines, which can improve performance.
For example, if you set
--agent-report-offset=15
, then data is
reported at 15 seconds past each minute. For example, at
12:00:15, 12:01:15, and so on.
Command-Line Format | --agent-run-os-tests | ||
Option-File Format | agent-run-os-tests |
Runs the internal operating system tests, and then exits. Using this option generates a large body of information about the various operating system information that can be collected about the host. You can use this to determine whether the agent is collecting the right amount, quantity and quality of information to the server.
A truncated sample of the output is provided below:
2010-01-22 16:15:45: (critical) MySQL Monitor Agent 2.2.1.1138 started. sigar-test-all.c.128 (): pid = 1353 sigar-test-all.c.110 (): mem.ram = 6080, mem.total = 6374154240, mem.used = 3356090368, mem.free = 3018063872, mem.actual_free = 3018063872, mem.actual_used = 3356090368 sigar-test-all.c.143 (): swap.total = 28523896832, swap.used = 710623232, swap.free = 27813273600 sigar-test-all.c.169 (): cpu.user = 24544920, cpu.sys = 136764840, cpu.nice = 0, cpu.idle = 1234759920, cpu.wait = 0, cpu.total = 349015500 sigar-test-all.c.194 (): [0] cpu.user = 8516770, cpu.sys = 56838970, cpu.nice = 0, cpu.idle = 283667220, cpu.wait = 0, cpu.total = 349022960 [1] cpu.user = 6130420, cpu.sys = 12671090, cpu.nice = 0, ...
Command-Line Format | --agent-sync-attempts | ||
Option-File Format | agent-sync-attempts |
Attempt to synchronize with the server during the resynchronization.
Command-Line Format | --agent-track-alloc | ||
Option-File Format | agent-track-alloc |
Track the memory allocation in the various modules of the agent to help monitor the memory usage.
Command-Line Format | --agent-uuid | ||
Option-File Format | agent-uuid | ||
Permitted Values | |||
Type | string |
Specify the agent UUID. A UUID is automatically generated for
each agent during installation, with the UUID automatically
added to the configuration. You can generate a new UUID using
the agent-generate-uuid
command line option.
If you are setting up multiple hosts and copying the
configuration between hosts, make sure that the
agent-uuid
is unique. You can have the
agent create a new UUID by leaving this configuration property
blank.
Command-Line Format | --basedir | ||
Option-File Format | basedir | ||
Permitted Values | |||
Type | file name |
Specify a base directory that is prepended to all other filename configuration options. Use an absolute (not relative) directory name, otherwise mysql-monitor-agent generates an error during startup.
Command-Line Format | --defaults-file | ||
Option-File Format | defaults-file |
Specify a file to use as the file with configuration information. If not specified, configuration options are only taken from the command line.
Command-Line Format | --event-threads | ||
Option-File Format | event-threads | ||
Permitted Values | |||
Type | numeric | ||
Default | 1 |
Specify the number of event threads reserved to handle incoming requests.
Command-Line Format | --keepalive | ||
Option-File Format | keepalive |
Creates an angel process surrounding the main mysql-monitor-agent that attempts to restart the true mysql-monitor-agent process in the event a crash or other failure.
If the agent stops unexpectedly, the angel revives the agent.
An expected shutdown is:
MySQL Enterprise Agent terminates normally
Shutdown with SIGTERM
Startup errors
If the angel recieves one of SIGHIP
,
SIGTERM
, or SIGINT
signals, the signal is forwarded to the agent to initiate
shutdown.
Version Introduced | 2.2.0 | ||
Command-Line Format | --agent-backlog-timeout | ||
Option-File Format | agent-backlog-timeout | ||
Permitted Values | |||
Type | numeric |
The time in seconds that data is kept by the agent if the agent is unable to communicate with MySQL Enterprise Service Manager. Once the agent reconnects, the data is sent up to MySQL Enterprise Service Manager. Data older than the specified value is discarded. The default value is 600 seconds.
Command-Line Format | --log-backtrace-on-crash | ||
Option-File Format | log-backtrace-on-crash |
Logs the backtrace to the error log and tries to initialize the debugger in the event of a failure.
Command-Line Format | --log-file | ||
Option-File Format | log-file | ||
Permitted Values | |||
Type | file name |
Specify the name of a file to be used to record log information. If you do not specify a full path name, then the log file location is considered to be relative to the installation directory of the agent.
Command-Line Format | --log-level | ||
Option-File Format | log-level | ||
Permitted Values | |||
Type | enumeration | ||
Default | critical | ||
Valid Values | error | Show error messages | |
warning | Show only warning messages | ||
info | Show informational messages | ||
message | Show information about agent and basic processing | ||
critical | Show critical messages highlighting agent problems | ||
debug | Show detailed information, including info provided to server |
The log level used when outputting error messages. Messages of
that level (or lower) are output. For example,
message
also outputs
info
, warning
, and
error
messages.
Be careful when setting the log-level
to
debug
. Doing this rapidly increases the
size of your mysql-monitor-agent.log
file. To avoid disk space problems, put the log files on a
different drive from your MySQL server and the
MySQL Enterprise Dashboard.
It is strongly recommended that you use a
log-level
of critical
or error
in a production server. Use the
higher-levels to provide more detailed information only for
debugging problems with your agent.
Under Windows, if you restart the agent from the command
line after setting the log-level
to
debug
, extensive debug information is
displayed to the console as well as to the log file.
Command-Line Format | --log-use-syslog | ||
Option-File Format | log-use-syslog |
Causes errors to be sent to the syslog (Unix/Linux only).
Command-Line Format | --lua-cpath | ||
Option-File Format | lua-cpath | ||
Permitted Values | |||
Type | file name |
Specify the LUA_CPATH
to be used when
loading compiled modules or libraries for Lua scripts.
Command-Line Format | --lua-path | ||
Option-File Format | lua-path | ||
Permitted Values | |||
Type | file name |
Specify the LUA_CPATH
to be used when
loading modules for Lua.
Command-Line Format | --max-open-files | ||
Option-File Format | max-open-files | ||
Permitted Values | |||
Type | numeric |
The maximum number of open files and sockets supported by the mysql-monitor-agent process. You may need to increase this with certain scripts.
Command-Line Format | --monitor-interval | ||
Option-File Format | monitor-interval | ||
Permitted Values | |||
Type | numeric | ||
Default | 1 | ||
Min Value | 1 |
Execute queries against the backends at this interval. The default is 1.
Command-Line Format | --monitor-lua-script | ||
Option-File Format | monitor-lua-script | ||
Permitted Values | |||
Type | string |
Filename of the Lua script to use for the monitor module.
Command-Line Format | --monitor-password | ||
Option-File Format | monitor-password | ||
Permitted Values | |||
Type | string |
The password for the monitoring user account.
Command-Line Format | --monitor-username | ||
Option-File Format | monitor-username | ||
Permitted Values | |||
Type | string | ||
Default | monitor |
The username for the monitoring user account.
Version Introduced | 2.2.0 | ||
Command-Line Format | --mysqld-instance-dir | ||
Option-File Format | mysqld-instance-dir | ||
Permitted Values | |||
Type | string |
The path to the configuration files for the MySQL instance.
Version Introduced | 2.2.0 | ||
Command-Line Format | --agent-IP-version | ||
Option-File Format | agent-IP-version | ||
Permitted Values | |||
Type | numeric | ||
Default | any | ||
Valid Values | 4 , 6 |
Explicitly sets the IP version to be used for addressing. By
default, the agent uses either version. Set the value by
specifying 4
(for IPv4) or
6
(for IPv6).
Command-Line Format | --no-proxy | ||
Option-File Format | no-proxy |
Disable the proxy module.
Command-Line Format | --plugin-dir | ||
Option-File Format | plugin-dir | ||
Permitted Values | |||
Type | file name |
The directory to use when loading plugins for mysql-monitor-agent.
Command-Line Format | --plugins | ||
Option-File Format | plugins | ||
Permitted Values | |||
Type | string |
A comma-separated list of the plugins to be loaded.
Command-Line Format | --proxy-address | ||
-P | |||
Option-File Format | proxy-address | ||
Permitted Values | |||
Type | string | ||
Default | :6446 |
The listening host name (or IP address) and port of the proxy
service. The default is :6446
(all IPs on
port 6446). The setting is used when employing Query Analysis
as the address/port that you must configure your application
to use in place of your normal MySQL server. By default this
item is set during installation.
--proxy-read-only-backend-addresses=host:port
Command-Line Format | --proxy-read-only-backend-addresses | ||
-r | |||
Option-File Format | proxy-read-only-backend-addresses | ||
Permitted Values | |||
Type | string |
The listening host name (or IP address) and port of the proxy server for read-only connections. The default is for this information not to be set.
--proxy-backend-addresses=host:port
The host name (or IP address) and port of the MySQL server to connect to. You can specify multiple backend servers by supplying multiple options. Clients are connected to each backend server in round-robin fashion. For example, if you specify two servers A and B, the first client connection goes to server A; the second client connection goes to server B; and the third client connection goes to server A.
Command-Line Format | --proxy-pool-no-change-user | ||
Option-File Format | proxy-pool-no-change-user |
Disables the use of the MySQL protocol
CHANGE_USER
when re-using a connection from
the pool of connections specified by the
backend-addresses
list.
disables profiling of queries (tracking time statistics). The default is for tracking to be enabled.
Command-Line Format | --proxy-fix-bug-25371 | ||
Option-File Format | proxy-fix-bug-25371 |
Gets round an issue when connecting to a MySQL server later than 5.1.12 when using a MySQL client library of any earlier version.
Command-Line Format | --proxy-lua-script | ||
-s | |||
Option-File Format | proxy-lua-script | ||
Permitted Values | |||
Type | file name |
Specify the Lua script file to be loaded. Note that the script
file is not physically loaded and parsed until a connection is
made. Also note that the specified Lua script is reloaded for
each connection; if the content of the Lua script changes
while mysql-monitor-agent is running, the
updated content is automatically used when a new connection is
made. To use Query Analyzer, set this parameter to
share/mysql-proxy/quan.lua
. This is the
default value.
Command-Line Format | --daemon | ||
Option-File Format | daemon |
Starts the proxy in daemon mode.
Command-Line Format | --pid-file | ||
Option-File Format | pid-file | ||
Permitted Values | |||
Type | file name |
Sets the name of the file to be used to store the process ID.
This is used by the script that shuts down the agent to
identify the process to be shutdown. The default value is the
mysql-monitor-agent.pid
file within the
base installation directory as created by the agent
Command-Line Format | --user | ||
Option-File Format | user | ||
Permitted Values | |||
Type | string |
Run mysql-monitor-agent as the specified
user
.
Command-Line Format | --version | ||
-V | |||
Option-File Format | version |
Show the version number.
Version Introduced | 2.2.0 | ||
Command-Line Format | --verbose-shutdown | ||
Option-File Format | verbose-shutdown | ||
Permitted Values | |||
Type | boolean | ||
Default | off |
By default, agent shutdown messages are only logged if you
have set log-level
to
message
or higher. You can force shutdown
messages to be reported regardless of the log level using this
option.
For the MySQL server that you want to monitor, you must create an
agent-instance.ini
within the directory
specified by the mysqld-instance-dir
configuration parameter within the main
mysql-monitor-agent.ini
file.
The agent-instance.ini
file contains the host
name and user credentials for connecting to the MySQL server that
you want the agent to monitor. The format of the file is as
follows:
# To use this .ini file as a template for configuring additional # instances to monitor, do not simply copy and start a new agent # without first modifying the displayname. # # Refer to the documentation for more detailed information and # instructions. # # Version: 20080718_230416_r7011 [mysqld] hostname = 127.0.0.1 port = 3306 user = root password =
The individual configuration parameters can be defined as follows:
hostname
: The host name of the MySQL server
that you want to monitor.
port
: The TCP/IP port of the MySQL server
that you want to monitor.
user
: The user to use when connecting to
the MySQL server that you want to monitor.
password
: The corresponding password to use
when connecting to the MySQL server that you want to monitor.
It is also possible to configure the agent to use sockets. This
can be done during installation by selecting “socket”
rather than “TCP/IP” from the menu and then
specifying the socket name. This can also be configured after
installation by editing the
agent-instance.ini
configuration file, and
adding the line:
socket = /full/path/to/mysql.sock
Replication topology discovery for an instance is determined by
the agent using the master.info
file for the
instance, extracting the username/password used to connect to the
master, and then obtaining the MySQL Enterprise Monitor generated UUID of the
replication master. This enables the MySQL Enterprise Agent to match the
slave and master in the replication topology.
You can provide alternative credentials to be used to obtain the
master UUID by adding a replication
section to
the instance configuration file, and providing values for the
discovery-username
and
discovery-password
options. For example:
[replication] discovery-username=agentdiscovery discovery-password=password
To switch off the use of the master UUID entirely when determining
the replication topology, use the
agent-master-uuid-discovery
option.
The locations of the agent log files are as follows:
Windows: C:\Program
Files\MySQL\Enterprise\Agent\mysql-monitor-agent.log
Unix:
/opt/mysql/enterprise/agent/mysql-monitor-agent.log
Mac OS X:
/Applications/mysql/enterprise/agent/mysql-monitor-agent.log
On any platform, the location of the agent log file may be
changed. You may also change the name of the log file. To confirm
the location and the name, check the settings in the
mysql-monitor-agent.ini
file.
The maximum size of a log file may be limited to 2GB. If MySQL Enterprise Agent cannot add information to the configured logfile, then information is sent to the standard output instead.
Because the size of the log files can become quite large, you can use a tool such as logrotate (Unix/Linux) or logadm (Solaris) to automatically rotate the logs. For example, a sample logrotate definition is shown below:
/opt/mysql/enterprise/agent/mysql-monitor-agent.log { rotate 5 daily minsize 1G postrotate /usr/bin/killall -HUP mysql-monitor-agent endscript }
The above rotates the log before it reaches 1GB in size, keeping up to 5 files at a time.
To use your own system, you can copy the log file,
flush the contents, and then send the SIGHUP
signal to the agent process. On Windows, you need to shutdown,
copy the log, and restart the agent.
The locations of the agent pid
files are as
follows:
Windows: C:\Program
Files\MySQL\Enterprise\Agent\agent\mysql-monitor-agent.pid
Unix:
/opt/mysql/enterprise/agent/mysql-monitor-agent.pid
Mac OS X:
/Applications/mysql/enterprise/agent/mysql-monitor-agent.pid
On any platform, the location of the agent log file may be
changed. You may also change the name of the log file. To confirm
the location and the name, check the settings in the
mysql-monitor-agent.ini
file.