About

Quite a while ago when I took over the support of the platform at work I found that sometimes I needed to keep an eye on the status of Coldfusion on our servers.

This is possible using the cfstat utility but to do this I had to be logged into each machine via remote desktop etc. and when you’ve got multiple servers (back then we had 4, we now have 6) this is just not a feasible solution.

What I really wanted was something that I could pop on my desktop to keep an eye on multiple installs of Coldfusion on multiple servers, giving me just the headline figures from cfstat and then if there was a problem have it notify me.

I did a few searches and didn’t really find anything that did what I was looking for so I decided to, as all developers will probably relate to, build one myself. So in my spare time, as I was super busy at work, I explored Yahoo Widgets (actually this was before Yahoo bought them out) and had a play around.

The result is a simple Yahoo Widget that lets you see the cfstat information of multiple servers on your desktop and provides alerts when there is a problem. I have been using this at work for about 18 months, it’s not as feature rich as I first intended (see future plans) but it has proved invaluable at just letting me keep one eye on the servers while going around my daily business.

Features

CFStatShot watching multiple Coldfusion servers

Installation

There are two key files in the download:

CFStatShot.widget

This is the widget file itself, it is installed into Yahoo Widgets via the normal method, simply double click.

getRemoteMetricData.cfm

This script is responsible for gathering the metric information (the same information that is found in cfstat) and returning it to the widget. The widget will be configured to point at this script on each of the servers so this script must be placed on your servers in a place that you can get at it via HTTP.

Configuration

When the widget first starts up there will be no configuration and no registered servers so simply right click on the widget and enter the configuration, you will be presented with the following screen:

CFStatShot configuration screen

CFStatShot configuration screen

Server List

This is the list of the servers you wish to monitor, this is pipe (|) delimited list of name value pairs, where the name is the server and the value is the URL of the server, e.g.

Server1=http://192.168.1.1/|Server2=http://192.168.1.2

There is no limit to the number of servers you can register (except your available screen space for the widget).

Metrics Script

This is the relative URL of the metrics script from the server root, it is supplied as a separate option as it is assumed that the metrics script will live in the same place on each of your servers. If that is not the case you can just leave this as the name of the metrics script and set the URL as part of the server registration.

Hide Script Requests

When activated this means that the running requests will always be 1 less than the results returned from the metrics script. Basically it is a fudge to discount the request you made to get the number of requests - it doesn’t quite work out right when you have a queue.

Poll Interval

The interval between polling the servers in seconds, note all servers are polled at the same time.

Poll Timeout

The amount of time to wait for a response, from testing it appears that Yahoo Widgets default timeout is around 20 seconds, so values higher than this will be ignored.

Stats

On the stats screen you can choose how much history to keep for each server.

Usage

CFStatShot Server Details Display

CFStatShot Server Details Display

Each server is displayed as above along with the cfstat polling results. For each server there are the following functions and information as outlined above.

Polling Status

An icon which displays the current polling status, icon can be the following:

Green

Last poll completed successfully

Red

Last poll completed un-successfully (usually a timeout)

Yellow

Currently polling

Polling Result

The result of the last poll, this was going to show different icons for different results, however it currently only has three statuses:

OK

Last poll completed successfully

Alert

Last poll completed un-successfully (usually a timeout)

Paused

Polling currently paused

Server Name

The name of the server, as registered in the config screen.

Pause/Resume Polling

Allows you to pause or resume the polling for a given server.

Refresh

Causes that server to be refreshed by polling straight away (will not affect normal poll interval thereafter).

Alerts

Screenshot of an alert raised in CFStatShot widget

Aan alert raised in CFStatShot widget

When CFStatShot is asked to raise an alert (currently this will only happen when a poll times out) then the alert is displayed in place of the stat results for the server with the issue, as shown above.

When an alert is raised polling for that server stops, the alert can be hidden by pressing the minimize icon () and then the polling can be resumed by pressing the play button.

A history of alerts is stored for each server and they can be viewed by pressing the history icon (), they can then be scrolled through by using the arrows.

Known Issues

Future Plans

Note: I currently don’t have any plans to add these features myself, but they were on my initial list of features: