Apr 28, 2016

How to monitor MySQL in Zenoss

Years ago I discovered Zenoss Core and it has been my favorite monitoring system ever since. I've used lots of monitoring tools from Cacti to Nagios, from Manage Engine OpManager to Solar Winds and Zenoss has been the easiest to work with in my opinion.

Well the other day a coworker of mine asked if I could monitor a MySQL database server we had running on an Ubuntu Linux virtual machine. I found a ZenPack for MySQL, but I had a little trouble getting it to work at first. I finally did it though, and I'll tell you what I did.

  • I installed the MySQL Database Monitor Zenpack on my Zenoss server.
  • On the MySQL server I created a new MySQL user called zenoss by running the following:

  • In the configuration properties of the MySQL server you want to monitor modify the zMySQLConnectionString information with zenoss for the username, the password you created above and 3306 for the port number.
  •  In the Modular Plugins area for the MySQL server, add the MySQLCollector module and click save.
  

  • Now re-model your server and you should now see MySQL Servers and MySQL Databases under the components section.

Now you are done! It does take a while before you start to see graph information to appear, but it seems to work rather well.

One thing to note, in order for this to work, you have to configure your MySQL server to listen on port 3306. If you have an inclusive LAMP server that is only listening on 127.0.0.1 it won't work.

One thing that confused me at first was a note on the ZenPack page saying that the zMySQLConnectionString doesn't work right in Zenoss 4.1 so you have to set it up with a JSON list. For one, I don't know how to do that, and two it seemed to work fine for me on Zenoss 4.2.4.

All in all, this plugin seems to do the trick! How do you monitor your MySQL servers? What monitoring tools do you use? Let us know in the comments!



Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | stopping spam