Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

External script to check website health

Posted on 2011-03-02
8
Medium Priority
?
315 Views
Last Modified: 2012-05-11
I have two websites that I'm responsible for. The company that hosts those websites used to provide website monitoring, but that will go away soon.

I'm thinking that I can use a script on a server here at my work that can run every few minutes to check whether the websites respond to an HTTP request, and send an email (or SMS or whatever) if response is above a threshold, or there's no response at all, but I don't really know where to start.

Can someone point me in the right direction?
Thanks in advance for any help provided...
0
Comment
Question by:thomasedooley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 

Expert Comment

by:mdlines
ID: 35017663
Hi Thomas
If you can wait about a week I am just writing the very same script for someone else and I could let you have a copy. You can just alter the variables for your own sites etc.

Martin Lines (www.itlines.co.uk)
0
 
LVL 12

Expert Comment

by:Amick
ID: 35018096
$time perl -MLWP::Simple -e 'get "http://www.example.com"' is a simple oneliner to get the latency of your website.  Time has many options that vary among the unix implementations that will make this easier to use, but if the website's latency is beyond acceptable limits, an alert can be raised.
0
 

Author Comment

by:thomasedooley
ID: 35018290
Amick - and this is something I can run from a batch file?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:thomasedooley
ID: 35018390
I should mention we're a Windows shop... This script is meant to run on Win2008.
0
 
LVL 12

Expert Comment

by:Amick
ID: 35018565
thomasedooley - yes, you can run this from a batch file.  Let me make it clear, though, that this is only the beginning of your script. You'll need to analyse your output and initiate your alert separately.

Also, perl can be run on Windows and there are downloads that provide the unix time function, such as CygWin, so it is not only a unix/linux method.

Finally, you may be just as happy writing the entire script in Perl, using the Benchmark-Timer module. http://search.cpan.org/~dcoppit/Benchmark-Timer-0.7101/lib/Benchmark/Timer.pm

Perl also has modules for e-mail, sms, paging, twitter, and just about any other alert initiation method you'd like to use.
0
 
LVL 12

Expert Comment

by:Amick
ID: 35018881
Here's another alternative;

Download timethis.exe from  the windows 2000 resource kit.

Then use telnet to retrieve the web page as described in this Microsoft Support article

0
 

Accepted Solution

by:
thomasedooley earned 0 total points
ID: 35158035
I went in an entirely different direction and went with Pingdom, which allows me to monitor on a 2 minute interval, and emails me alerts within a few minutes, and a summary every day. I do appreciate the experts' efforts.

I'm not sure whether I should award points or not, as the suggestions I received here were not exactly what I was looking for (maybe I was just being lazy). I do, however, want to be fair to the people that made an effort, as I am not unaware of the time experts spend responding to questions like mine.

What's the fair thing to do? Full award to Amick, partial to Amick, delete the question? I'm looking for direction, please...
0
 

Author Closing Comment

by:thomasedooley
ID: 35390512
I was advised by EE monitor to accept my own answer as the solution if, in fact, I found Pingdom on my own, which I did. It's not the solution I was looking for, as far as writing my own script to monitor my website, but it is very acceptable as an alternative, and it is free at this point. Thanks to the experts that made suggestions - I do very much appreciate your efforts.
Tom
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Make the most of your online learning experience.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Introduction to Processes

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question