Macromedia Flex Macromedia Flex
FlexMon - CF Monitoring

  • Hit the login button on the title bar to login.

    FlexMon is a simple open source Flex based monitoring tool written by Tariq Ahmed to monitor the status of your Coldfusion servers (and eventually anything) in an almost-realtime fashion.

    The goals of FlexMon are:

  • To Be Easy to Install
  • Require Low Overhead
  • To Be Modular
  • To Be Simple enough that CF Developers could use it to learn Flex
  • Not have to require active viewing to catch issues (by using sounds, mobile device integration, electro-shock collars, etc...)

    V0.5 - Current Version

    I'm going to jump the versioning up big time from the prototypish V0.02 to a fairly respectable V0.5. Here's what changed:

  • Introduced Warnings, instead of just Alerts. Warnings make just a subtle sound indicating a "you might want to look at this", vs the Alert's "raise shields, brace for impact!" sound.
  • Thresholds are completely configurable for the basic Coldfusion metrics. You can set the warning and alert levels. This previously was hardcoded, and only looked at Requests Running.
  • Visually, what an Alert or Warning cell looks like is based on CSS Style definitions (previously hardcoded).
  • The FlexMon client in V0.02 would appear to lock up if a server was completely down. This was because the distributors timeout was so high that it would wait forever for a response. The timeout is set very low, and if a timeout occurs all the metrics for that server are set to 1000, and all metric points are set at Alert level.
  • Moved the Collectors to live in the Application scope so that CF isn't constantly creating and destroying them.
  • V0.02 only handled Seefusion 3's XML Schema; V0.5 now supports Seefusion 3.x and 4.x.
  • V0.02 although it caught exceptions, those exceptions would get logged to CF's application.log and could grow quite quickly. V0.5 fixed the root cause behind those exceptions (related to SeeFusion's XML schema).

  • Download V0.5


    This version was a major code restructure, and consists of 3 main pieces:

  • Agent's (agent.cfc's)
  • The Distributor (distributor.cfc).
  • Collectors (A collector for each module lives in the Collectors subfolder, e.g Seefusion.cfc, and CFServer.cfc).

    The focus right now is on Running Requests. This is a key indicator as to the load and health of a CF server. Often, if a particular request is running too long it'll cause a traffic jam of sorts and tie up every other running request, and then cause the requests queued to back up to the max. The instant a running request is running suspiciously long (e.g some user entered in some kind of a wildcard search that is going to bring back 100 million records) you have an opportunity to kill it before your whole CF server locks up.

    For Ease of Install and Low Overhead there is no database used. It's lacking on the modularity side of things, but to show the idea I created a SeeFusion module (though you don't need SeeFusion to use this).

    It's also very simple. Consisting of a few CF files on the backend, an XML config file, and a handful of Flex files.

    And on the 'not requiring active viewing' front - it will sound an alert if the amount of requests running hits 20 or more (you can edit the code and change). That way you can keep the tool minimized, and it will bug you when there's something to worry about.

    Similarly on the refresh side, it defaults to every 5 seconds, but using the combobox let's you change that. Memory utilization comes from SeeFusion, so if you don't have SF, that column will remain blank.

  • Download V0.02

    Future Versions

    Although I'm still planning out a roadmap, future versions will be highly configurable.

  • Threshold for almost everything.
  • Control what colors are associated with each server.
  • Control max refresh rate on the backend side (cache data and allow a server refresh MAX every x amt of time) to prevent too many FlexMon clients from bombarding the system.
  • Scheduled driven collectors
  • Utilize FDS to support push updates.
  • Plug-In mechanism. Make your own modules...
  • Create a Fusion-Reactor module.
  • Utilize SNMP and other means to get more system data.
  • Support strong security modules (agents running behind web server authentication, etc...)
  • Filtering on the client. Control which servers you're viewing data for, etc...
  • Link to SeeFusion's kill running request capability
  • Chart any metric

    How It Works

    FlexMon is a 3 Piece monitoring system:

  • Agents: You have Agents (a cfc) that live on each Coldfusion box. The Agents get their data from using Coldfusion's getMetricData() function (Metrics services need to be enabled on the CF server in order for this to work.

  • Collectors: The collectors poll each agent for the latest set of data, and aggregates all that info together into the metrics cache.

  • Distributor: The Distributor handles communications with the Flex Client, and transmits the latest set of data from the metrics cache to the client.


    Agent Installation:

  • Copy the Application.cfm and Agent.cfc files to all the servers you're interested in.
  • Note that every CF location that you install the Agent on, that CF must have the Metrics service turned on.
  • Test that the Agent Web Service works by accessing it as a WS. E.g: http://<server>/FlexMon/agent.cfc?WSDL

    Collector/Distributor Installation:

  • Create a /FlexMon/ directory on the CF Server that you want to host FlexMon.
  • This version is currently limited to requiring the FlexMon dir right under the web root.
  • Copy all the files to the FlexMon Dir.
  • Note: This piece must be running on a CF 7.0.2 Server.

    Update the Config.xml File:

  • A server entry looks like this:
    <server title="server1">
    	<seefusionurl majorversion="4">http://server1:8999/xml</seefusionurl>
    Add as many of the server entries as you have deployed the Agents.
  • The title and agentws parameters are the key to making it work.
  • The title can only contain alphanumeric characters right now (ie A-Z,0-9).
  • The agentws is the WSDL path to the agent.cfc's.
  • The hostname and port are meant for future use.
  • Set the seefusionurl parameter blank if you don't have SeeFusion

    Testing Things

    To test that it all works on the Coldfusion side, run the FlexMon/testScript.cfm file - it will do a raw dump of the data if it can access it.

    Running It

    Running it is pretty simple, just point a URL at that FlexMon dir. E.g http://<server>/FlexMon/bin/FlexMon.html.

    The main table titled 'CF Server Metrics' lists the following information:

  • AQT: Average Queue Time
  • AQT: Average Request Time
  • RQ: Requests Queued
  • RR: Requests Running
  • RTO: Requests Timed Out
  • Load: Simple Load
  • Sessions: The amount of Session's the CF Server is maintaining
  • Mem %: Memory USED, as from SeeFusion.

    Resetting the Cache

    FlexMon stores everything, including configuration data in an in-memory cache. If you need to flush this data, just run the FlexMon/resetCache.cfm script.

    Trouble Shooting

    Quick Checks

  • Are you running CF 7.0.2?
  • Does http://<flexmon host>/FlexMon/testScript.cfm work?
  • Make sure all the cfc's will execute. You wouldn't normally invoke these directly yourself, but this is to see that they'll respond to the FlexMon client if invoked.
    	  http://<flexmon host>/FlexMon/flexmon.cfc?wsdl

    If you encounter any issues, it's probably because you may need a Web Service Mapping in the CF-Admin (common if you're running multiple IIS sites), or a custom path to the /FlexMon/ dir.

    See the following on this matter

    faultCode:Server.Processing, faultString:'Permissiong denied'

  • It's likely that the client cannot invoke FlexMon.cfc. See the quick checks.

    Could not generate stub objects for web service invocation

  • This will come from FlexMon.cfc trying to connect to an agent, but the agent isn't invoke-able as a webservice. See the quick checks.

    AXIS Error - Error attempting to create Java skeleton for CFC web service

  • This will come from FlexMon.cfc trying to connect to an agent, but the agent isn't invoke-able as a webservice. See the quick checks.


    I know it its crazy limited, but I just wanted to get something out there as motivation to myself to keep it going. You can try to hit me up with some questions (tariq at, but can't make much promises at the moment. The main thing now is just seeing if anyone has interest in this kind of tool.

    If you're interesting in contributing to the cause, I'd love to collaborate. If you make any major modifications that you'd like to contribute back, I'll update the site with your version.

  • FlexMon Screen Cap - Click to Enlarge
    * Click to Enlarge

    Sorry, demos are currently not available at this time. My web hosting company does not have the CF metrics service enabled on my sites.

    I'm hoping to find a demo location in the future.

    V0.5 11/15/06
    Added Warnings
    Threshold Config for CF metrics
    Support for SeeFusion 4
    Collector objs moved to App scope
    CSS Config for Alert/Warning Display
    V0.02 08/11/06
    Major code restructure for modularity.
    Centralized Alert Manager.
    User controlled refresh rate.
    Improved exception handling.
    Component Backend Architecture
    Added Memory Usage col.
    Introduced StyleSheet.
    Added a CF testScript.
    Added a Reset Cache script.
    V0.01 08/08/06
    Initial Proof of Concept.

    Print Version