Any ideas on how to tell if a web server is functioning normally?

Discussion in 'OT Technology' started by 5Gen_Prelude, Aug 29, 2006.

  1. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    We had our apache based web server box take a nose dive so none of the self diagnostics were helpful. I'm looking for a simple way of quering the home page to ensure it responds with another computer. Any ideas? I'd like it not to be specific to the web server software either - it should work on any website on any server and the program or script that does the querying to be windows based.
     
  2. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    You could do a telnet to the server's port 80 and then doing a 'get /".

    If you get any type of response then, you know that the process is up and that its servering some sort of a page.
     
  3. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    Although this does more than you require, I highly recommend you look at a product called "nagios". It's an amazing open source monitoring solution.
     
  4. mahal.

    mahal. mahal kita? OT Supporter

    Joined:
    Feb 21, 2005
    Messages:
    11,684
    Likes Received:
    0
    Location:
    tallahassee, fl
    i second the nagios suggestion. my company is currently testing various monitoring apps for non-windows platforms, and i'll just say that nagios is still on our list to keep.
     
  5. Schproda

    Schproda New Member

    Joined:
    Jul 9, 2006
    Messages:
    442
    Likes Received:
    0
    Location:
    Memphis, TN
    Is your web opening locally? Chances are that if it'll open with 127.0.0.1 it'll load with another computer as long as DNS and all that is good. Restart apache and make sure there are no errors in your .conf files.
     
  6. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Thx for the responses - no *nix boxes on the network so nagios might not be an option unless we throw one together. The telnetting might work if I can script it - have to dig up some telnet scripting proggies. And the last response - hell - you just didn't read the question :rofl:
     
  7. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    nagios will work on either a windows or Unix platform. We use it for a lot of our monitoring. We do checks that are both Windows and Linux machines.

    The telnet to port 80 is a check that Nagios will do as well as well as other things.. But if you are only checking this one Webserver, Nagios might be a bit too much. If you have other things to monitor then it will work for you.
     
  8. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    I must be mising something but it doesn't appear that it runs on windows - checks window boxes sure, but not the actual program.

    We might end up using it afterall as we have been thinking of getting something to do some network monitoring (although we've already done a whole lot already).
     
  9. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    you can get it to work with cygwin.
     
  10. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    Short of Nagios, I would create a simple script with perl's LWP library to check that the page contains what you expect. You could even do it in a one-liner in a shell script using the program called "wget" and grep the resulting file to search the output for a string you expect, and have it email you if its not there. Then insert a cron job that does this every X minutes.
     

Share This Page