Severalnines


CMON - the Cluster Monitor for MySQL Cluster

CMON is the most comprehensive monitor for MySQL Cluster and collect all information that is possible to collect from the data nodes and management servers. It can also monitor MySQL servers and gather statistics. Alarms are raised if problems occurs (e.g a node is down or datamemory usage is too high) and cleared when appropriate measures have been taken. Binary builds exists for Linux 32/64-bit for MySQL Cluster 7.0.9.

Features

  • Cluster status (started, stopped, recovering, degraded etc)
  • Data node status (started, stopped, recovering, degraded etc)
  • Application (mysqld) node status (connected/disconnected)
  • DataMemory/IndexMemory/Tablespace utilization
  • Statistics from data nodes
  • Statistics from mysql servers
  • Replication (basic currenty) support -picks up if a mysql server is a slave and checks if is running or not
  • Alarm generation - contact 'info (at) severalnines.com' for more information

A web interface allows you to view graphs and inspect the health of all your MYSQL Clusters, from one single point. CMON can also be run head-less, and since the status and statistics information is stored in a database in a MySQL server (CMON database), it can be queried from SQL. Below you willl find information how to download and to install it.

Download

Binary packages (statically linked - RPM and Debian packages will come soon)

For other versions/platforms contact 'support (at) severalnines (dot) com

OSArchCluster versionFilename
Linux32-bit7.0.9 and latercmon-1.0.2-32bit-glibc23-mysqlcluster-709.tar.gz
Linux64-bit7.0.9 and latercmon-1.0.2-64bit-glibc23-mysqlcluster-709.tar.gz
Linux64-bit7.0.9 and latercmon-1.0.3-64bit-glibc23-mysqlcluster-709.tar.gz

This cmon.pdf describes the deployment.

Source code

The source has been tested on CentOS, Fedora, and MacOS X, and should compile for MySQL Cluster 6.2, 6.3 and 7.0 (cmon has been tested most on this version).

cmon-1.0.2.tar.gz

See the INSTALL-HOWTO for how to build the source distribution

You must have MySQL Cluster 6.2/6.3/7.0 (binaries, includes and libraries) on the machine where you are building CMON. CMON uses the Cluster Direct API to fetch some data.

Deployment

The easiest way is to install cmon co-located with the following:
  • a webserver with php and mysql support installed
  • rrdtool
  • a mysql server that will store the cmon database (does not have to be connected to MySQL Cluster, but is recommended to be)
  • If you build from source you need to have MySQL Cluster installed on the host you are building CMON on.

The cmon_install.sh script supports the deployment listed above.

This cmon.pdf also describes the deployment.

You also need to have one free [mysqld] slot for CMON to connect to cluster. ndb_mgm -e show should printout: ndb_mgm -e "show" Connected to Management Server at: localhost:1186 Cluster Configuration --------------------- ... id=6 (not connected, accepting connect from localhost) Please note that "localhost" can be another hostname/ip-address and it must match the hostname where you start cmon, or accept "any" host! If you don't have a free slot, you must add one [mysqld] in config.ini and restart the management server(s) and data nodes.

Installation

Also check this blog post for more information on installation.

Binary

  • become 'root'
  • cd /usr/local/
  • tar xvfz cmon-1.0.0-64bit-glibc23-mysqlcluster-709
  • ln -s cmon-1.0.0-64bit-glibc23-mysqlcluster-709 cmon
  • cd cmon/bin
  • ./cmon_install.sh
  • Issue the GRANTs that are printed out
when you have answered the setup questions and done the GRANTs:
  • /etc/init.d/cmon start
  • cmon will printout some text and daemoize if all is well and write output to syslog (you are recommended to tail -f /var/log/messages to ensure all is fine)

Source

See INSTALL-HOWTO in the source tar-ball.

You must have the cluster binaries (and libraries and include files) on the computer where you will compile CMON!

Sample scripts

To install - copy the scripts to e.g, /usr/local/cmon/bin/

scriptdescription
get_cluster_status.shGet the status of MySQL Cluster
get_node_ids.shGet the node ids for a node type (ndb_mgmd, ndbd, mysqld,api)
get_node_status.shGet the node status for a node type (ndb_mgmd, ndbd, mysqld,api)

Bugs

Click here to file bug reports! Currently, launchpad is used for bug mangement. Please include as much information as possible in the bug reports (if it reproducable, steps to reproduce, log files etc)