[OT] Any way to see if a website is up in an automated way?

Discussion in 'Java' started by Rhino, Sep 3, 2006.

  1. Rhino

    Rhino Guest

    I am looking for a tool or technique that can automatically check to see if
    a specific website is up - say twice a day - and then send me an email if it
    isn't. I do not want to have to manually check myself.

    Does anyone know of a way to do this?

    I have no money to spend on this so if there is no free service that does
    it, I'd be interested in how I can program this, preferably in Java. I
    assume that my best bet would be Java application that I could schedule via
    Windows XP scheduler but I can code applets and servlets too if that makes
    more sense.

    --
    Rhino
    Rhino, Sep 3, 2006
    #1
    1. Advertising

  2. Rhino wrote:
    > I am looking for a tool or technique that can automatically check to see if
    > a specific website is up - say twice a day - and then send me an email if it
    > isn't. I do not want to have to manually check myself.
    >
    > Does anyone know of a way to do this?


    If you're running on Unix, this kind of thing is probably best done in a
    cron job with a shell script:

    #!/bin/sh
    wget -O - http://www.google.com/ > /dev/null 2>&1 ||
    mail -s "Wot no website" << EOF
    Where's my website gone?
    EOF

    If you really want to do it in Java, simply create an HTTP connection to
    port 80, check the return codes and read in the data for comparison to a
    known good page,

    Regards,

    Richard
    Richard Wheeldon, Sep 3, 2006
    #2
    1. Advertising

  3. Rhino

    Zaph0d Guest

    Re: Any way to see if a website is up in an automated way?

    If you're not using unix based OS, just create an HTTPClient (
    http://jakarta.apache.org/commons/httpclient/ ) and check the error
    codes. You can either leave the program running and use a timer, or use
    your OS schedular to fire the the program at regular intervals.
    Zaph0d, Sep 3, 2006
    #3
  4. Rhino

    David Segall Guest

    "Rhino" <> wrote:

    >I am looking for a tool or technique that can automatically check to see if
    >a specific website is up - say twice a day - and then send me an email if it
    >isn't. I do not want to have to manually check myself.

    Montastic <http://www.montastic.com/> is free and checks about every
    ten minutes.

    I use ZoneEdit <http://www.zoneedit.com/> because it not only checks
    every ten minutes it switches my domain to a backup server if the
    prime server is down. It costs ten dollars per year.
    David Segall, Sep 3, 2006
    #4
  5. Rhino

    Rhino Guest

    "David Segall" <> wrote in message
    news:...
    > "Rhino" <> wrote:
    >
    >>I am looking for a tool or technique that can automatically check to see
    >>if
    >>a specific website is up - say twice a day - and then send me an email if
    >>it
    >>isn't. I do not want to have to manually check myself.

    > Montastic <http://www.montastic.com/> is free and checks about every
    > ten minutes.
    >

    Thanks for that suggestion! I knew ethere be'd something that would do this
    and this looks fine! I'm giving it a test as I type this.

    There is no way to change the frequency of the tests or control the text of
    the email or send copies of the email to someone else, right? I can't see
    any controls at all at the Montastic site aside from selecting the URL that
    is being monitored....

    > I use ZoneEdit <http://www.zoneedit.com/> because it not only checks
    > every ten minutes it switches my domain to a backup server if the
    > prime server is down. It costs ten dollars per year.


    I'm already using ZoneEdit. But for some reason, even though my IP address
    is correct, my site is going down occasionally. It is sometimes days later
    before someone points it out to me. (It's just a club website, not a
    business, so traffic is pretty low.) To fix the problem, I need to go into
    ZoneEdit and set the IP to an INCORRECT value, wait ten minutes, then set it
    back to the correct value; then my site works again. I'm really not sure why
    this is happening or what to do about it but being notified that this site
    is down is a way that I can at least get the site back up again quickly.

    --
    Rhino
    Rhino, Sep 3, 2006
    #5
  6. Rhino

    Alex Hunsley Guest

    Re: Any way to see if a website is up in an automated way?

    Zaph0d wrote:
    > If you're not using unix based OS, just create an HTTPClient (
    > http://jakarta.apache.org/commons/httpclient/ ) and check the error
    > codes. You can either leave the program running and use a timer, or use
    > your OS schedular to fire the the program at regular intervals.


    Or consider HTTPUnit:
    http://httpunit.sourceforge.net/
    Alex Hunsley, Sep 5, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Flip
    Replies:
    3
    Views:
    960
    Tony Morris
    Feb 9, 2004
  2. davout
    Replies:
    3
    Views:
    778
    davout
    Nov 23, 2005
  3. Chris Ianson
    Replies:
    1
    Views:
    384
    David Dorward
    Apr 1, 2006
  4. Bengt Richter
    Replies:
    3
    Views:
    246
    Thomas Heller
    Jan 6, 2005
  5. Steve Kershaw
    Replies:
    1
    Views:
    343
    Brennan Stehling
    Sep 26, 2006
Loading...

Share This Page