OK, we saw some ‘Too many connections‘ errors related to MySQL in various log files for the netbeans.org infrastructure. The easiest way to fix that, would be to increase the max_connections setting and be done with it.

But that brought a bigger problem back to light. We don’t really have a good understanding of what our MySQL servers are doing:-( So I was looking to improve our monitoring to include MySQL statistics as well.

Some background: We run on OpenSolaris, so a lot of stuff has to be compiled/ported to work in that setup. We use Zabbix as monitoring tool and Puppet as a configuration management tool.

So I found quickly the ‘Heavy MySQL monitoring solution‘ on the Zabbix wiki. But the problem was, we don’t really have PHP installed on our DB hosts. Instead we have Ruby installed on all our hosts because it’s the implementation language for Puppet. So I ended up translating the original PHP script into Ruby.

Here is my first version of the code: mysql_monitor.rb . It also has some changes where the original was somewhat Linux specific. It might change over the next couple of days as I experiment with it on different hosts. But the general setup works already.

Have fun,

— Marco