MEM Agent
Check
/etc/init.d/mysql-monitor-agent status
Start
/etc/init.d/mysql-monitor-agent start
Stop
/etc/init.d/mysql-monitor-agent stop
Restart
/etc/init.d/mysql-monitor-agent restart
Update Password
su mysql -s /bin/bash -c "/mysql/mysql-agent/bin/agent.sh --agent-user=agent_user"
Install
Create Agent User
mysql -u root -p
CREATE USER 'agent_user'@'localhost' IDENTIFIED BY RANDOM PASSWORD;
GRANT SELECT, CREATE USER, REPLICATION CLIENT, SHOW DATABASES, SUPER, PROCESS
ON *.*
TO 'agent_user'@'localhost';
GRANT CREATE, INSERT
ON mysql.*
TO 'agent_user'@'localhost';
Run Agent Installer
cd /mysql
mkdir /mysql/agent-stage
mv ${ZIPFILE} /mysql/agent-stage
cd /mysql/agent-stage
unzip ${ZIPFILE}
chmod u+x *.bin
./mysqlmonitoragent-8.0.23.1314-linux-x86-64bit-installer.bin # 8.0.23
./mysqlmonitoragent-8.0.24.1327-linux-x86-64bit-installer.bin # 8.0.24
./mysqlmonitoragent-8.0.29.1359-linux-x86-64bit-installer.bin # 8.0.29
NOTE: If DISPLAY is set, then a GUI installer will launch, otherwise a text based installer will launch. These instructions assume no GUI.Language: English
Installation Directory: /mysql/mysql-agent
Connection: Socket (TCP/IP should only be used for remote agents or Windows hosts)
Monitor host and database
MySQL Enterprise Monitor Options
Hostname: mymemserver
Tomcat SSL Port: 18443
Agent username: agent
Validate: Y
Configure encryption: N
Configure less privileged accounts: N
MySQL Socket: /mysql/mysql.sock
Admin User: agent_user (password from above)
Monitor Group: mygroup
cd /mysql
rm -rf /mysql/agent-stage
UNIX Domain Sockets are considered more efficient and more secure than TCP/IP and should, therefore, be used where possible.
Uninstall
As root...
cd /mysql/mysql-agent
./uninstall
Upgrade
Copy the MEM Agent zip file to a suitable location (e.g. /u01/img/MEM/8.0.28/agent) and unzip...
cd /u01/img/MEM/agent8.0.28
unzip V1018523-01.zip
chmod u+x *.bin
./mysqlmonitoragent-8.0.28.1358-linux-x86_64-update-installer.bin
Troubleshooting
See logs in:
/mysql/mysql-agent/logs
If the agent fails to report into MySQL Enterprise Monitor after restart...
Connect to the agent_user via the mysql CLI on the same server as the agent...
mysql -u agent_user -p
The issue should disappear soon after you have done this.MEM Agent Failed To Connect With Error "Connect Access denied for user [username]" After Restart (Doc ID 2859703.1)
Bibliography
https://support.orracle.comExecuting agent.sh With "su mysql" Immediately Exit (Doc ID 2665231.1)How to Change the MySQL Enterprise Monitor Agent Service Manager Password; MEM (Doc ID 1965005.1)MEM Agent Failed To Connect With Error "Connect Access denied for user [username]" After Restart (Doc ID 2859703.1)