Ubuntu - Ping - Monitor a ping and icmp disabled host

To monitor a remote host 24×7 for alerts and issues which has ping disabled can be done in different ways.

Special monitoring tools, such as nagios, can be used.

These tools, by default, check the aliveness of the host with the help of ping.

However you can also use tcp ping to check the aliveness of the host with nagios.

A readily made plugin is available to do the job. (You don't need nagios to be installed to check and test the plugin).

./check_tcp 192.168.0.103 -p 80

result:

TCP OK - 0.003 second response time on port 80|time=0.002949s;;;0.000000;10.000000

check_tcp plugin comes by default with the nagios-plugins package.

This can be used to check tcp connection to any required port.

You need to have check_command ‘check_tcp -p 80′, inside the host template, to monitor the host aliveness with tcp_ping.