Pages

2011/06/27

monitでMySQL Clusterの監視

monitの監視はサービスポートへの接続やプロトコルを少々やり取りさせるのが定石。

MySQL Clusterの管理ノード・データノードをTCPポートで監視する場合のMonit設定例。

 

ndb_mgmdの監視


ファイル、IPアドレスはそれぞれ適当に置き換え。
check process ndb_mgmd with pidfile /usr/local/mysql/mysql-cluster/ndb_1.pid
start "/usr/local/mysql/bin/ndb_mgmd"
stop "/usr/bin/pkill -QUIT ndb_mgmd"
if failed host 192.168.0.5 port 1186 type TCP
then restart
if 2 restarts within 3 cycles then timeout

 

ndbmtdの監視


ファイル、IPアドレスはそれぞれ適当に置き換え。
check process ndbmtd with pidfile /usr/local/mysql/mysql-cluster_data/ndb_11.pid
start "/usr/local/mysql/bin/ndbmtd"
stop "/usr/bin/pkill -QUIT ndbmtd"
if failed host 192.168.0.5 port 2202 type TCP
then restart
if 2 restarts within 3 cycles then timeout

 

localhost, 127/8 ではListenしてないためconfig.iniで書いているIPを対象にする。
 

0 件のコメント:

コメントを投稿