Quick Code Part I – Simple HTTP Monitoring Portlet

Quick Code by matt on March 27th, 2008 No Comments

We’ve been at a lot of accounts, and have developed a lot of software to help us do our jobs. While we are still ramping up our software development practice to sell enterprise solutions, a lot of this code just doesn’t fit in that category. So rather than keep it to ourselves, we’re starting a new feature on this blog called Quick Code. This feature will include downloadable utilities, code samples, or working applications that have helped us do our jobs, and may end up helping you do yours!

To kick things off, we’ve got a simple HTTP monitoring tool for you – we call it QuickMon. It’s an app that can be used as a portlet to monitor any service running HTTP – the various server diagnostic pages, your own custom portlets, even the portal itself (although, remember to use clearsession=true when doing that).

This simple portlet is implemented in both java and .Net, and displays an architecture diagram of your favorite portal (or any IT system). It displays the architecture diagram you specify and lets you overlay real-time status indicators on each server in the diagram (you provide the screen coordinates for each status indicator in the config file).

You can configure the number of URLS to monitor (i.e., the number of status indicators), the frequency of the polling interval, the alt text for the indicators, and the architecture diagram you want to display along with its size attributes. You set these configuration properties using either the java properties file or the .Net web.config file (depending on the version you decide to use). You can also configure each status indicator to do either a ping test or HTTP GET request. The indicator will display green if it passes and red if it fails (Gray if unknown).

Feel free to take this code and extend it by writing more tests (e.g., one useful test may be to parse the html response for a specific string you specify in the config/properties file). There is a readme file for both the java and .net versions in the Documentation folder. To make things easier there is a .pte file for both the .net and java versions of this portlet so you can import it quickly into your portal and just set the remote server to use the correct URL for your environment. The readme files give all the details regarding installation, configuration, known issues, etc. The portlet comes with a sample architecture diagram so you can get it up and running quickly:

quickmon.jpg

Download QuickMon Source here

No Responses to “Quick Code Part I – Simple HTTP Monitoring Portlet”

Leave a Reply

You must be logged in to post a comment.