Table of Contents
MySQL Enterprise subscription, MySQL Enterprise Monitor, MySQL Replication Monitor, and MySQL Query Analyzer are only available to commercial customers. To learn more, see: http://www.mysql.com/products/enterprise/features.html.
This chapter describes the process of installing the MySQL Enterprise Monitor on all operating systems. A working installation requires the installation of a MySQL Enterprise Service Manager, the MySQL Enterprise Advisors and one or more MySQL Enterprise Monitor Agents. Simply described, the agent inspects the MySQL server it is monitoring, reports to the Service Manager, and the results are interpreted by the advisors and displayed in the MySQL Enterprise Dashboard for viewing in a web browser.
One Monitor Agent is installed for each MySQL server that is being monitored. The Monitor Agent usually runs on the same machine that hosts the monitored MySQL server but it may run on any machine that has access to both the monitored MySQL server and the MySQL Enterprise Dashboard. The agent reports its findings to the Service Manager and these results are interpreted by Advisors and displayed in the dashboard. The end user opens a web browser to view the information presented in the dashboard. The Service Manager and dashboard run on the same machine and both have access to a local MySQL server installed as part of the MySQL Enterprise Monitor. This server is known as the repository and provides storage for the data provided by the agent.
Installation is a three step process:
Install and start the Service Manager on the monitoring system. See Section 2.2, “Service Manager Installation”.
Configure the Service Manager, see Section 2.3, “Monitor Agent Installation”.
Start the MySQL Enterprise Service Manager and MySQL Enterprise Monitor Agent instances, and then use the MySQL Enterprise Dashboard to install the Advisors and complete the configuration and installation. See Section 2.2.7, “MySQL Enterprise Service Manager Configuration Settings and Advisor Installation”.
Depending on your configuration and environment, you will need to download a number of different components and files from MySQL Enterprise website available on the download page. These include:
MySQL Enterprise Service Manager and MySQL Enterprise Dashboard for the platform that you
intend to execute the MySQL Enterprise Service Manager on. These are named
mysqlmonitor-
,
with the appropriate version and platform name. If you are
performing an upgrade, download the upgrade installer, named
2.1.0.1096
-linux-x86_64
-installer.binmysqlmonitor-
.
2.1.0.1096
-linux-x86_64
-update-installer.bin
One or more MySQL Enterprise Monitor Agent, one for each MySQL Server that you
want to monitor. You should download an installer package for
the right platform for the MySQL server you want to manage.
Agent installers are available with the name
mysqlmonitoragent-
.
Upgrade installers to update an existing MySQL Enterprise Monitor Agent
installation are named
2.1.0.1093
-linux-debian3.1-powerpc
-installer.binmysqlmonitoragent-
.
2.1.0.1093
-linux-debian3.1-powerpc
-update-installer.bin
Optional
A product key file for MySQL Enterprise Service Manager. If your MySQL Enterprise Service Manager has internet connectivity, your product key can be downloaded automatically during the initial phase of configuration directly from the MySQL Enterprise website. For more information, see Section 2.2.7, “MySQL Enterprise Service Manager Configuration Settings and Advisor Installation”.
Optional
An advisor bundle equal to the level of your MySQL Enterprise subscriptiion (Platinum, Gold, or Silver), which is required for MySQL Enterprise Service Manager. If your MySQL Enterprise Service Manager has internet connectivity, your advisor bundle can be downloaded automatically during the initial phase of configuration directly from the MySQL Enterprise website. For more information, see Section 2.2.7, “MySQL Enterprise Service Manager Configuration Settings and Advisor Installation”.
For information on the installation requirements for different platforms, see Section F.3, “Installation Requirements”.
Prior to installation you will need to have at hand credentials for access to the MySQL server you plan to monitor and also your MySQL Enterprise credentials. During installation and when first logging in, you will set up a variety of users with different roles and credentials. This can become confusing. This section outlines the various users associated with the MySQL Enterprise Monitor and gives a brief description of their roles.
The MySQL Enterprise user: These are the credentials you use to log in to the MySQL Enterprise web site. You will need them to acquire the Advisor files and receive updates and, if necessary, acquire a product key.
The MySQL user: For Monitor
Agents to report the status of a MySQL server they must have
privileges on that server. To perform all functions an agent must
have SHOW DATABASES
, REPLICATION
CLIENT
, SUPER
,
CREATE
, and SELECT
privileges. In short, the Monitor Agent needs to have read access
to all data. Details about this account are given in
Section 2.3.1, “Creating a MySQL User Account for the Monitor Agent”.
The Repository user: This user is
the only user in the user
table in the
mysql
database in the bundled MySQL server. To
avoid confusion with monitored MySQL servers, this server is
referred to throughout this document as the
repository
. The repository user can log in from
localhost
using the password specified during
installation and has all privileges on all databases. These
credentials are used to create the repository and its tables and
to record data in them. During installation the default value for
the user name for this role is service_manager
.
No default password is specified. You can use these credentials to
manage the repository from the command line or when using a
program such as MySQL Administrator.
During installation the file
configuration_report.txt
is created.
Reference this file for the credentials of the repository manager.
After the MySQL Enterprise Service Manager is installed, look for this file in the
following directories:
Windows: C:\Program
Files\MySQL\Enterprise\Monitor
Unix: /opt/mysql/enterprise/monitor
Mac OS X:
/Applications/mysql/enterprise/monitor
The Root user: This user is the
administrator of the dashboard. The first time you log in to the
dashboard you must log in as this user. The default user name for
this user is admin
. There is no default
password for this user.
The Agent user: The Monitor Agent
needs to report the status of the MySQL server it is monitoring.
For this reason it needs to log in to the dashboard. The default
user name for this user is agent
. There is no
default password for this user.
The Monitor Agent has two roles in the MySQL Enterprise Monitor; it must have access to the dashboard and to the MySQL server it is monitoring. For a description of the agent as a MySQL user see Section 2.1.1, “Existing Users”.
The MySQL Enterprise Service Manager is the core element of the MySQL Enterprise Monitor. The installation process for this element is completely self-contained, but the installation includes the following components:
Apache Tomcat
MySQL Server
Java VM
After installation you can determine the version number of the
various components by entering
http://
into the web browsers address bar.
server_name:18080
/main?command=list_versions
During installation, versions of MySQL and Tomcat will be installed onto the machine. The installer automatically provides default network ports that are different from standard installation for these applications. You can change the ports during installation.
During installation, default values are shown for user names and ports. This is for your convenience only; you may choose different values. The installer detect ports that are already in use and allows you to select different ports.
The MySQL Enterprise Service Manager version 2.0 requires agents using 2.0 or higher.
All the installations share the same basic configuration parameters that you will be asked to confirm during installation. Before you start your installation, please review the section on these common paramaters, then proceed to section specific to your installation platform. For details of the common parameters, see Section 2.2.1, “Service Manager Installation Common Parameters”. For information on installation under Windows, see Section 2.2.2, “Service Manager Installation on Windows”, for Mac OS X see Section 2.2.3, “Service Manager Installation on Mac OS X”, and for Unix/Linux, see Section 2.2.4, “Service Manager Installation on Unix”.
All installations of the Service Manager install the Tomcat and MySQL applications using the same basic set of parameters. The defaults provided by the installation process are designed to be unique so that they do not interfere with existing installations of either product. However, you should check these parameters before installation to ensure that you do not experience any problems.
The common parameters are divided into those applying to the Tomcat server, and the MySQL server (Repository Configuration):
Tomcat Server Options
Tomcat Server port: The default port that the Tomcat server will use when listening for connections. If you change this option, then the port that you need to use when connecting to the Service Manager must be modified accordingly. The default value is 18080.
If you are not currently running a web server on port 80
you may find it more convenient to use the well known
port rather than 18080
. Since port
80
is the default for a web server,
you can then open the dashboard without specifying a
port.
Tomcat Shutdown port: The port used by the management scripts that is used to shut the Tomcat server down when you need to stop the Service Manager. The default value is 18005.
Tomcat SSL Port: The standard port used to connect to the Service Manager when you want to use Secure Sockets Layer (SSL) encrypted communication. The default value is 18443.
Repository Configuration (MySQL Server)
Repository Username: The user name created and used to
store information within the MySQL server to hold the
information used by the Service Manager. In normal use,
you should not need to use or modify this information, but
it may be required if you have a support issue. The
default value is service_manager
.
Repository User password: The password to be used for the Repository Username. This should be set to a secure password so that the repository data is secure.
The information that you configure during installation will always
be recorded within the
configuration_report.txt
file within the
installation directory for the Service Manager.
Because the information stored within the
configuration_report.txt
file is in plain
text, the Repository user name and password information are also
exposed within this file. Make sure that the installation
directory and file are secure that they can only be accessed by
those users who would need to use the information.
On Windows the installation modes are win32
and
unattended
only. unattended
mode is especially useful if you are doing multiple installations.
For more information on this topic see
Section 2.4, “Unattended Installation”.
To install the Service Manager as a Windows service, you must do the installation as a privileged user.
On Windows Vista or later, if user account control is on, an operating system dialog box requests confirmation of the installation.
To install the Service Manager on Windows, find the executable
file named
mysqlmonitor-
(where version
-windows-installer.exeversion
represents the
three-part version number).
Double-click the MySQL Monitor installer. You should be presented with the Language Selection prompt. Select the language to use for the installer and then click
.With the installation language selected, the remainder of the installation sets up the installation location and the main configuration parameters required by MySQL Enterprise Service Manager. Click
to continue.
Select the installation directory where you want the
MySQL Enterprise Service Manager components installed. By default on Windows
the directory is C:\Program
Files\MySQL\Enterprise\Monitor
. You click the
button next to the installation directory field to select a
directory using the File chooser, or type the directory
manually. Click to continue.
Configure the options that set the network ports used by the Tomcat server. For more information, see Section 2.2.1, “Service Manager Installation Common Parameters”. Click to continue.
Configure the repository settings, setting the user name, password and port used to communicate with the bundled MySQL server that will be used to store the information and statistics for your installation. For more information, see Section 2.2.1, “Service Manager Installation Common Parameters”. Click to continue.
If the Windows firewall is enabled you will be asked to unblock ports for Apache/Tomcat and the MySQL server.
You will be provided with information and a warning about the
configuration options and how they are stored in the
configuration_report.txt
file, and it's
location. Take a note of the full path to this file in case
you need to look up the information later. Click
to continue.
You should now be prompted to start the installation process. Click
to continue.Once the installation has been completed, you will be provided with the information on how to uninstall MySQL Enterprise Service Manager. Click
to continue.To complete the installation and set up your MySQL Enterprise Service Manager, you will need to login to the Dashboard. You can do this automatically by checking the box on the final window before clicking
. This checkbox is selected by default. If you do not want to run the Dashboard at this time, uncheck the box and clock .For instructions on starting the MySQL Enterprise Monitor services under Windows, see Section 2.2.5, “Starting/Stopping the MySQL Enterprise Monitor Service on Windows”.
On Mac OS X there are three installation modes
osx
, text
, and
unattended
. For more information on this topic
see Section 2.4, “Unattended Installation”. The
text
mode installation for Mac OS X is
identical to text
installation under Unix. For
text
mode installation instructions see
Section 2.2.4, “Service Manager Installation on Unix”.
Installing the MySQL Enterprise Service Manager on Mac OS X requires an existing installation of Java. The minimum required version is 1.5.0_7. If this version is not installed on your machine you can download it from Apple. This version of Java requires Mac OS X version 10.4.5 as a minimum, so you may need to upgrade your operating system in order to install it.
For reasons of backward compatibility, Mac OS X is usually
installed with multiple versions of Java. When installing in
osx
mode, version 1.5.0_7 must be the default
version. Upon installation, Java 1.5.0_7 sets itself as the
default so this is usually not a problem.
If you have changed the default you can reset it or you may
install the MySQL Enterprise Service Manager in text
mode,
setting the environment variables to point to the correct version
of Java. To install in text
mode, find the
installbuilder
file in the
Contents/MacOS
directory immediately below
the
mysqlmonitor-
directory. Installing the MySQL Enterprise Service Manager in
version
-osx-installer.apptext
mode is identical to the procedure
described in Section 2.2.4, “Service Manager Installation on Unix” with the
minor differences noted above.
To install using the GUI (osx
) installation,
follow these instructions:
Double-click the MySQL Monitor installer. You should be presented with the Language Selection prompt. Select the language to use for the installer and then click
.If you have multiple Java installations on your machine, you will be asked to choose which Java to use with your MySQL Enterprise Service Manager installation. Choose the Java version you want to use (1.5.0 or later is required), and click
.With the installation language and Java version selected, the remainder of the installation sets up the installation location and the main configuration parameters required by MySQL Enterprise Service Manager. Click
to contintue.
Select the installation directory where you want the
MySQL Enterprise Service Manager components installed. By default on Mac OS X
the directory is
/Applications/mysql/enterprise/monitor
.
You click the button next to the installation directory field
to select a directory using the File chooser, or type the
directory manually. Click to
continue.
Configure the options that set the network ports used by the Tomcat server. For more information, see Section 2.2.1, “Service Manager Installation Common Parameters”. Click to continue.
Configure the repository settings, setting the user name, password and port used to communicate with the bundled MySQL server that will be used to store the information and statistics for your installation. For more information, see Section 2.2.1, “Service Manager Installation Common Parameters”. Click to continue.
You will be provided with information and a warning about the
configuration options and how they are stored in the
configuration_report.txt
file, and it's
location. Take a note of the full path to this file in case
you need to look up the information later. Click
to continue.
You should now be prompted to start the installation process. Click
to continue.Once the installation has been completed, you will be provided with the information on how to uninstall MySQL Enterprise Service Manager. Click
to continue.To complete the installation and set up your MySQL Enterprise Service Manager, you will need to login to the Dashboard. You can do this automatically by checking the box on the final window before clicking
. This checkbox is selected by default. If you do not want to run the Dashboard at this time, uncheck the box and clock .Your installation should now be complete. To continue with the configuration of MySQL Enterprise Service Manager, see Section 2.2.7, “MySQL Enterprise Service Manager Configuration Settings and Advisor Installation”.
To install the Service Manager find the file named
mysqlmonitor-
(where version
-installer.binversion
indicates the version
number, the OS, and the architecture ). Ensure that this file is
executable by typing:
shell> chmod +x mysqlmonitor-version
-installer.bin
To install to the default directory
(/opt/mysql/enterprise/monitor
) you need to
be logged in as root
. Installing as an
unprivileged user installs to the
/home/
directory.
user_name
/mysql/enterprise/monitor/
What follows describes installation from the command line. You may
install the Service Manager graphically by running the installer
from within a windows manager. In both cases the steps are
identical. You may also install the Service Manager in
unattended
mode. This is especially useful if
you are doing multiple installations. For more information on this
topic see Section 2.4, “Unattended Installation”.
Begin installation by typing:
shell> ./mysqlmonitor-version
-installer.bin
First choose the language for the installation:
Language Selection Please select the installation language [1] English [2] Japanese Please choose an option [1] :
Throughout the installation process you will be asked the configuration questions for different options. Default values are shown between square brackets; to use the default press Enter. Otherwise, enter the new value and press Enter:
First, select the directory where you want MySQL Enterprise Service Manager to
be installed. The default is
/opt/mysql/enterprise/monitor/
. Make sure
that the location you choose has enough space to hold the
installation files and the database information that will be
created when MySQL Enterprise Service Manager is running.
Please specify the directory where the MySQL Enterprise Service Manager will be installed. Installation directory [/opt/mysql/enterprise/monitor/]:
Now set the Tomcat Server options. For more details on these parameters, see Section 2.2.1, “Service Manager Installation Common Parameters”.
---------------------------------------------------------------------------- Tomcat Server Options Please specify the following parameters for the bundled Tomcat Server Tomcat Server Port [18080]: Tomcat Shutdown Port [18005]: Tomcat SSL Port [18443]:
You will also be asked if SSL support is required. SSL support allows your agents and monitor to communicate with each other using SSL. Using SSL means that the data exchanged by the agent and MySQL Enterprise Service Manager are secure and can be used to monitor servers securely, or to monitor agents over a public connection.
You can enable SSL by pressing Y when prompted during installation:
Is SSL support required? [y/N]:
Set the repository (embedded MySQL server) configuration options. For more details on these parameters, see Section 2.2.1, “Service Manager Installation Common Parameters”.
---------------------------------------------------------------------------- Repository Configuration Please specify the following parameters for the bundled MySQL server Repository Username [service_manager]: Password : Re-enter : Bundled MySQL Database Port [13306]:
Before the final installation process, you will provided with the location of the file that contains a copy of all of the settings. Be sure to follow the instructions and store this report in a secure location. There is no password recovery feature.
---------------------------------------------------------------------------- Configuration Report Note: The settings you specified will be saved here: /opt/mysql/enterprise/monitor/configuration_report.txt IMPORTANT: This configuration report includes passwords stored in plain text; it is intended to help you install and configure your agents. We strongly advise you to secure or delete this text file immediately after installation. Press [Enter] to continue :
You you will now be asked to confirm the installation process.
Setup is now ready to begin installing MySQL Enterprise Monitor on your computer. Do you want to continue? [Y/n]: Y Please wait while Setup installs MySQL Enterprise Monitor on your computer.
The installation process may take a few minutes to complete. Upon completion you should see:
Completed installing files Setup has completed installing MySQL Enterprise files on your computer Uninstalling the MySQL Enterprise files can be done by invoking: /opt/mysql/enterprise/monitor/uninstall To complete the installation, launch the MySQL Enterprise Dashboard and complete the initial setup and product activation information. Refer to the readme file for additional information and a list of known issues. Press [Enter] to continue :
Finally, you will be given the opportunity to read a supplied
Readme
file that is supplied with the
installation. The Readme
contains
important information about how to use and start your
MySQL Enterprise Service Manager.
---------------------------------------------------------------------------- Setup has finished installing MySQL Enterprise Monitor on your computer. View Readme File [Y/n]: n
Once the Readme
file has been displayed,
or if you did not elect to read the file, the installation
provides information about how to continue with your
installation.
Info: To access the MySQL Enterprise Monitor please visit the following page: http://localhost:18080/Auth.action Press [Enter] to continue :
The Enterprise Dashboard will not start up automatically if you
perform a text
mode installation. For more
information on starting and stopping MySQL Enterprise Service Manager, see
Section 2.2.6, “Starting/Stopping the MySQL Enterprise Monitor Service on Unix and Mac OS X”.
You can choose to start up the MySQL Enterprise Service Manager on installation. The installed services are called:
MySQL Enterprise Tomcat
MySQL Enterprise MySQL
You can stop or start the services from the Microsoft Management
Console Services window. Look for the MySQL Enterprise
Tomcat
and the MySQL Enterprise MySQL
entries.
On Windows Vista or later, starting these services requires
administrative privileges—you must be logged in as an
administrator. To start or stop a service right-click it and
choose the cmd
window
right-click the cmd
icon and choose the
menu option.
To start or stop a service, right-click it and choose from the options in the pop-up menu.
There is also a menu entry for starting and stopping the services.
Navigate to the Program
,
MySQL
, MySQL Enterprise Monitor
,
Services
entry to stop or start the services.
You can also stop or start a service from the command line. To start the Tomcat service type:
shell> sc start MySQLEnterpriseTomcat
or:
shell> net start MySQLEnterpriseTomcat
To stop this service type:
shell> sc stop MySQLEnterpriseTomcat
or:
shell> net stop MySQLEnterpriseTomcat
In similar fashion, you may stop or start the MySQL server from
the command line. The service name is
MySQLEnterpriseMySQL
.
You may also start, stop, and restart a specific service or both
services using the mysqlmonitorctl.bat
file.
To execute this file, go to the command line and navigate to the
C:\Program Files\MySQL\Enterprise\Monitor
directory. Typing mysqlmonitorctl.bat help
produces the following output:
usage: mysqlmonitorctl.bat help mysqlmonitorctl.bat (start|stop|restart|install|uninstall) mysqlmonitorctl.bat (start|stop|restart) tomcat mysqlmonitorctl.bat (start|stop|restart) mysql help - this screen start - start the service(s) stop - stop the service(s) restart - restart or start the service(s) install - install the service(s) uninstall - uninstall the service(s)
To stop a specific service, pass the argument
tomcat
or mysql
in addition
to the status change argument. If you wish to change the status of
both services, do not specify a service name. You may also
uninstall the services using this batch file.
Configuration of the dashboard begins immediately after the Service Manager is installed. To continue a Windows installation skip the next section and go to Section 2.2.7, “MySQL Enterprise Service Manager Configuration Settings and Advisor Installation”.
The services incorporated into the MySQL Enterprise Service Manager are:
The MySQL Server
The Apache/Tomcat Server
Should you need to stop, start, or restart the MySQL Enterprise Service Manager
call the mysqlmonitorctl.sh
file located in
the /opt/mysql/enterprise/monitor/
directory
on Unix or the
/Applications/mysql/enterprise/monitor/
on
Mac OS X. To see all the available options navigate to the
appropriate directory and type:
shell> /opt/mysql/enterprise/monitor/mysqlmonitorctl.sh help
Executing this script produces the following output:
usage: ./mysqlmonitorctl.sh help ./mysqlmonitorctl.sh (start|stop|status|restart) ./mysqlmonitorctl.sh (start|stop|status|restart) mysql ./mysqlmonitorctl.sh (start|stop|status|restart) tomcat help - this screen start - start the service(s) stop - stop the service(s) restart - restart or start the service(s) status - report the status of the service
Using this script you can stop, start, or restart all the Service
Manager components. To do this make a call to
mysqlmonitorctl.sh start
from your start-up
script.
To start the service:
shell> ./mysqlmonitorctl.sh start ./mysqlmonitorctl.sh : mysql started nohup: redirecting stderr to stdout Starting mysqld daemon with databases from /opt/mysql/enterprise/monitor/mysql/data/ Using CATALINA_BASE: /opt/mysql/enterprise/monitor/apache-tomcat Using CATALINA_HOME: /opt/mysql/enterprise/monitor/apache-tomcat Using CATALINA_TMPDIR: /opt/mysql/enterprise/monitor/apache-tomcat/temp Using JRE_HOME: /opt/mysql/enterprise/monitor/java
If you try to start the service and it is already running, you will be warned that the services are already running:
shell> ./mysqlmonitorctl.sh start ./mysqlmonitorctl.sh : mysql (pid 18403) already running ./mysqlmonitorctl.sh : tomcat (pid 18480) already running
To stop the service:
shell> ./mysqlmonitorctl.sh stop Using CATALINA_BASE: /Applications/mysql/enterprise/monitor/apache-tomcat Using CATALINA_HOME: /Applications/mysql/enterprise/monitor/apache-tomcat Using CATALINA_TMPDIR: /Applications/mysql/enterprise/monitor/apache-tomcat/temp Using JRE_HOME: /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home Stopping tomcat service .. [ OK ] STOPPING server from pid file /Applications/mysql/enterprise/monitor/mysql/data/mysqld.pid 090209 15:37:09 mysqld ended
The restart
command is equivalent to executing
a stop
and then start
operation.
This script can also be used to check the status of the Tomcat web server or the MySQL repository.
shell> ./mysqlmonitorctl.sh status MySQL Network MySQL is running MySQL Network Tomcat is running
Configuration of the dashboard begins immediately after the MySQL Enterprise Service Manager is installed.
The Enterprise Dashboard is the web-based interface to the Service Manager so the procedure for starting the dashboard is identical for all platforms. From the dashboard you can configure the settings necessary for receiving updates from MySQL Enterprise and for the initial installation of the Advisors.
If you installed the Service Manager using a graphical interface, you have the option of launching the dashboard on the final installation screen (as long as the
checkbox is checked).
Otherwise, you can view the dashboard by typing
http://localhost:
into the address bar of your web browser. If you are unsure of the
host name and port to use, check the
18080
/Auth.actionconfiguration_report.txt
file.
Under Windows it is also possible to open the dashboard by
choosing the MySQL
menu item and finding the
MySQL Enterprise Monitor
entry. Under this entry choose
Start Service Manager
.
If this is the first time that you have attempted to log in to the dashboard you should see a screen similar to the following:
Use this screen to perform the following tasks:
Install the Advisors
Set up your MySQL Enterprise credentials
Create a user name and password for the dashboard administrator
Create a user name and password for the Monitor Agent
If you have been provided with a MySQL Enterprise
Product Key
and an Advisors file click the
button and locate these files. The
advisor file bears the name,
AdvisorScript-
and the product key,
version
.jar
.
If you do not allow Internet access from the dashboard you must
install the advisors in this way. It is strongly recommended
that you install the Advisors at this point, but you may do so
later. For instructions on doing this see,
Section 2.2.7.3, “Installing Advisors After Initial Log-in”. If the
product key that you provide is invalid a notification appears
and you will be unable to import the advisors.
Subscription-level_date
.xml
If you are activating the MySQL Enterprise Monitor using a product key donot enter your MySQL credentials; entering both produces an error message.
If you have Internet access from the dashboard, activate
MySQL Enterprise Monitor by supplying your MySQL Enterprise credentials. Enter
your email address as the MySQL Enterprise
Login
and enter and confirm your MySQL Enterprise
password. If you specify incorrect credentials, you receive the
error message, “Unable to connect to verify
credentials.”
In the Create Administrator section of this
screen, enter credentials for the dashboard administrator. This
creates the root user
described in
Section 2.1.3, “Users Created on First Log-in”. Make note of
the user name and password as these credentials are required for
any future login.
In the Configure Agent Credentials section
of this screen enter the credentials for the agent. This is the
agent user
also described in
Section 2.1.3, “Users Created on First Log-in”. The agent needs
to log in to report its findings. Make note of the agent's
credentials; this information is required when installing the
agent.
When all the settings have been specified, click the
button. If you log in successfully you should see a message displaying the number of graphs and advisors that have been imported. This number varies depending upon your subscription level.If importation of the advisor files fails, you will see the message:
Unable to import Advisor Jar. You may download the jar manually from the Enterprise Portal and import it from the 'Check For Updates' page.
In this case you may download the advisor file from the Enterprise website and install it as described in Section 2.2.7.3, “Installing Advisors After Initial Log-in”.
If this is the first time that you have launched the dashboard you are asked to set your time zone and locale. Choose the appropriate values from the drop-down list boxes. Setting the time zone ensures that you have an accurate time reference for any notifications from the MySQL Enterprise Advisors.
It is especially important that the time zone be set correctly as this may also affect the way the graphs display. For this reason, also ensure that the time reported by the operating system is correct. To change the time zone or locale see Section 5.2, “User Preferences”.
The locale chosen determines the user's default language when logging in to the Dashboard. Note that this will override the default browser settings whenever this specific user logs in.
After specifying your time zone and locale, the dashboard opens
on the Monitor
page. For a detailed
examination of the Monitor
Screen see,
Chapter 3, MySQL Enterprise Dashboard.
The Advisors interpret the data sent by the Monitor Agents and display the results in the dashboard. A minimal set of Advisors are preinstalled with the Service Manager. To obtain the full set of Advisors and get the most value from the MySQL Enterprise Monitor, you must download Advisors from MySQL Enterprise.
If you did not install the Advisors when you first logged in to
the MySQL Enterprise Dashboard, open the dashboard, find the
Advisors
tab, and choose the Check
for Updates
link. Doing this downloads the latest
version of the Advisors from the MySQL Enterprise web site. In
order to install the advisors in this fashion you must specify
your MySQL Enterprise credentials. Find instructions for doing
this in Section 5.1, “Global Settings”.
If you do not allow Internet access from the dashboard, you must
install the Advisors from a local file. To do this you need an
advisor file bearing the name,
AdvisorScript-
.
If you don't already have this file, you can find it on the
MySQL Enterprise downloads page. Download the Advisors file to
a location that is accessible from the dashboard. Use the
button to find the Advisors file
and then choose to load the
advisors.
version
.jar
The process for upgrading advisors is exactly the same as the
initial installation. Advisors are updated by choosing the
Check for
Updates
page. If you do not have Internet access from
the dashboard you can import the Advisors from a local file as
described in
Section 2.2.7.3, “Installing Advisors After Initial Log-in”.
You may choose to upgrade your MySQL Enterprise Monitor subscription level at any time.
Alert notification through email is a key component of the MySQL Enterprise Monitor Advisor solution. For this reason you may want to immediately configure an SMTP account for at least one recipient.
To do this choose the Settings
tab and go to
the Global Settings
screen by clicking the
appropriate link. Here you can configure the email settings.
These settings apply to the currently logged-in user.
Find the Outgoing Email Settings
on the left
of this page.
Ensure that the Enable Email Notifications
checkbox is checked and enter information as appropriate.
The default value for the SMTP port is 25
. If
your mail server runs on a different port simply specify it,
separating it from the server name using a colon. For example,
if your mail server runs on port 587 enter
into the SMTP Server text box.
email.myserver.com
:587
An email server must be available for sending email alerts.
The SMTP client uses Transport Layer Security (TLS) if the SMTP server supports it.
If your SMTP server incorrectly indicates that it supports TLS, check the Disable JavaMail TLS/SSL check box.
The email settings page is dealt with in more detail in Chapter 5, The Settings Page.
A MySQL Enterprise Monitor Agent monitors a MySQL server and sends data to the Advisors. These data are interpreted and displayed in the dashboard. The Monitor Agent is installed on all platforms using the steps described in the next section.
The MySQL Enterprise Service Manager version 2.0 or higher requires agents with a version number of 2.0 or higher.
Before setting up an agent to monitor a MySQL server you need to ensure that there is a user account for the agent on that server.
The privileges required for this user account vary depending on the information you wish to gather using the MySQL Enterprise Monitor Agent. The following privileges allow the Monitor Agent to perform its assigned duties without limitation:
SHOW DATABASES
: Allows the MySQL Enterprise Monitor Agent
to gather inventory about the monitored MySQL server.
REPLICATION CLIENT
: Allows the
MySQL Enterprise Monitor Agent to gather Replication master/slave status data.
This privilege is only needed if the MySQL Replication Advisor
Rules are employed.
SELECT
: Allows the MySQL Enterprise Monitor Agent to
collect statistics for table objects.
SUPER
: Allows the MySQL Enterprise Monitor Agent to execute
SHOW ENGINE INNODB STATUS
to collect data
about InnoDB tables. This privilege is also required to obtain
replication information using SHOW MASTER
STATUS
.
PROCESS
: When monitoring a MySQL server
running MySQL 5.1.24 or above with InnoDB
,
the PROCESS
privilege is required to
execute SHOW ENGINE INNODB STATUS
.
INSERT
: Required to create the UUID
required by the agent.
CREATE
: Allows the MySQL Enterprise Monitor Agent to create
tables. During discovery, the agent creates the table
inventory
within the
mysql
database that is used to the UUID for
the server. Without this table, the agent cannot determine the
UUID of the server and therefore use this when sending
information to MySQL Enterprise Service Manager.
For example, the following GRANT
statement will
give the agent the required SELECT
,
REPLICATION CLIENT
, SHOW
DATABASES
and SUPER
rights:
GRANT SELECT, REPLICATION CLIENT, SHOW DATABASES, SUPER, PROCESS ON *.* TO 'mysqluser
'@'localhost
' IDENTIFIED BY 'agent_password
';
For security reasons, you may wish to limit the
CREATE
and INSERT
privileges
to the agent so that it can only create tables within the
mysql
database:
GRANT CREATE, INSERT ON mysql.* TO 'mysqluser
'@'localhost
' IDENTIFIED BY 'agent_password
';
To enable replication discovery to work, you should also grant the
SELECT
privilege on the
mysql.inventory
table for each user with
replication privileges on the corresponding replication master.
This is required to let the MySQL Enterprise Monitor Agent read the replication
master UUID. For example:
GRANT SELECT ON mysql.inventory TO 'replicationuser
'@'%
' IDENTIFIED BY 'replication_password
';
You should perform this step after after
having run the agent on the corresponding MySQL server to ensure
that the mysql.inventory
table has been
correctly created. You can do this by running the agent,
shutting the agent down, running the above
GRANT
statement, and then restarting the
agent.
If the agent is unable to access the information from the table then a warning containing this information will be written to the agent log.
You may want to disable logging for the grant statement to
prevent the grant information being replicated to the slaves. If
this is the case, execute the statement SET
SQL_LOG_BIN=0
before you execute the above
GRANT
statement.
In a typical configuration, the agent runs on the same machine as
the MySQL server it is monitoring so the host name will be
localhost
. However, this will change if
the agent is running on a machine other than the one that hosts
the monitored MySQL server. In this case, change
localhost
to the appropriate value. For
more information about remote monitoring see
Section 2.3.6.4, “Configuring an Agent to Monitor a Remote MySQL Server”.
To install the MySQL Enterprise Monitor Agent on Windows, double-click the
mysqlmonitoragent-
(where version
-windows-installer.exeversion
indicates the three-part
version number) installer.
To install the agent as a Windows service, you must do the installation as a privileged user.
On Windows Vista or later, if user account control is on, an operating system dialog box requests confirmation of the installation.
You may also install the Monitor Agent in
unattended
mode. This is especially useful if
you are doing multiple installations. For more information on this
topic see, Section 2.4, “Unattended Installation”.
First, select the language for the MySQL Enterprise Monitor Agent installation. Click
to continue installation.Click
to start the installation process.
Select the installation directory. The default installation
directory is C:\Program
Files\MySQL\Enterprise\Agent
. Select the
installation directory, or type the new directory location.
Click to continue the installation
process.
You need to specify the information about the MySQL server that you want to monitor. You must enter the IP address or host name of the host you want to monitor, and the port, user name and password that you will use to connect to the MySQL server. If you want to confirm that the MySQL server is currently reachable using the information, ensure that the Validate MySQL host name or IP address checkbox is selected.
Currently, on Windows, the monitor agent only includes
support for connecting to the server to be monitored using
TCP/IP, so if the server has been started with
--skip-networking
it cannot be monitored.
If the MySQL server to be monitored has been started using
the command option --bind-address
then the
server will only listen for connections on the IP address
specified, that is, the IP address of the MySQL server. If
the monitor agent has been started using TCP/IP networking
and the default address of 127.0.0.1 it will not be able to
connect to the server to be monitored. Also, if
“localhost” is specified as the host name
during agent configuration, a connection will not be
established, as the server will be listening for connections
on the address specified with the
--bind-address
option, not 127.0.0.1.
Click
to continue the installation.If you want to use Query Analyzer, then you need to enable the MySQL Enterprise Monitor Agent Proxy. The Proxy is enabled by default. If you disable the Proxy during installation, you will need to enable it later before you are able to use Query Analyzer. For more information on Query Analyzer, see Chapter 9, The Query Analyzer Page.
When Proxy is enabled, MySQL Enterprise Monitor Agent listens on a network port for client applications, and forwards the connections to the backend MySQL server. You can change the port number that MySQL Enterprise Monitor Agent listens for connections.
The default port is 6446.
The MySQL Enterprise Service Manager that you want to use must be configured during installation. The host name, port and agent authentication information must be entered. If you have already installed MySQL Enterprise Service Manager then you can locate the information in the installation report file created during installation. Enter the required information and then click
to continue.You will be provided with a Configuration Report containing the information that you have entered during the installation. Check the information provided in the report. If you see a problem, use
to go back to the configuration screen and change the information. If the information is correct, click to continue.You are given a final opportunity to change the installation parameters. Click
to start the installation process.Once the agent has been installed, you will get a confirmation message. Click
to finalize the installation.You can start the MySQL Enterprise Monitor Agent automatically now the installation has been completed. To allow the agent to be started, leave the checkbox selected. To start the agent separately, uncheck the checkbox. Click
to exit the installation.Once the Monitor Agent is installed, it needs to be started. For information on how to start and stop the Agent, see Section 2.3.5.1, “Starting/Stopping the Agent on Windows”.
To install the MySQL Enterprise Monitor Agent on Mac OS X, decompress the
mysqlmonitoragent-
and then run the
version
-installer.app.zipmysqlenterpriseagent-
application.
version
-installer
First, select the language for the MySQL Enterprise Monitor Agent installation. Click
to continue installation.Click
to start the installation process.
Select the installation directory. The default installation
directory is
/Applications/mysql/enterprise/agent
.
Select the installation directory, or type the new directory
location.
You also need to select the method that the agent will use to communicate with the MySQL server. You can choose either to use a TCP/IP (network) connection, or a Socket (local) connection. Choose the connection method, and click
.The monitor agent always associates “localhost” with the TCP/IP address 127.0.0.1, not the MySQL socket. This is in contrast to the MySQL Command Line Tool, which connects using the MySQL socket by default on Unix, if the hostname “localhost” is specified.
If the MySQL server you wish to monitor has been started
with the --skip-networking
command option
then you will not be able to connect to it using TCP/IP, as
the server will not listen for TCP/IP connections. In this
case the monitor agent will need to be configured to use the
MySQL socket. This can be done during installation by
selecting “socket” rather than
“TCP/IP” and then specifying the MySQL socket
name. This can also be configured after installation by
editing the agent-instance.ini
configuration file, for further information on this refer to
Section 2.3.6.2, “MySQL Server (agent-instance.ini
) Configuration”.
If the MySQL server to be monitored has been started using
the command option --bind-address
then the
server will only listen for connections on the IP address
specified, that is, the IP address of the MySQL server. If
the monitor agent has been started using TCP/IP networking
and the default address of 127.0.0.1 it will not be able to
connect to the server to be monitored. Also, if
“localhost” is specified as the host name
during agent configuration, a connection will not be
established, as the server will be listening for connections
on the address specified with the
--bind-address
option, not 127.0.0.1.
You need to specify the information about the MySQL server that you want to monitor. The configuration information you enter will depend on the connection method selected in the previous screen.
If you chose TCP/IP as the connection method, you must enter the IP address or host name of the host you want to monitor, and the port, user name and password that you will use to connect to the MySQL server. If you want to confirm that the MySQL server is currently reachable using the information, ensure that the Validate MySQL host name or IP address checkbox is selected.
If you chose Socket as the connection method, you must
enter the full path name to the Unix socket created by
your MySQL server, and the user name and password that
will be used to authenticate with the server. Typical
values include /tmp/mysql.sock
and
/var/mysql/mysql.sock
.
Click
to continue the installation.If you want to use Query Analyzer, then you need to enable the MySQL Enterprise Monitor Agent Proxy. The Proxy is enabled by default. If you disable the Proxy during installation, you will need to enable it later before you are able to use Query Analyzer. For more information on Query Analyzer, see Chapter 9, The Query Analyzer Page.
When Proxy is enabled, MySQL Enterprise Monitor Agent listens on a network port for client applications, and forwards the connections to the backend MySQL server. You can change the port number that MySQL Enterprise Monitor Agent listens for connections The default port is 6446.
The MySQL Enterprise Service Manager that you want to use must be configured during installation. The host name, port and agent authentication information must be entered. If you have already installed MySQL Enterprise Service Manager then you can locate the information in the installation report file created during installation. Enter the required information and then click
to continue.You will be provided with a Configuration Report containing the information that you have entered during the installation. Check the information provided in the report. If you see a problem, use
to go back to the configuration screen and change the information. If the information is correct, click to continue.You are given a final opportunity to change the installation parameters. Click
to start the installation process.Once the agent has been installed, you will get a confirmation message. Click
to finalize the installation.You can start the MySQL Enterprise Monitor Agent automatically now the installation has been completed. To allow the agent to be started, leave the checkbox selected. To start the agent separately, uncheck the checkbox. Click
to exit the installation.Once the Monitor Agent is installed, it needs to be started. For information on how to start and stop the Agent, see Section 2.3.5.2, “Starting/Stopping the Agent on Mac OS X”.
As a prerequisite for installing the MySQL Enterprise Monitor Agent on Linux systems you must have the Linux Standards Base (LSB) initialization functions installed.
You can check the existence of the LSB components by looking for an LSB package within your Linux package management environment. For example, on RedHat and other RPM-based distributions:
shell> rpm -qa | grep -i lsb redhat-lsb-3.1-19.fc8.x86_64
Under Debian/Ubuntu:
shell> dpkg -l|grep -i lsb ii lsb-base 3.2-20ubuntu4 Linux Standard Base 3.2 init script function ii lsb-release 3.2-20ubuntu4 Linux Standard Base version reporting utilit
Alternatively, you can use the lsb_release command. Existence of this command normally indicates that the current distribution is LSB compliant.
To install the agent navigate to the directory that contains the
file,
mysqlmonitoragent-
(where version
-installer.binversion
indicates the three-part
version number, the OS, and the architecture). Ensure that this
file is executable by typing:
shell> chmod +x mysqlmonitoragent-version
-installer.bin
To install to the default directory
(/opt/mysql/enterprise/agent
) you need to be
logged in as root
. Installing as an
unprivileged user installs to the
/home/
directory.
user_name
/mysql/enterprise/agent
If you install the agent as an unprivileged user, it will not automatically start up on rebooting.
What follows describes installation from the command line. You may
install the Monitor Agent graphically by running the installer
from within a windows manager. In both cases the steps are
identical. You may also install the Monitor Agent in
unattended
mode. This is especially useful if
you are doing multiple installations. For more information on this
topic see Section 2.4, “Unattended Installation”.
Begin installation from the command line by typing:
shell> ./mysqlmonitoragent-version
-installer.bin --mode text
The various options are shown in what follows. Default values are indicated by square brackets; to select them press
. Otherwise enter a value of your choosing.First, you must select the Language you want to use during the installation process:
Language Selection Please select the installation language [1] English [2] Japanese Please choose an option [1] :
Next, specify the directory where you want the agent installed:
---------------------------------------------------------------------------- Welcome to the MySQL Enterprise Monitor Agent Setup Wizard. ---------------------------------------------------------------------------- Please specify the directory where MySQL Enterprise Monitor Agent will be installed Installation directory [/opt/mysql/enterprise/agent]:
Specify the MySQL server that you want to monitor. First, you must specify whether you want to use a TCP/IP or socket-based connection to communicate with the MySQL Server:
How will the agent connect to the database it is monitoring? [1] TCP/IP [2] Socket Please choose an option [1] :
If you select TCP/IP, then you will be asked to enter the TCP/IP address and port number:
---------------------------------------------------------------------------- Monitored Database Information IMPORTANT: The agent user account specified below requires special MySQL privileges. Visit the following URL for more information: https://enterprise.mysql.com/docs/monitor/2.0/en/mem-install.html#mem-agent-rights MySQL hostname or IP address [127.0.0.1]: Validate MySQL hostname or IP address [Y/n]: MySQL Port [3306]:
If you select Socket, then you will be asked to provide the
path name to the MySQL socket. Typical values are
/tmp/mysql.sock
,
/var/lib/mysql.sock
, or
/var/run/mysql.sock
.
---------------------------------------------------------------------------- Monitored Database Information IMPORTANT: The agent user account specified below requires special MySQL privileges. Visit the following URL for more information: https://enterprise.mysql.com/docs/monitor/2.0/en/mem-install.html#mem-agent-rights MySQL Socket []:
The monitor agent always associates “localhost” with the TCP/IP address 127.0.0.1, not the MySQL socket. This is in contrast to the MySQL Command Line Tool, which connects using the MySQL socket by default on Unix, if the hostname “localhost” is specified.
If the MySQL server you wish to monitor has been started
with the --skip-networking
command option
then you will not be able to connect to it using TCP/IP, as
the server will not listen for TCP/IP connections. In this
case the monitor agent will need to be configured to use the
MySQL socket. This can be done during installation by
selecting “socket” rather than
“TCP/IP” and then specifying the MySQL socket
name. This can also be configured after installation by
editing the agent-instance.ini
configuration file, for further information on this refer to
Section 2.3.6.2, “MySQL Server (agent-instance.ini
) Configuration”.
If the MySQL server to be monitored has been started using
the command option --bind-address
then the
server will only listen for connections on the IP address
specified, that is, the IP address of the MySQL server. If
the monitor agent has been started using TCP/IP networking
and the default address of 127.0.0.1 it will not be able to
connect to the server to be monitored. Also, if
“localhost” is specified as the host name
during agent configuration, a connection will not be
established, as the server will be listening for connections
on the address specified with the
--bind-address
option, not 127.0.0.1.
Specify the user credentials for the MySQL server that you want to monitor:
MySQL Username []: service_agent
MySQL Password :
Re-enter :
Select whether you want to enable Query Analyzer. If you disable the Query Analyzer during installation, you will need to manually edit the configuration file to re-enable the Query Analyzer functionality. If you enable Query Analyzer (Proxy), you must specify the port on which the agent will listen for queries.
---------------------------------------------------------------------------- Query Analyzer Configuration MySQL Proxy enables query monitoring and analysis by listening on a specified port for client connections that are then passed through to a backend MySQL database server. It is not needed for basic monitoring functionality. Click here for more information. [Y/n]: Enable Proxy (recommended) [Y/n]: Proxy Port [6446]: Backend Host: 127.0.0.1 (cannot be changed) Backend Port: 3306 (cannot be changed)
For more information on enabling Query Analyzer if you disabled it during installation, see Chapter 9, The Query Analyzer Page.
Enter the details of the MySQL Enterprise Service Manager that you want to use with this agent. The configuration information required is available within the installation report generated when you installed MySQL Enterprise Service Manager
----------------------------------------------------------------------------
MySQL Enterprise Monitor Options
Hostname or IP address []: 192.168.0.197
Tomcat Server Port [18080]:
Tomcat SSL Port [18443]:
The agent and MySQL Enterprise Service Manager support using SSL for communication. If you want to enable SSL communication between the agent and the MySQL Enterprise Service Manager, you must reply Y to the following question.
Use SSL? [y/N]: Agent Username [agent]: Agent Password : Re-enter : ----------------------------------------------------------------------------
Before installation starts, you will be provided with a summary of the installation settings that you have specified:
Here are the settings you specified: Installation directory: /opt/mysql/enterprise/agent Monitored MySQL Database: ------------------------- Hostname or IP address: 127.0.0.1 Port: 3306 MySQL username:mysql_user
MySQL password:password
Query Analyzer Configuration ------------------------- Proxy Enabled: yes Proxy Port: 6446 MySQL Enterprise Manager: ------------------------------ Hostname or IP address:192.168.0.197
Tomcat Server Port: 18080 Tomcat SSL Port: 18443 Use SSL: 0 Agent username:agent
Press [Enter] to continue : ---------------------------------------------------------------------------- Setup is now ready to begin installing MySQL Enterprise Monitor Agent on your computer. Do you want to continue? [Y/n]: y
The installer will copy the necessary files and create the configuration file required to run the agent:
---------------------------------------------------------------------------- Please wait while Setup installs MySQL Enterprise Monitor Agent on your computer. Installing 0% ______________ 50% ______________ 100% ######################################### ---------------------------------------------------------------------------- Info to start MySQL Agent The MySQL agent was successfully installed. To start the MySQL Agent please invoke: /opt/mysql/enterprise/agent/etc/init.d/mysql-monitor-agent start Press [Enter] to continue : ---------------------------------------------------------------------------- Setup has finished installing MySQL Enterprise Monitor Agent on your computer.
Finally, you can read the supplied README
file when prompted. The file is provided within the
share/doc/README_en.txt
file within the
agent installation directory if you would like to read this
file separately.
For information on starting the agent, see Section 2.3.5.3, “Starting/Stopping the Agent on Unix”.
The MySQL Enterprise Monitor Agent can be started and stopped at any time. When not running, information about the current status of your server will not be available, and MySQL Enterprise Service Manager will provide a warning if an agent and the MySQL server that it monitors is unavailable.
If you are using Query Analyzer, then turning off the agent will prevent your applications from communicating with the MySQL server. See Chapter 9, The Query Analyzer Page.
You have the option of starting the Monitor Agent from the final
installation screen. Otherwise you can do this by going to the
Start Menu
and under
Programs
find MySQL
and
then the MySQL Enterprise Monitor Agent
entry. Simply select
the Start MySQL Enterprise Monitor Agent
option.
On Windows Vista or later, starting the agent requires
administrative privileges—you must be logged in as an
administrator. To start or stop the agent right-click the menu
item and choose the cmd
window right-click the
cmd
icon and choose the menu option.
To report its findings, the agent needs to be able to connect
to the dashboard through the port specified during
installation. The default value for this port is
18080
; ensure that this port is not
blocked. If you need help troubleshooting the agent
installation see,
Section 2.3.7, “Troubleshooting the Agent”.
Alternately, you can start the agent from the command line by entering:
shell> sc start MySQLEnterpriseMonitorAgent
or:
shell> net start MySQLEnterpriseMonitorAgent
You can also start the agent by issuing the command,
agentctl.bat start. Stop the agent by passing
the argument, stop
. This batch file is found
in the Agent
directory.
For confirmation that the service is running you can open the
Microsoft Management Console Services window. To do this go to
the Control Panel, find Administrative Tools
and click the link to Services
. Locate the
service named MySQL Enterprise Monitor Agent
and look under the Status column.
You may also start the agent from this window rather than from
the Start
menu or the command line. Simply
right-click MySQL Enterprise Monitor Agent
and choose
Start
from the pop-up menu. Starting the
agent from this window opens an error dialog box if the agent
cannot connect to the MySQL server it is monitoring. No error is
displayed if the agent is unable to connect to the
MySQL Enterprise Service Manager.
The pop-up menu for starting the agent also offers the option of stopping the agent. To stop the agent from the command line you only need type:
shell> sc stop MySQLEnterpriseMonitorAgent
or:
shell> net stop MySQLEnterpriseMonitorAgent
MySQLEnterpriseMonitorAgent
is the default
name of the Monitor Agent service. If you have added an
additional agent as described in
Section 2.3.6.2, “MySQL Server (agent-instance.ini
) Configuration”, replace
MySQLEnterpriseMonitorAgent
with the
appropriate agent name.
The script to start the agent on Mac OS X is located in the
/Applications/mysql/enterprise/agent/etc/init.d
directory. To start the agent navigate to this directory and at
the command line type:
shell> ./mysql-monitor-agent start
To stop the agent, use the stop
command:
shell> ./mysql-monitor-agent stop
If the agent cannot be stopped because the
pid
file that contains the agent's process ID
cannot be found, you can use kill to send a
TERM
signal to the running process:
shell> kill -TERM PID
If you are running more than one agent on a specific machine,
you must also specify the path to the ini
file when you are stopping the agent. Executing
mysql-monitor-agent stop
without an
ini
file will only stop the agent
associated with the default ini
file.
To verify that the agent is running use the following command:
shell> ./mysql-monitor-agent status
The resulting message indicates whether the agent is running or not. If the agent is not running, use the following command to view the last ten entries in the agent log file:
shell> tail /Applications/mysql/enterprise/agent/log/mysql-monitor-agent.log
For further information on troubleshooting the agent see Section 2.3.7, “Troubleshooting the Agent”.
Installation creates the directory
/Applications/mysql/enterprise/agent
with
the settings stored in the
mysql-monitor-agent.ini
file located directly
below this directory in the etc
directory.
The log
directory is also located
immediately below the agent
directory.
To see all the command-line options available when running the
monitor agent, navigate to the
/Applications/mysql/enterprise/agent/etc/init.d
directory and execute mysql-monitor-agent
help
. You should see the message:
Usage: ./mysql-monitor-agent {start|stop|restart|status} [ini-file-name]
The ini-file-name
option only needs to be
used if the ini
file is not installed to
the default location or you have changed the name of the
ini
file. You will need to use this option
if you are installing more than one agent on the same machine.
Pass the full path to the ini
file. For
example, after navigating to the
/Applications/mysql/enterprise/agent/etc/init.d
directory, issue the command:
shell> ./mysql-monitor-agent start /Applications/mysql/enterprise/agent/etc/new-mysql-monitor-agent
.ini
If you installed the agent as root
, on reboot
the mysql-monitor-agent
daemon will start up
automatically. If you installed the agent as an unprivileged
user, you must manually start the agent on reboot or write a
script to perform this task. Likewise, if you have added an
additional agent as described in
Section 2.3.6.2, “MySQL Server (agent-instance.ini
) Configuration”, and you wish to start this
agent on reboot, create a system initialization script
appropriate to your operating system. To determine whether the
agent is running or not navigate to the
init.d
directory and issue the command
./mysql-monitor-agent status
.
To report its findings, the agent needs to be able to connect
to the dashboard through the port specified during
installation. The default value for this port is
18080
; ensure that this port is not
blocked. If you need help troubleshooting the agent
installation see,
Section 2.3.7, “Troubleshooting the Agent”.
When installation is finished, you can start the monitor agent from the command line by typing:
shell> /opt/mysql/enterprise/agent/etc/init.d/mysql-monitor-agent start
For a non-root
installation the command would
be:
shell> /home/<user name>/mysql/enterprise/agent/etc/init.d/mysql-monitor-agent start
To stop the agent, use the stop
command:
shell> ./mysql-monitor-agent stop
If the agent cannot be stopped because the
pid
file that contains the agent's process ID
cannot be found, you can use kill to send a
TERM
signal to the running process:
shell> kill -TERM PID
If you are running more than one agent on a specific machine,
you must also specify the path to the ini
file when you are stopping the agent. Executing
mysql-monitor-agent stop
without an
ini
file will only stop the agent
associated with the default ini
file.
Likewise, when checking the status of an agent specify its
ini
file.
To verify that the agent is running use the following command:
shell> ./mysql-monitor-agent status
The resulting message indicates whether the agent is running or not. If the agent is not running, use the following command to view the last ten entries in the agent log file:
shell> tail /opt/mysql/enterprise/agent/log/mysql-monitor-agent.log
For further information on troubleshooting the agent see Section 2.3.7, “Troubleshooting the Agent”.
Installation creates the directory
/opt/mysql/enterprise/agent
with the
settings stored in the
mysql-monitor-agent.ini
file located directly
below this directory in the etc
directory.
The log
directory is also located
immediately below the agent
directory.
To see all the command-line options available when running the
monitor agent, navigate to the
/opt/mysql/enterprise/agent/etc/init.d
directory and execute mysql-monitor-agent
help
. You should see the message:
Usage: ./mysql-monitor-agent {start|stop|restart|status} [ini-file-name]
The ini-file-name
option only needs to be
used if the ini
file is not installed to
the default location or you have changed the name of the
ini
file. You will need to use this option
if you are installing more than one agent on the same machine.
Pass the full path to the ini
file. For
example, after navigating to the
/opt/mysql/enterprise/agent/etc/init.d
directory, issue the command:
shell> ./mysql-monitor-agent start /opt/mysql/enterprise/agent/etc/new-mysql-monitor-agent
.ini
If you installed the agent as root
, on reboot
the mysql-monitor-agent
daemon will start up
automatically. If you installed the agent as an unprivileged
user, you must manually start the agent on reboot or write a
script to perform this task. Likewise, if you have added an
additional agent as described in
Section 2.3.6.2, “MySQL Server (agent-instance.ini
) Configuration”, and you wish to start this
agent on reboot, create a system initialization script
appropriate to your operating system. To determine whether the
agent is running or not navigate to the
init.d
directory and issue the command
./mysql-monitor-agent status
.
To report its findings, the agent needs to be able to connect
to the dashboard through the port specified during
installation. The default value for this port is
18080
; ensure that this port is not
blocked. If you need help troubleshooting the agent
installation see,
Section 2.3.7, “Troubleshooting the Agent”.
mysql-monitor-agent.ini
)
Configurationagent-instance.ini
) Configuration
The MySQL Enterprise Monitor Agent is configured through files located within the
etc
directory within the directory where you
installed the agent.
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 Monitor 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 2.3.6.1, “MySQL Enterprise Monitor Agent (mysql-monitor-agent.ini
)
Configuration”. For details on
the content of the individual MySQL instance configuration files,
see Section 2.3.6.2, “MySQL Server (agent-instance.ini
) Configuration”.
The mysql-monitor-agent.ini
files contains
the base configuration information for the MySQL Enterprise Monitor 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.
#
# Refer to the documentation for more detailed information and
# instructions.
#
# Version: 20080718_230416_r7011
[mysql-proxy]
plugins=proxy,agent
agent-mgmt-hostname = http://agent:password@monitor-server:18080/heartbeat
mysqld-instance-dir= etc/instances
agent-item-files = share/mysql-proxy/items/quan.lua,share/mysql-proxy/items/items-mysql-monitor.xml
proxy-address=:6446
proxy-backend-addresses = 127.0.0.1:3306
proxy-lua-script = share/mysql-proxy/quan.lua
agent-uuid = 8770ead5-3632-4b29-a413-4a7c92437e26
log-file = mysql-monitor-agent.log
pid-file=/Applications/mysql/enterprise/agent/mysql-monitor-agent.pid
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:
plugins
: Configures the plugins to be
used by the agent. When monitoring servers you must have the
agent
plugin configured. If you want to
support Query Analyzer then you must also have the
proxy
module enabled. Plugins should be
specified as a comma separated list of plugin names.
If you selected to support Query Analyzer during
installation of the agent, the default value will be
proxy,agent
. If you disabled Query
Analysis during installation, the default value will be
agent
.
log-level
: Sets the logging level of the
agent. The default level is critical
.
Valid values for log-level
are as
follows:
debug
: Provides detailed information
about what the agent is doing and the information being
provided by the agent to the MySQL Enterprise Service Manager.
critical
: Lists critical messages
highlighting problems with the agent.
error
: Lists error messages.
warning
: Provides only warning
messages generated by the agent.
message
: Provides information about
the agent and basic processing information.
info
: Provides messages used for
informational purposes.
Be careful when setting the log-level
to debug
. Doing this will rapidly
increase 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.
agent-mgmt-hostname
: Sets the URL to use
when reporting information. This value will be automatically
set to your MySQL Enterprise Service Manager during installation.
mysqld-instance-dir
: Sets the directory
where the configuration files that specify the MySQL servers
to be monitored can be located.
agent-item-files
: Sets the information
that is provided up to the MySQL Enterprise Service Manager when the agent is
reporting status information. You should leave this item
with the default setting of the
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).
proxy-address
: Sets the address, port
number, or both for the proxy to listen to for connections.
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.
The default value is 6446. If you want to support a different local host name/IP address and port, specify the host name and the port number, separated by a colon.
proxy-backend-addresses
: Sets the host
name and port number to be used when communicating the
backend MySQL server when employing query analyzer. This is
the MySQL server where packets from the client are sent when
communicating with the proxy on the host name/port set by
the proxy-address
.
proxy-lua-script
: Sets the Lua script to
be used by the proxy when forwarding queries. To use Query
Analyzer, this parameter should be set to
share/mysql-proxy/quan.lua
. This is the
default value.
agent-uuid
: Sets the UUID (Universally
Unique ID) of the agent. This value should be unique for all
agents communicating with the same server, as the UUID is
used to uniquely ID the agent within MySQL Enterprise Service Manager
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 leavig this configuration
property blank.
log-file
: Sets the location of the log
file used to record information about the agent when it is
running. 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.
pid-file
: Sets the location of the file
used to record the Process ID of the agent. 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
installer.
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
You can monitor multiple MySQL servers (either on the same machine, or across different machines) using two different methods:
By using a single agent instance to monitor multiple MySQL servers. You can use this method if you want to monitor multiple servers, but do not want or need to support Query Analysis on the additional servers.
By using multiple copies of the MySQL Enterprise Monitor Agent to monitor each server individually. Using this method requires additional overhead to monitor each server, while also allowing you to supply Query Analyzer data.
Using a Single Agent Instance
Do not use the single agent instance method if you want to use Query Analyzer. If you set your application to use the proxy port provided by the single instance then the queries may not be directed to the correct server. Using Query Analyzer, the proxy, and the single agent instance method is not supported.
When using the single agent instance method, the agent will attempt to determine the right information about the backend server that it is monitoring to use the information when applying rule and advisor information. Currently, this operation is performed for only one of the servers in the list of configured servers. If the servers being monitoring are using different MySQL versions then the rules applied to the servers may be incorrect, and you could get wrong or misleading advice about issues or problems on a given server.
To use a single agent to monitor multiple instances, you can
create additional directories and configuration files within the
instances
directory for the agent. For
example, you can see the default structure of the agent
configuration directory:
./init.d ./init.d/mysql-monitor-agent ./instances ./instances/agent ./instances/agent/agent-instance.ini ./mysql-monitor-agent.ini
Within the instances
directory, you can add
further directories, one for each monitored server. Each
additional directory must have a suitable
agent-instance.ini
file containing the
connection information for the new MySQL server instance. For
example, the following structure demonstrates an agent
monitoring four MySQL servers:
./init.d ./init.d/mysql-monitor-agent ./instances ./instances/agent ./instances/agent/agent-instance.ini ./instances/mysql2 ./instances/mysql2/agent-instance.ini ./instances/mysql-rep ./instances/mysql-rep/agent-instance.ini ./instances/mysql-backup ./instances/mysql-backup/agent-instance.ini ./mysql-monitor-agent.ini
To add another MySQL monitored server, follow these steps:
Make sure that the MySQL instance that you want to monitor has a suitable user to use for connecting to the server. For more information, see Section 2.3.1, “Creating a MySQL User Account for the Monitor Agent”.
Copy an existing configuration directory and configuration files to the new directory:
shell> cp -R etc/instances/agent etc/instances/mysql2
Edit the configuration file within the new directory, for
example mysql2/agent-instance.ini
, and
set the user
, password
and either the hostname
and
port
, or socket
parameters.
Restart the agent:
shell> mysql-monitor-agent restart
Using Multiple Agent Instances
To use multiple agents to monitor multiple MySQL servers you need to create a new configuration structure for both the agent and the MySQL server instances you need to monitor, including the binaries and configuration files, and then update the configuration to set the corresponding parameters to monitor the new server. Using this method allows you to enable query analyis by redirecting requests to the target server using the built-in proxy service within the agent.
For example, the directory structure below shows the configuration directory for two agents monitoring a single MySQL server each:
./init.d ./init.d/mysql-monitor-agent ./instances ./instances/agent ./instances/agent/agent-instance.ini ./instances-second/agent ./instances-second/agent/agent-instance.ini ./mysql-monitor-agent.ini ./mysql-second-agent.ini
The mysql-monitor-agent.ini
file contains
the configuration for the first agent, with the MySQL servers
monitored defined within the instances
directory. The mysql-second-agent.ini
file
contains the configuration information for the second agent,
with the MySQL servers monitor defined within the
instances-second
directory.
To set up multiple agents:
Make sure that the MySQL instance that you want to monitor has a suitable user to use for connecting to the server. For more information, see Section 2.3.1, “Creating a MySQL User Account for the Monitor Agent”.
You need to generate a new UUID for the new agent:
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
Keep a record of the UUID to update the configuration file.
Note, the agent should not be running when the UUID is generated.
Copy the main agent configuration file, which is by default
in
/opt/mysql/enterprise/agent/etc/mysql-monitor-agent.ini
:
shell> cp mysql-monitor-agent.ini mysql-second-agent.ini
Edit the new configuration file, changing the following settings:
Change the mysqld-instance-dir
to the
new directory that will contain the individual MySQL
server configuration files.
Change the proxy-address
to a
different value than the first agent configuration.
Change the proxy-backend-addresses
to
specify the IP address and MySQL port number for the
MySQL server.
Change the agent-uuid
to the new
value obtained in an earlier step.
Change the log-file
parameter to
specify a different file to use when logging errors and
problems. You cannot log to the same file from two
different agents.
Change the pid-file
parameter to
specify the file that will be used to store the process
ID of the agent.
Copy an existing configuration directory and configuration files to the new directory:
shell> cp -R etc/instances etc/instances-second
Edit the configuration file,
instances/second/agent/agent-instance.ini
within the new directory, and set the
user
, password
and
either the hostname
and
port
, or socket
parameters.
With multiple instances, you must start each agent individually, specifying the location of the main configuration file. For example, to start the original (default) service:
shell> /opt/mysql/enterprise/agent/etc/init.d/mysql-monitor-agent start /opt/mysql/monitor/agent/etc/mysql-monitor-agent.ini
To start the second instance:
shell> /opt/mysql/enterprise/agent/etc/init.d/mysql-monitor-agent start /opt/mysql/monitor/agent/etc/mysql-second-agent.ini
Typically, the agent runs on the same machine as the MySQL server it is monitoring. Fortunately, this is not a requirement. If you want to monitor a MySQL server running on an operating system for which there is no agent available, you can install the agent on a machine other than the one hosting the MySQL server.
The process for installing an agent to monitor a MySQL server on
a remote machine is identical to the process described in
Section 2.3, “Monitor Agent Installation”. Follow the directions given
there, being careful to specify the correct IP address or host
name for the MySQL Enterprise Service Manager and likewise for the MySQL
server—since the agent is not running on the same machine
as the MySQL server, it cannot be the default,
localhost
.
Don't forget that the agent must be given rights to log in to
the MySQL server from a host other than
localhost
and that the port used by the MySQL
server, typically 3306
must be open for
remote access. For more information about the database
credentials required by agents see,
Section 2.3.1, “Creating a MySQL User Account for the Monitor Agent”.
The agent also needs to be able to log in to the
MySQL Enterprise Service Manager, typically using port 18080
,
so ensure that the appropriate port is open.
Remote agents do not report the OS information for either the host or the agent.
If your subscription level entitles you to replication autodiscovery, do not use remote monitoring with replication slaves or masters. The agent must be installed on the same machine as the server you are monitoring for discovery to work properly. For more information, see Chapter 10, The Replication Page.
If you run an SSH server on the machine that hosts the
MySQL Enterprise Service Manager and an SSH client on the machine that hosts the
agent, you can create an SSH tunnel so that the agent can bypass
your firewall. First, you need to make an adjustment to the
hostname
value specified in the
[mysql-proxy]
section of the
.ini
file. (For more information about the
contents and location of the .ini
file see
Section 2.3.6.1, “MySQL Enterprise Monitor Agent (mysql-monitor-agent.ini
)
Configuration”.) Stop the
agent and change the hostname
value as shown
in the following:
hostname = http://agent_name:password
@localhost:18080
/heartbeat
Replace the agent_name
and
password
with suitable values. Likewise
replace port 18080
if you are not running the
dashboard on this port. Use localhost
for the
host name, since the agent is connecting through an SSH tunnel.
Next, execute the following command on the machine where the agent is running:
shell> ssh -L 18080:Dashboard_Host:18080
-l user_name
-N Dashboard_Host
When prompted, enter the password for
user_name
.
If you are not running the MySQL Enterprise Service Manager on port
18080
, substitute the appropriate port
number. Likewise, replace Dashboard_Host
with
the correct value. user_name
represents a
valid operating system user on the machine that hosts the
MySQL Enterprise Service Manager.
Be sure to restart the agent so that the new value for the
hostname
takes effect. For instructions on
restarting the agent see:
Under Windows see, Section 2.3.5.1, “Starting/Stopping the Agent on Windows”.
Under Unix see, Section 2.3.5.3, “Starting/Stopping the Agent on Unix”.
Under Mac OS X see, Section 2.3.5.2, “Starting/Stopping the Agent on Mac OS X”.
For MySQL Enterprise Monitor to operate correctly, each agent must have a unique UUID to uniquely identify the agent with the MySQL Enterprise Service Manager.
Ensure that you do not reuse or duplicate a UUID. Running two agents with the same identification number yields unpredictable results
In Unix go to the command line and type:
shell> /opt/mysql/enterprise/agent/bin/mysql-monitor-agent --agent-generate-uuid
In Mac OS X go to the command line and type:
shell> /Applications/mysql/enterprise/agent/bin/mysql-monitor-agent --agent-generate-uuid
This should display a line similar to the following:
ee9296d7-f7cd-4fee-8b26-ead884ebf398
Paste this line into the [mysql-proxy]
section of the mysql-monitor-agent.ini
file
for the agent-uuid
parameter:
[mysql-proxy] ... agent-uuid=ee9296d7-f7cd-4fee-8b26-ead884ebf398
In Windows, go to the command line and change to the MySQL Enterprise Monitor Agent installation directory and update the UUID by executing mysql-monitor-agent -uf mysql-monitor-agent-3307.ini. For example:
C:\> cd C:\Program Files\MySQL\Enterprise\Agent C:\> mysql-monitor-agent -uf mysql-monitor-agent.ini (or your .ini file name)
This updates the configuration file directly with the new UUID.
The first step in troubleshooting the agent is finding out whether it is running or not. To do this see:
If incorrect credentials are specified for the agent login to the
MySQL server that it is monitoring, then the agent will not run on
start-up. Log in to the monitored MySQL server and check the
agent's credentials. Compare the values of the
Host
, User
, and
Password
fields in the
mysql.user
table with the values shown in the
[mysqld]
section of the
etc/instances/mysql/agent-instance.ini
. If
incorrect credentials are specified in the
ini
file, simply correct them and restart the
agent. Remember, changes to the ini
file do
not take effect until the agent is restarted.
The agent will not start up if incorrect credentials are specified for the service manager login. Using incorrect credentials for logging in to the service manager creates an entry in the agent log file. For the location of this log file see Section C.3, “Agent Log and PID Files”.
If the agent starts up but no server appears in the dashboard,
check the hostname
specified in the
[mysql-proxy]
portion of the
mysql-monitor-agent.ini
file. Incorrect
credentials, IP address, or port will all cause the MySQL server
to fail to appear in the dashboard. Also, ensure that the port
specified in this file is not blocked on the machine hosting the
MySQL Enterprise Service Manager.
An easy way to confirm that the agent can log in to the service
manager is to type
http://
into the address bar of your web browser, substituting the
appropriate host name and port. When the HTTP authentication
dialog box opens, enter the agent user name and password. If you
log in successfully, you should see the following message:
Dashboard_Host:18080
/heartbeat
<exceptions> <error>E1031: Agent payload parameter NULL.</error> </exceptions>
Despite the fact that the preceding listing shows an error, you have logged in successfully. This error appears because you have logged in but with no “payload”.
If you can log in successfully in the way described above and the
agent is running, then there are errors in the
mysql-monitor-agent.ini
file. Compare the
host name, port, agent name, and password found in the
ini
file with the values you entered into the
address bar of your web browser.
If HTTP authentication fails then you are using incorrect credentials for the agent. Attempting to log in to the service manager using incorrect credentials creates an entry in the agent log file. For the location of this log file see Section C.3, “Agent Log and PID Files”.
If no HTTP authentication dialog box appears, and you are unable
to connect at all, then you may have specified an incorrect host
name or port. Confirm the values you entered against those
described as the Application hostname and port:
in the configuration_report.txt
file. Failure
to connect could also indicate that the port is blocked on the
machine hosting the MySQL Enterprise Service Manager.
To check if a blocked port is the problem, temporarily bring down your firewall. If the agent is then able to connect, open up the port specified during installation and restart the agent. If necessary you can monitor outside the firewall using an SSH tunnel. For more information, see Section 2.3.6.5, “Monitoring Outside the Firewall with an SSH Tunnel”.
You can also check the agent error log file to help determine any problems. An error such as the following might indicate a blocked port:
(critical) connection to merlin-server
'http://agent:test@172.11.1.1:18080
/heartbeat' failed:
"connect() timed out!" error.
For the location of the agent error log file see, Section C.3, “Agent Log and PID Files”.
Setting the log-level
entry in your
ini
file is also a good debugging technique.
For more information on this subject see,
Section 2.3.6.1, “MySQL Enterprise Monitor Agent (mysql-monitor-agent.ini
)
Configuration”.
Running the agent from the command line sometimes displays errors that fail to appear in the log file or on the screen when the agent is started from a menu option. To start the agent from the command line see the instructions given at the start of this section.
If you have more than one agent running on the same machine, the
UUID
must be unique and the
log-file
and pid-file
values
must be different. For more information, see
Section 2.3.6.2, “MySQL Server (agent-instance.ini
) Configuration”.
If the agent is not running on the same machine that hosts the
MySQL server it is monitoring, then you must ensure that the
correct host
is specified for the agent
account. The correct port, typically 3306, must also be open for
remote login. For more information about remote monitoring see,
Section 2.3.6.4, “Configuring an Agent to Monitor a Remote MySQL Server”.
If the MySQL Enterprise Monitor Agent has been ungracefully terminated and
restarted (for example after being terminated using
kill), then you may see a
DuplicateAgentUuidException
error until the
original registration of the previous instance of the agent has
expired.
It is possible to install the MySQL Enterprise Monitor without any direct user
interaction. This is done by passing the command-line option
--mode unattended
to the installation file.
Using this mode and other command-line parameters means the user will not be prompted for input during installation. This is especially useful when doing multiple installations of the MySQL Enterprise Monitor.
However, rather than passing numerous parameters from the command
line, it is usually more convenient to save your options in a text
file and invoke the installer using the optionfile
option. This is a more reusable and less error-prone solution.
Before attempting an unattended installation, it is recommended that you install the MySQL Enterprise Monitor interactively at least once. Failing this, as a minimum, read the regular installation instructions since some tasks still remain after an unattended installation; you must configure the MySQL Enterprise settings, import the advisors, and start up all the services/daemons.
To view the available options for the monitor installer or for the
agent installer, at the command line type the executable file name
along with the --help
option.
On each platform, for each installer, the installer supports a number of different installation modes. Some of these are unique to an individual platform, others are available on all platforms. The table below summarizes the different options available for each platform.
Platform | Default Mode | win32 | gtk | xwindow | osx | text | unattended |
---|---|---|---|---|---|---|---|
Windows | win32 | Y | N | N | N | N | Y |
Unix | gtk | N | Y | Y | N | Y | Y |
Linux | gtk | N | Y | Y | N | Y | Y |
Mac OS X | win32 | N | N | N | Y | Y | Y |
The following listing shows the command line options for the MySQL Enterprise Service Manager.
--help Display the list of valid options --version Display product information --optionfile <optionfile> Installation option file Default: --mode <mode> Installation mode Default: win32 Allowed: win32 unattended --debugtrace <debugtrace> Debug filename Default: --installer-language <installer-language> Language selection Default: Allowed: en jp --installdir <installdir> Installation directory Default:/opt/mysql/enterprise/monitor/ --tomcatport <tomcatport> Tomcat Server Port Default: 18080 --tomcatshutdownport <tomcatshutdownport> Tomcat Shutdown Port Default: 18005 --tomcatsslport <tomcatsslport>Tomcat SSL Port Default: 18443 --usessl <usessl> Should communication between the Dashboard » and Service Manager be encrypted? Default: 0 --adminuser <adminuser> Repository Username Default: service_manager --adminpassword <adminpassword>Password Default: --dbport <dbport> Bundled MySQL Database Port Default: 13306
The options and their effect on installation are detailed below:
--help
Display the list of valid options.
--version
Display product and version information.
--optionfile
The path to the option file containing the information for the installation.
--mode
The installation mode to be used for this installation.
--debugtrace
The filename to be used for a debug trace of the installation.
--installer-language
The installer language; supported options are
en
for English and jp
Japanese.
--installdir
The installation directory for MySQL Enterprise Service Manager.
The default on Windows is C:\Program
Files\MySQL\Enterprise\Monitor
The default on Unix is
/opt/mysql/enterprise/monitor/
The default on Mac OS X is
/Applications/mysql/enterprise/monitor/
--tomcatport
The MySQL Enterprise Service Manager port;
The default is 18080.
--tomcatshutdownport
The MySQL Enterprise Service Manager Tomcat shutdown port.
The default is 18005.
--tomcatsslport
The MySQL Enterprise Service Manager SSL port.
The default is 18443.
--usessl
Enable support for SSL communication between the MySQL Enterprise Monitor Agent and MySQL Enterprise Service Manager.
The default is 0.
--adminuser
The MySQL Enterprise Service Manager user name.
The default is service_manager
.
The repository user name and password are stored in
unencrypted form in the
config.properties
file. To locate
this file on your operating system see
Section C.5, “The config.properties
File”.
--adminpassword
The MySQL Enterprise Service Manager password.
--dbport
The TCP/IP port for the Bundled MySQL database.
The default is 13306.
To view all the options available for an unattended
agent installation, invoke the agent
installer file passing in the help
option.
(Under Windows you must redirect the output to a file. You
should see a listing similar to the following:
The exact options may vary depending on the operating system on which you are executing the installer.
Usage: --help Display the list of valid options --version Display product information --optionfile <optionfile> Installation option file Default: --unattendedmodeui <unattendedmodeui> Unattended Mode UI Default: none Allowed: none minimal minimalWithDialogs --mode <mode> Installation mode Default: osx Allowed: osx text unattended --debugtrace <debugtrace> Debug filename Default: --installer-language <installer-language> Language selection Default: Allowed: en ja --installdir <installdir> Installation directory Default: --mysqlconnmethod <mysqlconnmethod> Default: tcpip Allowed: tcpip socket --mysqlhost <mysqlhost> MySQL hostname or IP address Default: 127.0.0.1 --checkmysqlhost <checkmysqlhost> Validate MySQL hostname or IP address Default: yes --mysqlport <mysqlport> MySQL Port Default: 3306 --mysqlsocket <mysqlsocket> MySQL Socket Default: --mysqluser <mysqluser> MySQL Username Default: --mysqlpassword <mysqlpassword> Password for mysql user Default: --enableproxy <enableproxy> Enable Proxy (recommended) Default: 1 --proxyport <proxyport> Proxy Port Default: 6446 --managerhost <managerhost> Hostname or IP address Default: --managerport <managerport> Tomcat Server Port Default: 18080 --managersslport <managersslport> Tomcat SSL Port Default: 18443 --usessl <usessl> Use SSL? Default: 0 --agentuser <agentuser> Agent Username Default: agent --agentpassword <agentpassword> Agent Password Default: --proxyuser <proxyuser> User Account Default: root
The options and their effect on installation are detailed below:
--help
Display the list of valid options
--version
Display product information, including the version number of the installer.
--optionfile <optionfile>
Specify the location of an option file containing the configuration options for this installation.
--unattendedmodeui
<unattendedmodeui>
The UI elements to use when performing an unattended
installation. The options are none
, show
now UI elements during the installation;
minimal
, show minimal elements during
installation; minimalWithDialogs
, show
minimal UI elements, but include the filled-dialog boxes.
The default is none
.
--mode <mode>
Specify the installation mode to use for this installation.
--debugtrace <debugtrace>
Set the filename to use when recording debug information during the installation.
--installer-language
<installer-language>
Set the language to be used for the installer.
--installdir <installdir>
Specify the directory where the software will be installed.
The default on Windows is C:\Program
Files\MySQL\Enterprise\Agent
The default on Unix is
/opt/mysql/enterprise/agent/
The default on Mac OS X is
/Applications/mysql/enterprise/agent/
--mysqlconnmethod <mysqlconnmethod>
Specify the connection method to use to connect to MySQL.
Options are tcpip
and
socket
.
The default is tcpip
.
--mysqlhost <mysqlhost>
MySQL hostname or IP address
The default is 127.0.0.1.
--checkmysqlhost <checkmysqlhost>
Validate the MySQL hostname or IP address
The default is yes
.
--mysqlport <mysqlport>
Specify the TCP/IP port to use when connecting to MySQL.
The default is 3306.
--mysqlsocket <mysqlsocket>
Specify the filename of the MySQL socket to use when communicating with the monitored MySQL instance.
--mysqluser <mysqluser>
Specify the username to use when connecting to the MySQL instance.
--mysqlpassword <mysqlpassword>
Specify the password to use when connecting to the MySQL instance.
--enableproxy <enableproxy>
Enable the Proxy. This is recommended and is required if you want to use Query Analyzer.
The default is 1 (use the proxy).
--proxyport <proxyport>
Specify the TCP/IP port to use for the proxy interface.
The default is 6446.
--managerhost <managerhost>
The hostname or IP address of the MySQL Enterprise Service Manager.
--managerport <managerport>
The port number of the MySQL Enterprise Service Manager.
The default is 18080.
--managersslport <managersslport>
The port number of the MySQL Enterprise Service Manager for SSL-based communication
The default is 18443.
--usessl <usessl>
Specifies whether SSL should be used to communicate with the MySQL Enterprise Service Manager.
--agentuser <agentuser>
Specify the agent username to be used when communicating with the MySQL Enterprise Service Manager.
--agentpassword <agentpassword>
Specify the agent password to be used when communicating with the MySQL Enterprise Service Manager.
--proxyuser <proxyuser>
The user account for the proxy server.
The default is root
.
For unattended installation on Windows, create an option file
named options.server.txt
. The following is an
example of what the contents of an option file might be.
debugtrace=C:\Program Files\MySQL\Enterprise\install.debugtrace.log mode=unattended installdir=C:\Program Files\MySQL\Enterprise tomcatport=8080 tomcatshutdownport=8005 tomcatsslport=8443 adminpassword=myadminpassword dbport=3300
This file identifies a directory and file name for a log file,
sets the mode
to unattended
,
and uses the installdir
option to specify an
installation directory. The meaning of the other options is fairly
self-evident.
Set the installdir
and
debugtrace
options to values appropriate to
your locale and operating system.
The only options that must be specified in an option file when
installing the MySQL Enterprise Service Manager are mode
(if
not specified at the command line),
installdir
, and
adminpassword
.
Check the options in your option file closely before installation; no warnings will be issued if there are errors.
Ensure that the monitor installer file and the options file are in
the same directory and, if you saved the options file as
options.server.txt
, you can invoke an
unattended installation from the command line by typing:
C:\ mysqlmonitor-version
-windows-installer.exe --optionfile options.server.txt
You can install the MySQL Enterprise Monitor Agent in exactly the same fashion.
Create an agent option file and call the agent installer using the
optionfile
option.
As a minimum for the agent installation, you must specify the
mode
(if not specified at the command line),
mysqluser
, installdir
,
mysqlpassword
, installdir
,
managerhost
, and
agentpassword
options. Create a file containing
these values and use it with the optionfile
option for unattended agent installation.
If you wish, you can create one script that calls both the Service
Manager and the Monitor Agent programs passing appropriate
optionfile
options.
For unattended installation on Unix, create an option file named
options.server.txt
. The following is an
example of what the contents of an option file might be for
installation on Unix.
debugtrace=/opt/mysql/enterprise/install.debugtrace.monitor.log mode=unattended installdir=/opt/mysql/enterprise/monitor tomcatport=8080 tomcatshutdownport=8005 tomcatsslport=8443 adminpassword=myadminpassword dbport=3300
This file identifies a directory and file name for a log file,
sets the mode
to unattended
,
and uses the installdir
option to specify an
installation directory. The meaning of the other options is fairly
self-evident.
Set the installdir
and
debugtrace
options to values appropriate to
your locale and operating system.
The only options that must be specified in an option file when
installing the MySQL Enterprise Service Manager are mode
(if
not specified at the command line),
installdir
, and
adminpassword
.
Check the options in your option file closely before installation; no warnings will be issued if there are errors.
Ensure that the monitor installer file and the options file are in
the same directory and, if you saved the options file as
options.server.txt
, you can invoke an
unattended installation from the command line by typing:
shell> mysqlmonitor-version
-installer.bin --optionfile options.server.txt
You can install the MySQL Enterprise Monitor Agent in exactly the same fashion.
Create an agent option file and call the agent installer using the
optionfile
option.
As a minimum for the agent installation, you must specify the
mode
(if not specified at the command line),
mysqluser
, installdir
,
mysqlpassword
, and
agentpassword
options. Create a file containing
these values and use it with the optionfile
option for unattended agent installation.
If you wish, you can create one script that calls both the Service
Manager and the Monitor Agent programs passing appropriate
optionfile
options.
The Service Manager does not automatically start up on rebooting. For more information, see Bug#31676.
The procedure for unattended agent installation under Mac OS X is identical to the procedure under Unix.
For instructions on starting the services needed by the MySQL Enterprise Service Manager see, Section 2.2.5, “Starting/Stopping the MySQL Enterprise Monitor Service on Windows” for Windows and, Section 2.2.6, “Starting/Stopping the MySQL Enterprise Monitor Service on Unix and Mac OS X” for Unix and Mac OS X.
For instructions on starting the MySQL Enterprise Monitor Agent see:
If you wish, you can script the startup of these services.
Depending upon how you plan to use the MySQL Enterprise Monitor, there are some tasks you may want to perform after installation. Find some suggestions in the following list:
Email settings: Test email notification by deliberately triggering an alert.
Auto Startup: On Unix systems, the MySQL Enterprise Service Manager does not automatically restart when the system is rebooted. You may wish to create a system initialization script appropriate to your operating system.
Log files: Check the log files for any irregularities. For the locations of the various log files see Appendix C, Files Associated with The MySQL Enterprise Monitor.
Agent Log file rotation: Implement log file rotation for the monitor agent.
Back up the repository: For a back-up strategy suitable to your circumstances, see the MySQL reference manual documentation.
Configuration backup: Back up
the mysql-monitor-agent.ini
file and the
associated instances
directory and
contents.
For more information about the
mysql-monitor-agent.ini
file see
Section 2.3.6, “Advanced Agent Configuration”.
Configuration file: Store the
configuration_report.txt
in a safe place.
There is no mechanism for retrieving the password stored in this
file.
Repository credentials: The
repository user name and password are stored in unencrypted form
in the config.properties
file. Take care to
protect this file.
Disk management: Remove installation files, and monitor the space used by the repository. Ensure that you have adequate disk space by regularly purging data. For more information, see Data Purge Behavior.
Firewall changes: You may want to limit or expand access to the MySQL Enterprise Service Manager.
Open ports: As with firewall changes, you may want to limit or expand access to the MySQL Enterprise Service Manager. The dashboard uses nonstandard ports, none of which are usually open by default.
Server upgrades: See Section 2.6.3.1, “Upgrading the Monitored MySQL Server” for instructions on upgrading a server.
Repository access: You may want to add other users.
You can upgrade MySQL Enterprise Monitor in a number of different ways:
For instructions on upgrading your existing installation, see Section 2.6.1, “Upgrading MySQL Enterprise Monitor”.
For more information on re-installing an existing installation, see Section 2.6.2, “Reinstalling MySQL Enterprise Monitor”.
To change an existing installation, such as changing the monitored server, see Section 2.6.3, “Changing Your MySQL Enterprise Monitor Installation”.
From time to time there may be updates to the MySQL Enterprise Service Manager or the MySQL Enterprise Monitor Agent. This section describes how to perform an update for either of these components.
You cannot use the update installers to change to a different operating system or chip architecture. For example, you cannot update a 32-bit Linux installation to a 64-bit version using an update installer—in cases such as this you must do a fresh installation.
The installation and configuration of MySQL Enterprise Monitor Agent must be standard before you start the installation. The update installer will not upgrade agents where you have changed or modified the filenames or directory layout of the installed agent, configuration files, or the startup files.
The name of the update file varies but it shows the target
operating system and the version the update applies to. If a
specific component is being updated it may also appear in the file
name. For example, a file named
would indicate a Windows update to MySQL Enterprise Service Manager version 2.0.0.
mysqlenterprisemanager-2.0.0-windows-update-installer.exe
You may install an update in the same way that you initially
installed the service manager or the agent; in
win32
or unattended
mode on
Windows in gtk
, text
,
xwindow
, or unattended
mode
on Unix and in osx
, text
,
or unattended
mode on OS X.
The method you use for upgrading MySQL Enterprise Monitor components will depend on the upgrade you are performing.
If you are upgrading between major versions (for example, from MySQL Enterprise Monitor 1.3 to merlin 2.0), you should shutdown the MySQL Enterprise Service Manager and each connected MySQL Enterprise Monitor Agent. Once you have shutdown each component, start by updating the MySQL Enterprise Service Manager, and then updating the MySQL Enterprise Monitor Agent on each monitored client.
If you are upgrading between the same major version, for example, MySQL Enterprise Monitor 2.0 to MySQL Enterprise Monitor 2.1, or a minor version, such as MySQL Enterprise Monitor 2.1.1 to MySQL Enterprise Monitor 2.1.2, you can shutdown only the component (agent, or server) you are updating. Using this method, you can perform a 'rolling' upgrade, where you shutdown a single MySQL Enterprise Monitor Agent, upgrade it to the latest agent version, and then restart the agent before moving on to the next monitored instance.
The upgrade installer will overwrite
items-mysql-monitor.xml
. On Windows this
file is found in the C:\Program
Files\MySQL\Enterprise\Agent\share\mysql-monitor-agent
directory and on Unix in the
/opt/mysql/enterprise/agent/share/mysql-monitor-agent
directory. You should back this file up if you have made any
changes to it.
If you use the Upgrade installer to update MySQL Enterprise Service Manager and
you have made any changes to the my.cnf
within your MySQL Enterprise Service Manager installation, any changes will be
lost. You should copy the existing my.cnf
file before starting the upgrade installer.
Otherwise, updating is a fairly straightforward process. Run the installation file and choose the directory of your current installation and whether or not you wish to back up your current installation. The time required to complete the process varies depending upon the nature of the update.
If you chose to back up your current installation, a directory
named backup
will be created in the current
installation directory. This directory will contain copies of the
directory or directories that were replaced during the update. In
cases where only specific files are replaced, the
backup
directory may contain only these
files. If you are unhappy with the update simply overwrite the new
files or directories with the originals found in the
backup
directory. Be sure to stop both the
MySQL Enterprise Service Manager and MySQL Enterprise Monitor Agent before restoring the original
files. You can delete or archive this directory when you are
satisfied that the update was successful.
If you choose to back up your current installation, the installer checks that there is adequate disk space for your repository backup. If there is not enough space, you are given the option of choosing another location; you may also choose not to back up the repository.
To update your Advisors see, Section 2.2.7.3, “Installing Advisors After Initial Log-in”.
To upgrade your existing installation from MySQL Enterprise Monitor 1.3 to MySQL Enterprise Monitor 2.0, you need to upgrade both your MySQL Enterprise Service Manager and your MySQL Enterprise Monitor Agent on each machine that you are monitoring.
To perform the update process you must use an
update
installer. This ensures that your
current configuration information is migrated to the new version
of MySQL Enterprise Service Manager.
Before you start the migration, shutdown your MySQL Enterprise Service Manager and MySQL Enterprise Monitor Agent on each monitored host. Then install the updated MySQL Enterprise Service Manager application to migrate the configuration and data of the main application and repository. Once the new MySQL Enterprise Service Manager is running, you can start to update and migrate each agent.
For more information on upgrading your MySQL Enterprise Service Manager, see Section 2.6.1.1.1, “Upgrading to MySQL Enterprise Service Manager 2.0”. For more information on upgrading an MySQL Enterprise Monitor Agent, see Section 2.6.1.1.2, “Upgrading to MySQL Enterprise Monitor Agent 2.0”.
Upgrading MySQL Enterprise Service Manager requires you to use on of the update installers. The update installer performs a number of operations during installation:
A new database, required to support 2.0 functionality, is created.
You core dashboard, user, and rule information is migrated from the old database to the new database.
The core configuration parameters for the MySQL Enterprise Service Manager are migrated from MySQL Enterprise Monitor 1.3 are migrated to MySQL Enterprise Monitor 2.0.
The installation of the new software using the update installer follows this basic sequence:
Request the installation language.
Confirm the location of the current MySQL Enterprise Service Manager installation.
Specify whether you want to keep a copy of the old server, application, and database files.
Configure the Tomcat server settings, including whether the new server should support SSL connections from agents.
If requested, the application and database information is backed up and upgraded, before the new application is installed.
The installation process is consistent for all platforms. A sample of the process for Max OS X has been provided below:
Double-click the update installer. The update installer
will have update
in the file name. For
example,
mysqlmonitor-2.0.0.7101-osx-update-installer.app
.
Confirm the language you want to use when installing the software.
Click
You will be presented with an information screen showing the application you are installing. Click
to continue.Specify, or locate, the previous installation of MySQL Enterprise Service Manager If you installed the server within the default location, the current version of the application should be located automatically.
The installer can keep a backup copy of your existing application, including keeping a complete backup of the data stored within your MySQL Enterprise Monitor repository database.
Specify the location of the backup (default is to use the
backup
directory within your
installation directory). Note that backing up the database
in addition to the main application will increase the
installation time as the files have to be copied. The
larger the size of your repository data, the longer the
installation process will take.
Specify the Tomcat Server options. The Tomcat Server Port is the default port you will use to access the MySQL Enterprise Dashboard. If you want to support agents using SSL to communicate to MySQL Enterprise Service Manager, you must check the Is SSL support required?
Confirm that you want to continue the installation. Once installation has started, the backup of you existing application (and database) will start, although the process may take some time. Wait until the process completes.
Once the process has completed you will be provided with a notification of the installation process, including how to uninstall the application if you want to do so in the future. If any errors occurred, they will be reported here.
The installation has now completed. You can automatically start the MySQL Enterprise Service Manager and view the attached Readme file by ensuring the checkboxes on this page are selected.
You can now quit the installer.
Once the installation has completed, the first time you login to MySQL Enterprise Dashboard you will be asked to provide your login credentials, if they do not already exist in the server configuration, or to provide a copy of the Advisor jar suitable for your MySQL Enterprise Service Manager version.
MySQL Enterprise Monitor has now been updated. You must update each of your agents to MySQL Enterprise Monitor Agent 2.0 to ensure that they are providing the correct information to MySQL Enterprise Service Manager
To upgrade an agent you should use a update
installer. This will migrate your configuration information,
simplifying the upgrade process significantly.
The agent log file,
mysql-monitor-agent.log
, if it exists,
will be retained during the upgrade. A new log file,
mysql-monitor-agent.log
is used by
MySQL Enterprise Monitor Agent 2.0.
The core sequence is the same on all platforms, the update process on Linux is shown below:
Start the update installer.
shell> ./mysqlmonitoragent-2.0.0.7101-linux-glibc2.3-x86-32bit-update-installer.bin
Set the language for the installation process.
Language Selection Please select the installation language [1] English [2] Japanese Please choose an option [1] :
Confirm or update the location of the installation directory of the previous version.
---------------------------------------------------------------------------- Welcome to the setup wizard for the MySQL Enterprise Monitor Agent Update ---------------------------------------------------------------------------- Please specify the directory that contains the previous installation of the MySQL Enterprise Monitor Agent Installation directory [/opt/mysql/enterprise/agent]:
Specify whether you want to create a backup of the current application and configuration information, and if so, where the backup directory should be created.
---------------------------------------------------------------------------- Current installation backup Do you want to create a backup during the update process? Backup the current installation [Y/n]: Y Backup directory [/opt/mysql/enterprise/agent/patchbackup]:
You will be asked whether you want to enable the Query Analyzer. The Query Analyzer enables you to monitor the execution stateistics for individual queries executed through your MySQL servers. To enable, you must specify the proxy port, MySQL server and MySQL server port that you want to use. If you do not enable Query Analyzer now, you can enable it later. See Chapter 9, The Query Analyzer Page.
----------------------------------------------------------------------------
Query Analyzer Configuration
MySQL Proxy enables query monitoring and analysis by listening on the port
specified below for client connections that are then passed through to a
backend MySQL database server. It is not needed for basic monitoring
functionality, but is required for query monitoring and analysis.
Visit the following URL for more information:
https://enterprise.mysql.com/docs/monitor/2.0/en/mem-query-analyzer.html
Enable Proxy (recommended) [Y/n]:
Proxy Port [6446
]:
Backend Host: 127.0.0.1 (cannot be changed)
Backend Port: 3306 (cannot be changed)
You are now ready to complete the installation. Confirm that you want to continue.
---------------------------------------------------------------------------- Setup is now ready to begin installing MySQL Enterprise Monitor Agent Update on your computer. Do you want to continue? [Y/n]: ---------------------------------------------------------------------------- Please wait while Setup installs MySQL Enterprise Monitor Agent Update on your computer. Installing 0% ______________ 50% ______________ 100% ######################################### ---------------------------------------------------------------------------- Setup has finished installing MySQL Enterprise Monitor Agent Update on your computer. Restart MySQL Enterprise Monitor Agent now [Y/n]: View Readme File [Y/n]: n
Before connecting your MySQL Enterprise Monitor Agent to your MySQL server you must update the grants for the MySQL Enterprise Monitor Agent. Connect to the MySQL server and run this statement to update the required grants:
GRANT CREATE, INSERT ON mysql.* TO 'mysqluser
'@'localhost
' IDENTIFIED BY 'agent_password
';
Replacing the mysqluser
and
agent_password
parameters with the values
used for connecting your agent to your MySQL server.
Once the update agent has communicated with the MySQL Enterprise Service Manager the core information about the agent and the MySQL server it is monitoring will be migrated to the new data format required by MySQL Enterprise Service Manager 2.0. To migrate the existing stored data, see Section F.9, “Migrating 1.3.x Historical Data to MySQL Enterprise Monitor 2.0”.
When upgrading to MySQL Enterprise Monitor 2.1 you should be aware of the following issues:
During the upgrade process, if you had previously set a Query Analyzer data purge value that was greater than the standard data purge value, the historical data collection purge period will be set to the Query Analyzer purge period. This will be logged in the upgrade log with the following notice:
getDataCollectionPurgeLifespan now: 4 weeks (was: 2 weeks)
The options available when performing an unattended MySQL Enterprise Service Manager update are as follows:
--help Display the list of valid options --version Display product information --optionfile <optionfile> Installation option file Default: --mode <mode> Installation mode (Windows)Default: win32 (Unix)Default: gtk (Mac OS X)Default: osx (Windows)Allowed: win32 unattended (Unix)Allowed: gtk text xwindow unattended (Mac OS X)Allowed: osx text unattended --debugtrace <debugtrace> Debug filename Default: --installer-language <installer-language> Language selection Default: Allowed: en jp --installdir <installdir> Previous Installation Default: --createDataBackup <createDataBackup> Default: 1 --backupDir <backupDir> Backup directory Default:
The options for an unattended update of the agent differ only in
that the createDataBackup
option is replaced
by createBackup
.
If you did not install the MySQL Enterprise Service Manager to the default
directory the installdir
option must be
specified. mode
must also be specified when
performing an unattended update. Otherwise, performing an
unattended update is identical to the process described in
Section 2.4, “Unattended Installation”.
In some cases you may want to reinstall MySQL Enterprise Monitor rather than updating your current installation. To reinstall rather than update MySQL Enterprise Monitor follow these steps:
Stop all the Monitor Agents
Run the uninstall
programs for both the
MySQL Enterprise Service Manager and the MySQL Enterprise Monitor Agent
Begin the new installation
To stop the Monitor Agents see:
Instructions for removing the MySQL Enterprise Service Manager and the MySQL Enterprise Monitor Agent are given in Section 2.7, “Uninstalling the MySQL Enterprise Monitor”.
This section describes the best practices to employ when changing your MySQL Enterprise Monitor installation.
When upgrading a monitored MySQL server first stop the agent. To stop the agent see:
Stop the MySQL server and perform the upgrade. For instructions on stopping and restarting the MySQL service under Windows see Section 2.2.5, “Starting/Stopping the MySQL Enterprise Monitor Service on Windows”.
To stop and restart the MySQL daemon under Unix and Mac OS X, see, Section 2.2.6, “Starting/Stopping the MySQL Enterprise Monitor Service on Unix and Mac OS X”.
Once the service/daemon is stopped you may upgrade your server. For instructions on upgrading your MySQL server see the reference manual pertaining to your server version. When the upgrade is complete restart the MySQL server.
The agent's log file will show that the server was down.
You need not reinstall the MySQL Enterprise Monitor Agent to change the MySQL server that it monitors. It is possible to adapt an existing agent so that it monitors a different server.
To do this you must stop the monitor agent and then remove the server that it is monitoring. To stop the agent see:
For instructions on removing a server see, Section 5.3.3, “Removing a Server From the Dashboard”.
Once the agent is stopped and the server is removed from the
Dashboard, changes may be made to the
mysql-monitor-agent.ini
, or the
agent-instance.ini
file within the agent
instances
instances directory. You can find
the location of the directory by examining the content of the
mysql-monitor-agent.ini
and checking the
value of the mysqld-instance-dir
parameter.
If you want to make changes to the monitored MySQL server, edit
the agent-instance.ini
file. Change the
user
, password
,
hostname
, and port
values
if required. For more information, see
Section 2.3.6.2, “MySQL Server (agent-instance.ini
) Configuration”.
To change other settings, such as enabling proxy support
(required for Query Analyzer), the management host, or the port
number used by the agent, modify the
mysql-monitor-agent.ini
file. For more
information, see
Section 2.3.6.1, “MySQL Enterprise Monitor Agent (mysql-monitor-agent.ini
)
Configuration”.
To restart the agent see:
If you are adapting an existing agent to monitor a remote server make sure that the agent has the credentials for remote access and that the port on the remote MySQL server instance is open. For more information, see Section 2.3.6.4, “Configuring an Agent to Monitor a Remote MySQL Server”.
If you experience difficulties starting the agent, check Section 2.3.7, “Troubleshooting the Agent”.
Log in to the Dashboard and you should find your new server in
the All Servers
group.
In some situations you may need to bring down a monitored server. When this is necessary, it is good practice to stop the agent first—doing so will avoid generating a “Server is unreachable” event.
For instance, suppose you need to stop the server to do a backup. The steps to follow are:
Stop the agent
Stop the service/daemon
Perform the backup
Restart the service/daemon
Restart the agent
To stop or start the agent see:
To stop the MySQL service/daemon see the MySQL reference manual for your server version. You can find the manual online at http://dev.mysql.com/doc.
Follow these steps and there will be no “noise” associated with backing up your server. In contrast, if you leave the agent running while bringing down the server, you will generate a “Server is unreachable” event.
As an alternative to stopping the agent, you can change the logic associated with a rule. For instance, you could alter the threshold of the rule “Server is unreachable”:
%server.reachable% == THRESHOLD
to:
%server.reachable% == THRESHOLD && CURTIME() NOT BETWEEN '22:00:00' AND '23:00:00'
This would effectively blackout the rule between 10 and 11 pm, during which time you could perform a backup.
For more information about editing rules see Section 6.3, “Editing Built-in Rules”. To blackout all events associated with a specific server or group of servers see Section 6.7, “Advisor Blackout Periods”.
Removal of the MySQL Enterprise Monitor requires removal of the MySQL Enterprise Service Manager and the MySQL Enterprise Monitor Agent Service. In some circumstances, when running multiple agents on one machine for instance, you may not want to remove the entire MySQL Enterprise Monitor Agent Service but only a single monitored server.
Removing the MySQL Enterprise Service Manager
Remove the MySQL Enterprise Service Manager by going to the Control
Panel
and choosing Add or Remove
Programs
. Find the entry for MySQL Enterprise
Monitoring and Advisory Service
and remove it. During
the uninstall process you will be given the option of saving
existing data and log files. Choose this option if you plan to
reinstall the MySQL Enterprise Monitor.
If you are not saving existing data, after MySQL Enterprise Service Manager has
been removed you may delete the C:\Program
Files\MySQL\Enterprise\Monitor
directory.
If you chose not to remove existing data and log files when
uninstalling MySQL Enterprise Service Manager do
not remove the
C:\Program Files\MySQL\Enterprise\Monitor
directory. Doing so will delete these files.
If you added the Tomcat/Apache web server to the list of Windows
firewall exceptions, remove this service by opening the
Windows Firewall
from the Control
Panel
. Choose the Exceptions
tab and
delete the Tomcat/Apache
entry.
Removing MySQL Enterprise Monitor Services Only
When the MySQL Enterprise Service Manager is installed, the Tomcat/Apache and MySQL server services are started. It is possible to remove these services without also removing your MySQL Enterprise Service Manager installation. For more information about these services see, Section 2.2.5, “Starting/Stopping the MySQL Enterprise Monitor Service on Windows”.
Do this by finding the MySQL Enterprise Monitor
menu option and
choosing Services
and then Uninstall
MySQL Enterprise Monitor Services
. This will remove all the services
associated with MySQL Enterprise Service Manager.
You can confirm that these services have been removed by checking services in the Microsoft Management Console Services window.
If you wish to reinstall these services you can do this by using
the Install MySQL Enterprise Monitor Services
menu option.
It is also possible to remove services using the
mysqlmonitorctl.bat
file found in the
C:\Program Files\MySQL\Enterprise\Monitor
directory. To see the available options, go to the command line
and type: myqlnetworkctrl help
. This batch
file is discussed in more detail in
Section 2.2.5, “Starting/Stopping the MySQL Enterprise Monitor Service on Windows”.
To remove the Monitor Agent itself, open the Control
Panel
and choose Add or Remove
Programs
. Find the entry for MySQL Enterprise
Monitor Agent
and remove it. This will execute the
uninstall program located in the C:\Program
Files\MySQL\MySQL\Enterprise\Agent
directory.
If you are running more than one agent on the same machine and
wish to remove only one of the agents, do
not remove the MySQL
Enterprise Monitor Agent
entry from the Add
or Remove Programs
menu. To remove a single agent see
Removing a Single Agent.
After removing the Monitor Agent you may also need to remove the
directories, C:\Program
Files\MySQL\Enterprise
and C:\Program
Files\MySQL\Enterprise\Agent
.
Removing the Monitor Agent in this fashion will remove the default
service. However, if you are running additional Monitor Agents as
described in Section 2.3.6.2, “MySQL Server (agent-instance.ini
) Configuration”, you will have to
remove those agents manually. See the next section for
instructions on doing this.
If you are running more than one agent on the same machine and
wish to remove only one of the agents, do
not remove the MySQL
Enterprise Monitor Agent
entry from the Add or
Remove Programs
menu. To remove a single agent and leave
other agents intact follow these steps:
Stop the agent
Confirm the location of the log files
Remove the agent as a service
Remove/Archive the associated files
It is best to stop the agent before removing it; for instructions on stopping an agent see, Section 2.3.5.1, “Starting/Stopping the Agent on Windows”.
You can confirm the location of the agent log files by checking
the ini
file. For more information on this
topic see Section 2.3.6.1, “MySQL Enterprise Monitor Agent (mysql-monitor-agent.ini
)
Configuration”.
Go to the command line and remove the MySQL Enterprise Monitor Agent as a Windows service by typing:
shell> sc delete AgentName
You can confirm that the agent has been removed by checking the Microsoft Management Console Services window. There should no longer be an entry for the removed agent.
You should also remove or archive any log or configuration files associated with this agent. If you have installed any additional agents, remove them in the same fashion.
Removing the MySQL Enterprise Service Manager
To remove the MySQL Enterprise Service Manager, find the
uninstall
file in the
/opt/mysql/enterprise/monitor
directory.
Execute this file by typing:
shell> ./uninstall
During the uninstall process you will be given the option of saving existing data and log files. Choose this option if you plan to reinstall the MySQL Enterprise Monitor.
If you are not saving existing data, after uninstalling the
MySQL Enterprise Service Manager you may remove the
/opt/mysql/enterprise/monitor
directory.
If you chose not to remove existing data and log files when
uninstalling the MySQL Enterprise Monitor do
not remove the
/opt/mysql/enterprise/monitor
directory;
doing so will delete these files.
On Red Hat Enterprise Linux 4 and Fedora Core 4, the uninstall script may not stop the Tomcat server. Do this manually if necessary. To do this see, Section 2.2.6, “Starting/Stopping the MySQL Enterprise Monitor Service on Unix and Mac OS X”.
There may be other Java processes running on your system. Be careful not to accidentally stop them.
On some Unix platforms, inluding HP-UX, you may have to manually
delete the uninstall
application and the
installation directory after you have execute the uninstall
process.
Prior to removal of the Monitor Agent Service you should stop any
agents. Do this by changing to the init.d
directory and issuing the command, ./mysql-monitor-agent
stop.
You will find the uninstall
file in the
/opt/mysql/enterprise/agent
directory.
Execute this file by navigating to this directory and typing:
shell> ./uninstall
After uninstalling the Monitor Agent you may remove the
/opt/mysql/enterprise/agent
directory.
Removing the Monitor Agent in this fashion will remove the default service, and all the configuration files for different instances.
If you are running more than one agent on the same machine and wish to remove only one of the agents, do not run the uninstall program. To remove a single agent and leave other agents intact follow these steps:
Stop the agent
Confirm the location of the log files
Remove the agent as a service
Remove/Archive associated files
It is best to stop the agent before removing it; for instructions on stopping an agent see Section 2.3.5.3, “Starting/Stopping the Agent on Unix”.
You can confirm the location of the agent log files by checking
the ini
file. For more information on this
topic see Section 2.3.6.1, “MySQL Enterprise Monitor Agent (mysql-monitor-agent.ini
)
Configuration”.
You may then remove the agent as a daemon by removing its entry in
the init.d
directory. You should also remove
or archive any log or configuration files associated with this
agent.
If you have installed any additional agents, remove them in the same fashion.
Removing the MySQL Enterprise Service Manager
To remove the MySQL Enterprise Service Manager, run the
uninstall.app
located in the
/Applications/mysql/enterprise/monitor/
directory, or the root directory of your MySQL Enterprise Service Manager
installation.
During the uninstall process you will be given the option of saving existing data and log files. Choose this option if you plan to reinstall the MySQL Enterprise Monitor.
If you are not saving existing data, after uninstalling the
MySQL Enterprise Service Manager you may remove the
/Applications/mysql/enterprise/monitor
directory.
If you chose not to remove existing data and log files when uninstalling the MySQL Enterprise Monitor do not remove the /Applications/mysql/enterprise/monitor directory; doing so will delete these files.
Prior to removal of the MySQL Enterprise Monitor Agent you should stop any agents.
Do this by changing to the init.d
directory
and issuing the command:
shell> ./mysql-monitor-agent stop
Run the uninstall.app
file located in the
/Applications/mysql/enterprise/agent
directory.
After uninstalling the MySQL Enterprise Monitor Agent you may remove the
/Applications/mysql/enterprise/agent
directory.
Removing the MySQL Enterprise Monitor Agent in this fashion will remove the default service, and all the configuration files for different instances.
If you are running more than one agent on the same machine and wish to remove only one of the agents, do not run the uninstall program.
To remove a single agent and leave other agents intact follow these steps:
Stop the agent
Confirm the location of the log files
Remove the agent as a daemon
Remove/Archive associated files
It is best to stop the agent before removing it; for instructions on stopping an agent see Section 2.3.5.2, “Starting/Stopping the Agent on Mac OS X”.
You can confirm the location of the agent log files by checking
the ini file. For more information on this topic see
Section 2.3.6.1, “MySQL Enterprise Monitor Agent (mysql-monitor-agent.ini
)
Configuration”.
You may then remove the agent as a daemon by removing its entry in
the init.d
directory.
You should also remove or archive any log or configuration files associated with this agent.
If you have installed any additional agents, remove them in the same fashion.