How to Setup MySql Monitoring with the MySQLMonitor ZenPack.

From SysAdminWiki

Jump to: navigation, search
  • 1. Download and install the ZenPack from here. If your not sure how to install a ZenPack yet follow this article. Once installed you will have a new Zenpack called MySQLMonitor and new template under /Devices/Server called MySQL.
  • 2. Next we must set our mysql username/password into zProperties for which ever devices we have want to monitor. You can find the zProperties for the specific device by browsing to the device status page and clicking on zProperties, which is under the More menu of the drop down menu.
  • 3. Next you will need to apply this to which ever devices you would like to monitor. This is done by browsing into the device status page and clicking on Templates from the drop down -> More menu. When you are on the Performance Templates page, click Add Template and enter 'MySQL' for the ID name. That will bind that Template to that specific device and if your MySQL access is setup up properly will begin monitoring MySQL for you.


Troubleshooing

  • Most of the problems with setting this plugin up comes from your mysql user not being able to connect remotely to your database. You can fix this issue with following:

Add permissions for your zenoss user to connect to the mysql database

Apply this fix if you are seeing errors like:

MySQL Error: (1130, "Host '192.168.2.10' is not allowed to connect to this MySQL server")
mysql> GRANT ALL PRIVILEGES ON *.* TO 'typeusername'@'localhost' IDENTIFIED BY 'typepasswordhere' WITH GRANT OPTION; 

mysql> GRANT ALL PRIVILEGES ON *.* TO 'typeusername'@'%' IDENTIFIED BY 'typepasswordhere' WITH GRANT OPTION; 
 

OR

mysql> GRANT ALL PRIVILEGES ON *.* TO 'typeusername'<ipofhostyouarecomingfrom>'%' IDENTIFIED BY 'typepasswordhere' WITH GRANT OPTION; 


  • Another possibility is that you only have MySQL listening/serving 'localhost'. You can correct this by adding a line for your addrss in the /etc/mysql/mf.cnf file:
bind-address            = 127.0.0.1
bind-address            = 192.168.2.10

So we added the 'bind-address = <yourserverip>' line just under the existing 127.0.0.1 line. Restart mysql and try to connect again.

Personal tools
Advertisement