1 Nov
2013
1 Nov
'13
11:49 a.m.
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.
Currently in my env i m doing following to check the availability:
- Created server ext script which connects to bastion host and from there it checks the ssh connection to the server. ssh -n bastion_host "nc -w 5 -vz ec2_instance 22" 2>&1 if [ $? -eq 0 ]; then COLOR=green else COLOR=red fi
- hosts.conf has "1.2.3.4 ec2_instance # noconn ext_script ...."
It works well but it has single point of failure i.e. if bastion host has some problem then all the instances will start alerting.
The other thing in my mind is use amazon api for checking server status.
Anybody has any suggestion here?