- MySQL 5.1 Reference Manual :: 15 MySQL Enterprise Monitor :: 15.3 Installation and Upgrades :: 15.3.3 Monitor Agent Installation :: 15.3.3.5 Starting/Stopping the MySQL Enterprise Monitor Agent
-
- MySQL 5.1 Reference Manual
- Preface, Notes, Licenses
- 1 General Information
- 2 Installing and Upgrading MySQL
- 3 Tutorial
- 4 MySQL Programs
- 5 MySQL Server Administration
- 6 Backup and Recovery
- 7 Optimization
- 8 Language Structure
- 9 Internationalization and Localization
- 10 Data Types
- 11 Functions and Operators
- 12 SQL Statement Syntax
- 13 Storage Engines
- 14 High Availability and Scalability
- 15 MySQL Enterprise Monitor
- 16 Replication
- 17 MySQL Cluster NDB 6.X/7.X
- 18 Partitioning
- 19 Stored Programs and Views
- 20 INFORMATION_SCHEMA Tables
- 21 Connectors and APIs
- 22 Extending MySQL
- A MySQL 5.1 Frequently Asked Questions
- B Errors, Error Codes, and Common Problems
- C MySQL Change History
- D Restrictions and Limits
- Index
- Standard Index
- C Function Index
- Command Index
- Function Index
- INFORMATION_SCHEMA Index
- Transaction Isolation Level Index
- JOIN Types Index
- Operator Index
- Option Index
- Privileges Index
- SQL Modes Index
- Status Variable Index
- Statement/Syntax Index
- System Variable Index
[+/-]
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.
Warning
If you are using Query Analyzer, then turning off the agent will prevent your applications from communicating with the MySQL server. See Section 15.10, “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 underPrograms
findMySQL
and then theMySQL Enterprise Monitor Agent
entry. Simply select theStart MySQL Enterprise Monitor Agent
option.Note
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
menu option. The same restriction applies to starting the agent from the command line. To open an administratorcmd
window right-click thecmd
icon and choose the menu option.Warning
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 15.3.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 theAgent
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 on the link toServices
. Locate the service namedMySQL 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 clickMySQL Enterprise Monitor Agent
and chooseStart
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
Note
MySQLEnterpriseMonitorAgent
is the default name of the Monitor Agent service. If you have added an additional agent as described in Section 15.3.3.6.2, “MySQL Server (agent-instance.ini
) Configuration”, replaceMySQLEnterpriseMonitorAgent
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 aTERM
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. Executingmysql-monitor-agent stop
without anini
file will only stop the agent associated with the defaultini
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 15.3.3.7, “Troubleshooting the Agent”.
Installation creates the directory
/Applications/mysql/enterprise/agent
with the settings stored in themysql-monitor-agent.ini
file located directly below this directory in theetc
directory. Thelog
directory is also located immediately below theagent
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 executemysql-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 theini
file is not installed to the default location or you have changed the name of theini
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 theini
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
.iniIf you installed the agent as
root
, on reboot themysql-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 15.3.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 theinit.d
directory and issue the command./mysql-monitor-agent status
.Warning
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 15.3.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 aTERM
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. Executingmysql-monitor-agent stop
without anini
file will only stop the agent associated with the defaultini
file. Likewise, when checking the status of an agent specify itsini
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 15.3.3.7, “Troubleshooting the Agent”.
Installation creates the directory
/opt/mysql/enterprise/agent
with the settings stored in themysql-monitor-agent.ini
file located directly below this directory in theetc
directory. Thelog
directory is also located immediately below theagent
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 executemysql-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 theini
file is not installed to the default location or you have changed the name of theini
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 theini
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
.iniIf you installed the agent as
root
, on reboot themysql-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 15.3.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 theinit.d
directory and issue the command./mysql-monitor-agent status
.Warning
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 15.3.3.7, “Troubleshooting the Agent”.