How do I make a HTTP call to a particular URL in Python and then figure out that whether the server is UP and RUNNING or not.
As I recently started working with Python so not sure of any such libraries.
If I am opening the below URL -
http://dbx45.dc1.host.com:8082/console
then some page gets opened to me which means my server is UP and RUNNING. But if it is not UP and RUNNING, then it shows me like this on CHROME -
Oops! Google Chrome could not connect to http://dbx45.dc1.host.com:8082/console
And on FIREFOX -
Unable to connect
Firefox can't establish a connection to the server at dbx45.dc1.host.com:8082
So how do I figure out this thing from the Python that whether my server is UP and RUNNING or not?
UPDATE:-
This is what I have tried so far -
status = urllib2.urlopen("http://dbx45.dc1.host.com:8082/console").read()
print status
How do I simplify this to understand whether the server is UP and RUNNING or not?