<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-11 18:26 GMT+01:00 Maxim Terletskiy <span dir="ltr"><<a href="mailto:terletskiy@emu.ru" target="_blank">terletskiy@emu.ru</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Is there any way to check cluster health status? Can I see how much objects currently is under goal of replication?</blockquote>
<div><br></div><div>dog node recovery<br><br></div><div>is going to show the nodes that are receiving/rebuilding data.<br><br></div><div>E.g.<br><br>dog node recovery<br>Nodes In Recovery:<br>  Id   Host:Port         V-Nodes       Zone       Progress<br>
   0   <a href="http://192.168.10.4:7000">192.168.10.4:7000</a>     107   67807424        1.0%<br>   1   <a href="http://192.168.10.5:7000">192.168.10.5:7000</a>     207   84584640        0.1%<br>   2   <a href="http://192.168.10.6:7000">192.168.10.6:7000</a>      97  101361856        0.6%<br>
   3   <a href="http://192.168.10.7:7000">192.168.10.7:7000</a>     101  118139072        3.9%<br><br><br>> Maybe someone have scripts for nagios/zabbix?<span class=""><font color="#888888"><br></font></span><br></div>
<div>For nagios I think this may work fine:<br><br></div><div>#!/bin/bash<br></div><div>rows=$(dog node recovery | wc -l)<br></div><div>if [ $rows -ne 2 ]<br></div><div>then<br></div><div>    echo "Cluster is recovering data"<br>
</div><div>    exit 1<br></div><div>fi<br><br></div><div>This way you'll get a "yellow" worning till the cluster is rebuilding.<br></div><div>You might have to deal with execution permissions tough.<br></div>
<div><br></div><div>Another check you may want to run is if sheep daemon is running or not.<br></div><div>This may be done in two different way:<br><br></div><div>1) as a nrpe plugin (installed the sheep nodes)<br></div><div>
<br></div><div>nano check_sheep<br></div><div>#!/bin/bash<br></div><div>pgrep sheep || exit 2<br></div><div><br></div><div>2) checking the service<br></div><div>create the command check_sheep<br>/usr/lib/nagios/plugins/check_tcp -H $HOST$ -p 7000<br>
</div><div><br></div><div>I would recommend to monitor also zookeeper<br><br>command check_zookeepr<br>/usr/lib/nagios/plugins/check_tcp -H $HOST$ -p 2181<br></div></div></div></div>