<div dir="ltr">Great! will implement the solution to set the color to green if bastion host is not available.<div><br></div><div>BTW .... all the hosts i m monitoring are inside amazon vpc and xymon is outside of vpc. So xymon cant reach to the clients, it has to go through bastion host, so i cant do the netcat to any clients other than bastion.</div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 1, 2013 at 8:44 PM, Jeremy Laidman <span dir="ltr"><<a href="mailto:jlaidman@rebel-it.com.au" target="_blank">jlaidman@rebel-it.com.au</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><p dir="ltr">On Nov 1, 2013 10:50 PM, "deepak deore" <<a href="mailto:deepakdeore2004@gmail.com" target="_blank">deepakdeore2004@gmail.com</a>> wrote:<br>


><br>
> As ec2 instances by default doesn't respond icmp and I dont want to enable icmp and ssh access to xymon server, what could be the best way to check the instance's availability. </p>
</div><p dir="ltr">Can you attempt a connection on an unused port (eg 443 or 25) and see if you get an "ICMP port unavailable" message indicated by a "connection refused" result in netcat? That should be as effective as a ping.</p>

<div class="im">

<p dir="ltr">> Currently in my env i m doing following to check the availability:<br>
><br>
> 1. Created server ext script which connects to bastion host and from there it checks the ssh connection to the server.<br>
>     ssh -n bastion_host "nc -w 5 -vz ec2_instance 22" 2>&1<br>
>          if [ $? -eq 0 ]; then<br>
>              COLOR=green<br>
>           else<br>
>              COLOR=red<br>
>          fi</p>
</div><p dir="ltr">Perhaps if the ssh fails to connect to the bastion you can set the color to "clear", and just make sure you bastion host is monitored.</p><span class="HOEnZb"><font color="#888888">
<p dir="ltr">J<br>
</p>
</font></span></blockquote></div><br></div>