Download Deployment Installation Sample scripts Bugs

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. The RPMs and Binary builds for Linux 32/64-bit works for MySQL Cluster 7.0.x/7.1.x and later.

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 and RPM.

RPM

Package Arch Cluster version Filename
Controller 64-bit MySQL 5.5 and MySQL Cluster 7.x cmon-controller-1.1.16-1.x86_64.rpm
Agent 64-bit MySQL 5.5 and MySQL Cluster 7.x cmon-agent-1.1.16-1.x86_64.rpm
Controller 32-bit MySQL 5.5 and MySQL Cluster 7.x cmon-controller-1.1.16-1.i386.rpm
Agent 32-bit MySQL 5.5 and MySQL Cluster 7.x cmon-agent-1.1.6-1.i386.rpm
www no arch MySQL 5.5 and MySQL Cluster 7.x cmon-www-1.1.16-1.noarch.rpm

Quick Installation (cmon + mysqld + apache on the same computer, cluster somewhere else):

  • install a mysql server (this will hold the cmon database) and a web server (this has mostly been tested with apache) on a computer. The MySQL server should not be connected to the Cluster(s) that you wish to monitor.yum install mysql-server mysql php-mysql httpdIf you want, you can also follow this guide which describes how to setup apache,php, and mysql (you can ignore the phpmyadmin part).
  • Install the agent on the same computer as in the last step.rpm -i cmon-controller-1.1.16-1.x86_64.rpm (on all other computers install rpm -i cmon-agent-1.1.16-1.x86_64.rpm)
  • Install the www files on the same computer as in the last step (where you have the apache).rpm -i cmon-www-1.1.16-1.noarch.rpm
  • Install rrdtool for graphs,here are rpms or do (probably easiest): echo "[dag] name=Dag RPM Repository for Red Hat Enterprise Linux baseurl=http://apt.sw.be/redhat/el\$releasever/en/\$basearch/dag gpgcheck=1 gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt enabled=1" > /etc/yum.repos.d/dag.repo and then yum install rrdtool
  • On the controller: edit /etc/cmon.cnf and change connectstring/hostnames/ports etc if you need to, also set mode=controller
  • On the agents: edit /etc/cmon.cnf and change connectstring/hostnames/ports etc if you need to, also set mode=agent
  • /etc/init.d cmon start (tail -f /var/log/cmon.log to make sure it starts fine).
  • /usr/bin/cmon_rrd_all - run this, and see that it completes without errors. If no errors, then the /etc/cron.d/cmon job will work.

Binary packages (statically linked - packages will come soon)

Package Arch Cluster version Filename
All in one 64-bit MySQL 5.5, MySQL Cluster 7.x cmon-1.1.16-64bit-glibc23-mc70.tar.gz
All in one 32-bit MySQL 5.5, MySQL Cluster 7.x cmon-1.1.16-32bit-glibc23-mc70.tar.gz

Read CMON - Install Instructions for how to install

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


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.

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=X (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 - controller

Please note that cmon 1.1.16 is automatically installed when using the Configurators.

CMON controller is located on the ClusterControl Server.

Also check this blog post for more information on installation.

For 1.1.16, verify that you have the follow set correctly in the /etc/cmon.cnf/.

osuser=[you current user]
mode=controller
type=mysqlcluster
local_mysqlpassword=cmon
local_mysqlport=3306 [or the port you are using, the agent will connect to the local mysql server (if any) on this port]

Binary

  • become 'root'
  • cd /usr/local/
  • tar xvfz cmon-1.1.16-64bit-glibc23-mysqlcluster-70
  • ln -s cmon-1.1.16-64bit-glibc23-mysqlcluster-709 cmon
  • cd cmon/bin
  • ./cmon_install.sh
  • Issue the GRANTs that are printed out.
    1.1.16: Also issue GRANTs for each agent host, so that they are allowed to connect to the CMON DB (i.e, most typicall the host where you install the controller).

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)

Installation - agent

CMON agent is located on all other nodes except the Controller. .

Binary

  • become 'root'
  • cd /usr/local/
  • tar xvfz cmon-1.1.16-64bit-glibc23-mc70.tar.gz
  • ln -s cmon cmon-1.1.16-64bit-glibc23-mc70 cmon
  • cp cmon/etc/cmon.cnf.agent  /etc/cmon.cnf
  • vi /etc/cmon.cnf
    Make sure you have the correct settings for:

    osuser=[you current user]
    mode=agent
    type=mysqlcluster
    local_mysqlpassword=cmon
    local_mysqlport=3306 [or the port you are using, the agent will connect to the local mysql server (if any) on this port]

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)


Sample scripts

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

script description
get_cluster_status.sh Get the status of MySQL Cluster
get_node_ids.sh Get the node ids for a node type (ndb_mgmd, ndbd, mysqld,api)
get_node_status.sh Get 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)