tags:

views:

396

answers:

5

I have got a requirement to test network connectivity to around 30 servers with different ports as part of some new firewall rules implementation. After the rules are in place i need to check whether the connectivity is succesfull or not, and i need to test the same rules from 3 servers. SO i am looking at some way i can automate this. Currently i use telnet to test connectivity, but this is too slow, I am open to a shell script and ant script. The end result should be a log file listing the server and port to which the connect attempt was made, and the status of the attempt (success/failure)

+1  A: 

I beleive nmap can do it. It can scan selected/all ports and generate a report.

Eugene Morozov
A: 

Ping may help, or even curl? Please describe a scenario that == "Its Dead, Jim!", if the script checking should not block.

Tim Post
A: 

Nagios can probably do what you want.

http://www.nagios.org/

Brian L
it needs to be from one server to another server
Dinesh Manne
Yes, Nagios can do that. See this section of the documentation: http://nagios.sourceforge.net/docs/3_0/monitoring-publicservices.htmlYou configure each host along with the services that should be up. It will notify you if a service or an entire host goes missing.
Brian L
A: 

If you don't mind a Perl solution, Net::Ping is pretty helpful. I use this for testing SSH connectivity to servers in our test environment.

bedwyr
A: 

Try fping. Very simple and likely gives you most of what you're looking for. If you block ICMP or want to do something with ssh or telnet, then you should look at nagios as Brian Lindauer answered.

Get a list of hosts that are up: fping -a -f hostlist.txt

Get a list of hosts that are down: fping -u -f hostlist.txt

Jared Oberhaus