Website monitoring tool

Jan 7, 2007

For quite a while now, I have needed a simple website monitoring tool that would check the uptime of my websites. There are a lot of different ones on the Internet, some are free and some are very expensive. All the ones I found share the same complexity and that doesn’t work for me. So after browsing the web for a while to find a suitable tool I gave up empty handed. I had to write the tool my self.

This is what I wanted

  • Automatic start-up
  • Multi website support
  • Check both HTTP status and title tag
  • Balloon tip notifications
  • Systray application
  • Install and forget
  • Low impact and high performance

This is what I didn’t need

  • E-mail notifications
  • History feature
  • Server installation

The end result is this very simple but very powerful application that does nothing more than it is supposed to do.

It checks websites quietly in the background and pops a balloon tip if a site doesn’t return HTTP status “200 - OK”.

The reason why I chose not to include a history and email/SMS notification feature is because those features are not useful if you sit in front of your computer all day. Then a simple balloon notification would be much less obstrusive. If I’m not in front of my computer I can’t fix any issues on the websites anyway and I don’t want messages on my phone in the weekend.

Download

Site Monitor installer (398 KB)
C# source code (39 KB)

* Only $4.95/month ASP.NET & Windows 2008 + IIS 7 Hosting! FREE SQL Included

Comments (13) -

 Paul Mendoza
Paul Mendoza
1/7/2007 8:42:49 PM #

This is awesome! Thanks!

 NinjaCross
NinjaCross
1/8/2007 9:45:59 AM #

I found some problems:
1- The MSI installer fails. No files are written on the disk (yes, I'm logged as SA)
2- When launche from inside VS2005 the program crashed when trying to insert 2 new records in the grid. After the click on "save" the application raise an IndexOutOfRangeException.
Here is the stacktrace:

   in System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   in System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   in System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   in System.Delegate.DynamicInvokeImpl(Object[] args)
   in System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   in System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   in System.Threading.ExecutionContext.runTryCode(Object userData)
   in System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   in System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   in System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   in System.Windows.Forms.Control.InvokeMarshaledCallbacks()
   in System.Windows.Forms.Control.WndProc(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   in System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   in System.Windows.Forms.Application.Run(Form mainForm)
   in SiteMonitor.Program.Main() in C:\\test\\SiteMonitor\\Program.cs:riga 20
   in System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
   in System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   in System.Threading.ThreadHelper.ThreadStart()

If I try to load the application again, it fails with another IndexOutOfRangeException in Form1.cs, at line 73
Hope this helps

 Nandu Gupta
Nandu Gupta
1/8/2007 11:31:16 AM #

Simply brilliant. Thanks.

 Marco Trova
Marco Trova
1/8/2007 2:25:29 PM #

Why not use (or extend) coding4fun System Monitor? Wink

msdn.microsoft.com/.../article.aspx

 Mark
Mark
1/8/2007 4:07:43 PM #

Nice!
Did you see this in your research?
http://www.watchmouse.com/windows/site_monitor.php
It works both from your PC or with a free webbased monitoring solution

Mads Kristensen
Mads Kristensen
1/8/2007 6:15:02 PM #

@ Marco
I didn't modify coding4fun's example because it's more fun to build something new and I also wanted to keep it as simple as possible.

@ Mark
The local edition can only check a single URL and that is not sufficient for my need. Otherwise it looks pretty cool.

 Brian Rasmusson
Brian Rasmusson
1/8/2007 8:10:47 PM #

Hi Mads,

you should have tried UpdatePatrol (http://www.updatepatrol.com) from a fellow Danish developer Wink It does all you need and more, while keeping complexity down.

Brian

Mads Kristensen
Mads Kristensen
1/8/2007 9:18:23 PM #

Brian, that's looks very cool but it's designed for something very different than this. However, if it's made by a Danish developer, it must be excellent Smile

 D
D
1/10/2007 5:35:46 AM #

While the tool itself is very good, the installer isn't. It doesn't allow me to choose folder where to install (for the record, it is %programfiles%/.NET Slave/Site Monitor/ - I had to use search to find it.). It adds itself to startup without asking from me. Doesn't create folder/item in start menu...

Thankfully, I can just move it to a place where I keep such single-exe applications that don't require install - c:\tools\

 Peter Gfader
Peter Gfader
1/10/2007 7:13:32 AM #

Nice work!
I like how you store the info in a ";" separated file

line.Split(';')

ed
ed
3/19/2007 3:11:45 PM #

nice tool, but please save other users the trouble and allow for a configurable destination directory.  i had to search my computer for this.

e
e United States
12/19/2007 9:39:53 AM #

try monitoring this site http://nerissairving.net

see what happens. looks like a bug. great app by the way.

Ben
Ben Germany
10/8/2008 1:27:23 PM #

Thank you very much for this cool tool!!

The Site Monitor is exactly what I searched for but no one offers.

But I have a suggestion:
Is it possible to import a bunch of web urls into the Site Monitor? A kind of import for csv files or something similar.

Comments are closed

About the author

Mads Kristensen

Mads Kristensen
Program Manager at the Microsoft Web Platform team and founder of BlogEngine.NET.

More...

Month List

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way.