15.6.3.2. Installing the Monitor Agent on Unix and Linux

Note

To install the MySQL Enterprise Agent on Linux systems, you must have the Linux Standards Base (LSB) initialization functions installed. To check the existence of the LSB components, look 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-version-installer.bin (where version 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
Note

To install to the default directory (/opt/mysql/enterprise/agent), log in as root first. Installing as an unprivileged user installs to the /home/user_name/mysql/enterprise/agent directory.

To automatically start the agent upon rebooting, you must install while logged in as root. If you install as an unprivileged user, you must start the agent yourself after each reboot.

The following section covers installation from the command line. You can install the Monitor Agent graphically by running the installer from within a windows manager. In both cases, the steps are identical.

You can also install the Monitor Agent in unattended mode, for example to do multiple installations. For more information on unattended installation, see Section 15.6.4, “Unattended Installation”.

Note

To install multiple agents on the same machine, use the servicename option to the installer to set a unique service name each time. For more information, see installer_servicename

Begin installation from the command line by typing:

shell> ./mysqlmonitoragent-version-installer.bin --mode text

The following section shows the various options. Default values are indicated by square brackets; to select them, press Enter. Otherwise, enter a value of your choosing.

  1. First, 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] :
    
  2. Next, specify the directory in which to install the agent:

    ----------------------------------------------------------------------------
    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]:
    
  3. If the installer identifies that an existing version of the MySQL Enterprise Agent is installed, provide an alternative name for the installation. This defines the name of the file created in /etc/init.d used to start the agent. You can enter a different name to perform multiple installations.

  4. Specify the MySQL server to monitor. First, specify whether to use a TCP/IP or a 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] :
  5. Choose one or more operations for this agent to perform:

    • Enable monitoring a MySQL Server: This is the main operation of monitoring the MySQL server in terms of performance, security and availability.

    • Enable the MySQL Enterprise Agent Aggregator: It is used for future Connector plugins or user-written methods of transmitting query analyzer data to the MySQL Enterprise Service Manager.

    • Enable the MySQL Enterprise Agent Proxy Service: To study query analyzer information by sending your queries through the MySQL Enterprise Agent Proxy Service, switch this option on.

  6. If you chose to monitor a MySQL server, next you provide the connection options for communicating with the server.

    If you selected TCP/IP, you 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 []:
    
    Note

    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 via the MySQL socket by default on Unix, if the hostname “localhost” is specified.

    If the MySQL server to monitor has been started with the --skip-networking option, then you will not be able to connect to it via 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 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.

  7. Specify the user credentials for the MySQL server that you want to monitor:

    MySQL Username []: service_agent
    
    MySQL Password :
    
    Re-enter :
    
  8. The installer can create the MySQL Enterprise Agent user on the MySQL server that is required to connect to the server and obtain statistical information. The installer can create an account for you, or you can use an existing account. If you want the installer to create the user, enter the credentials of a user (such as the root user) that has the privileges to create the new user and grant it the privileges to monitor the server.

  9. If you want to use Query Analyzer with the MySQL Enterprise Agent Aggregator, configure the aggregator port and SSL settings. For more information on Query Analyzer, see Section 15.13, “The Query Analyzer Tab”.

    When MySQL Enterprise Agent Aggregator is enabled, the MySQL Enterprise Agent listens on a network port for connections from Connector plugins providing query analyzer data, forwarding the query analyzer information to MySQL Enterprise Service Manager. You can change the port number that MySQL Enterprise Agent listens for connections from connectors. If you configure the aggregator to support SSL connections, you must provide the location of the PEM and CA certificate files to be used for SSL support.

    The default port is 14000 for non-SSL communication, and 14443 for SSL communication.

  10. If you enable the MySQL Enterprise Agent Proxy Service for Query Analyzer, enter the configuration information. (the port on which the agent listens 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)
    

    If you disable the Query Analyzer during installation, you can re-enable the Query Analyzer by manually editing the configuration file. For instructions, see Section 15.13, “The Query Analyzer Tab”.

  11. Enter the details of the MySQL Enterprise Service Manager to use with this agent. You can retrieve this configuration information from the configuration_report.txt file 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. To enable SSL communication between the agent and the MySQL Enterprise Service Manager, reply Y to the following question.

    Use SSL? [y/N]:
    
    Agent Username [agent]:
    
    Agent Password :
    
    Re-enter :
    
    ----------------------------------------------------------------------------
        
  12. Before installation starts, you receive a summary of the installation settings that you 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
        
  13. The installer copies the necessary files and creates 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.
    
  14. Finally, you can read the supplied README file. The README is the share/doc/README_en.txt file within the agent installation directory.

For information on starting the agent, see Section 15.6.3.5.3, “Starting/Stopping the Agent on Unix”.

Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout