Skip to main content

MySQL Enterprise Monitoring Agent Installation



Mysql monitor is the nagios of Database. It is especially useful when you have a bunch of mysql DB servers to manage.

http://www.mysql.com/products/enterprise/monitor.html

Here are 8 steps to enable the monitoring agent on the DB server. It is assumed that the monitor server is already configured and active on a server (for e.g. 10.10.10.63)

1) sudo root
2) download agent
3) Change file permissions
chmod +x mysqlmonitoragent-2.3.1.2044-linux-glibc2.3-x86-64bit-installer.bin

4) Run file
[root@localhost]# ./mysqlmonitoragent-2.3.1.2044-linux-glibc2.3-x86-64bit-installer.bin

5) Start agent
/etc/init.d/mysql-monitor-agent start

6) check status
ps -ef | grep monitor

7) check log
cat /opt/mysql/enterprise/agent/mysql-monitor-agent.log

8) create mysql user for e.g.
mysql> grant all on *.* to 'agent'@'%' identified by 'agent';

_____

The following options must be selected very carefully or else monitor will not work as expected.

Installation directory
Installation directory [/opt/mysql/enterprise/agent]:


How will the agent connect to the database it is monitoring?
[1] TCP/IP
[2] Socket
Please choose an option [1] : 1

----------------------------------------------------------------------------
Components to Install

Monitoring:
Enable the Agent to monitor a MySQL Server [Y/n]: Y

Query Analyzer:
Enable the Aggregator to aggregate Query Analyzer data from an external source [y/N]: N
Enable MySQL Proxy to collect and aggregate Query Analyzer data [y/N]: y

----------------------------------------------------------------------------
Monitored Database Information

MySQL hostname or IP address [127.0.0.1]:

Validate MySQL hostname or IP address [y/N]: N

MySQL Port [3306]:

MySQL Username [agent]: agent

MySQL Password :
Re-enter :
----------------------------------------------------------------------------
Agent User Account Creation

[1] Yes, use the credentials below to create the Agent's user account
[2] No, I've already created the account and I'm sure it's correct
Please choose an option [1] : 2

----------------------------------------------------------------------------
MySQL Enterprise Monitor Options

Hostname or IP address []: 10.10.10.63

Tomcat Server Port [18080]:

Tomcat SSL Port [18443]:

Use SSL? [y/N]: y

Agent Username [agent]: agent

Agent Password :
Re-enter :

Comments

Popular posts from this blog

About MySQL - Database history Support and Versioning

About MySQL: MySQL was created by a Swedish company. David Axmark (left) and Michael "Monty" Widenius,  MySQL AB, founded by David Axmark, Allan Larsson and Michael "Monty" Widenius. Original development of MySQL by Widenius and Axmark began in 1994. The first version of MySQL appeared on 23 May 1995. It was initially created for personal usage from mSQL based on the low-level language ISAM, which the creators considered too slow and inflexible. They created a new SQL interface, while keeping the same API as mSQL. By keeping the API consistent with the mSQL system, many developers were able to use MySQL instead of the (proprietarily licensed) mSQL antecedent. Support: The MySQL server software itself and the client libraries use dual-licensing distribution. They are offered under GPL version 2, or a proprietary license. MySQL AB owns the copyright to the MySQL source code. This means that MySQL AB can distribute MySQL under several different l...

MySQL thread error code of 1032- Translate binlog completely to avoid error

Could not execute Update_rows event on table db.table; Can't find record in 'table', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's   master log mysql-bin.262297, end_log_pos 1983208 As of my knowledge the causing stop of slave SQL thread error code of 1032, due to lack of sync between Master - Slave. In our case, slave got an Update event form master, but that particular record was not available in the slave. (Of course, that was deleted on Master n Slave separately) You would get this error only if the binlog_format is set to ROW_BASED or MIXED mode. So, now check that particular binlog at that position where replication stopped with this error. When you convert the binlog with mysqlbinlog command, you may see some junk characters   where you were expecting some DMLs which caused the error(In our case its an Update statement). So you can use below command to translate binlog completely: mysqlbinlog --base64-output=DECO...

Load test Monitor script

 #!/bin/bash # Define logfile and other variables LOGFILE="/path/to/mongod.log"    # Path to MongoDB log file OUTPUT_FILE="/path/to/output.log" # Path where the output will be saved # Record the date echo "===== Date: $(date) =====" >> $OUTPUT_FILE # Record just the first line of w output (system uptime, users, and load average) echo "===== System Uptime, Users, and Load Average (w command) =====" >> $OUTPUT_FILE w | head -n 1 >> $OUTPUT_FILE # Record only the %user value from iostat echo "===== I/O Statistics (%user from iostat command) =====" >> $OUTPUT_FILE iostat | awk '/^ / {getline; print "User CPU: " $1 "%"}' >> $OUTPUT_FILE # Capture top processes, filtering for MongoDB (mongod) echo "===== Top Processes (top command) - Filter for mongod =====" >> $OUTPUT_FILE top -b -n 1 | grep mongod >> $OUTPUT_FILE # Filter MongoDB log for specific information (e....