Command-line website connectivity testing

Associate
Joined
19 Jul 2011
Posts
2,362
We've got a need to monitor a bunch of web servers for connectivity and responsiveness.

Theres database server, a bunch of app servers, then the application web servers. In front of those are some reverse proxy web servers, a load balancer and firewalls etc.

All these various bits of kit are managed by different teams, under different service contractors etc. and its all very political trying to get anything done sometimes.

Does anyone know of a scriptable tool/program where we could achieve the following;
connect to a web server on a hostname and port
fire off a GET or POST
wait for a result
report the result
rinse-repeat for rest of the web and proxy servers

Right now we're doing this manually, with the rather excellent Fiddler.
We get it to redirect to each host / port combo and manually call a URL.

So I'm looking for a way to do it better.
 
I do something similair, monitor a host of Citrix servers (XenApp, License Web Interface Storefront) and I wrote a VBScript to call command line tool to query if a port if open and writes it to a back end SQL database, then a front end web page displays if its listening or not.

if you wish, i could tweak my script to see if it can do what you need.
 
PowerShell 4.0 has a Invoke-WebRequest command.
Are you using some monitoring software? Typically most solutions I have used in the past have modules built in to monitor web sites.
 
Am looking into both the Nagios and Powershell options. Also discovered there is scripting built into Fiddler already, after being advised by the team responsible that "Its a 3rd party product, we wouldnt be able to do any changes to that".

Cheers all.
 
Prolly better using an off the shelf solution but if your feeling adventurous and have some Linux experience all sorts of possibilities with webmin/usermin and a bit of perl scripting for network/socket stuff.
 
What O/S are your servers running?

If a flavour or Unix/ Linux you could write a quick shell script to do what you want very easily and have the output monitored.
 
Last edited:
Back
Top Bottom