CMON monitors all events and information that you can get from MySQL Cluster.
Some of the things that CMON monitors:
- Cluster status (starting, started, stopped, recovering, degraded etc)
- Data node status (started, stopped, starting 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
CMON uses the Management API to collect information from MySQL Cluster and puts this information in a MySQL database, so it can be queried using SQL. This makes it very easy to write scripts around it and there are some sample scripts on the CMON web page.
# Get the status of Cluster for cluster with clusterid=1:If you want you can also view the Cluster from a web interface (requires PHP), and you can get graphs using RRD.
root@centos4-1 bin]# ./get_cluster_status.sh --clusterid=1
STARTED
# Get the list of node ids for type NDBD so that we can iterate over them easily.
[root@centos4-1 bin]# ./get_node_ids.sh --clusterid=1 -t NDBD
3 4
# Get the status of the node 3
[root@centos4-1 bin]# ./get_node_status.sh --clusterid=1 --nodeid=3
STARTED
Installation is very simple, just run the cmon_install.sh script that is part of the package which will ask you a number of questions and write a configuration file.