[Looking for Charlie's main web site?]

Monitor CF using Nagios: a useful new way

Note: This blog post is from 2009. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
Nagios is an open source (Linux based) monitoring tool that many organizations use to monitor their IT infrastructure. Here are two resources to help you monitor it with CF, one of which is a new way that may give additional benefit to those already doing Nagios monitoring of CF.

Basic CF Monitoring in Nagios

First let me share that if you've not explored monitoring CF with Nagios at all, here's at least one blog entry from 2005 discussing that. (A more recent one, at http://profec.net/2009/01/12/monitoring-coldfusion-with-nagios/, which I used to list here, is no longer responding, nor could I find it on archive.org.)

Of course, you can easily use Nagios primarily to report whether CF's up or down, but you can also monitor basic statistics such as are provided via CFSTAT (also available on Windows via Perfmon, which also exposes generic stats about all processes), as demonstrated in that blog entry.

But you may have noticed that, if you run the Multiserver (multiple instances) version of CF, those CFSTAT and Windows Perfmon Stats aren't available on that version of CF.

So what to do if you wanted to monitor more about what's going on inside of CF?

FusionReactor Nagios Plug-in

If you're running FusionReactor Enterprise, you can now get that additional information via the free FusionReactor Nagios Plugin. It's a perl app that when implemented will expose certain key statistics in a way that Nagio can process them (and some are things that CFSTAT and the CF Permon stats don't report):

  • Count of current running requests, and total count of all requests run
  • Count of request queued by FusionReactor
  • Average request runtime (since server start), and Recent request runtime (in past 60s, by default)
  • Count of recent slow pages
  • Memory free in bytes and percentage
  • Memory Total and Max
  • Instance and System CPU Use percentage
  • Count of recently completed JDBC requests

Note that this is technically community-contributed feature (from an Intergral employee, David Stockton), not a supported feature.

If you're running or are interested in FusionReactor Enterprise, check it out.

For more content like this from Charlie Arehart: Need more help with problems?
  • If you may prefer direct help, rather than digging around here/elsewhere or via comments, he can help via his online consulting services
  • See that page for more on how he can help a) over the web, safely and securely, b) usually very quickly, c) teaching you along the way, and d) with satisfaction guaranteed
Comments
Thanks for the mention Charlie. Great article :)
# Posted By David | 4/2/09 3:00 PM
Dang, that rocks. Is there a minimum required version of FusionReactor to make this work? For example, would the older 2.2 version work?
@Matthew: I wrote the Perl plugin so it's pretty "loose". What I mean by that is essentially the Perl plugin:
- GETs an XML document
- XPath to XML value/attribute
- compare with WARN/CRIT value
- output result

As such, it can be used with FR2.2.
Having said that, a couple of things to note...
- I recommend upgrading to FR3 - it gives better performance and more features; plus if you purchased a maintenance option with your copy of FR2.2, it could be a FREE upgrade!!
- I haven't tested with FR2.2
- FR2.2 will not expose all the same XML properties; however basics like request count, CPU & memory should be available

If you're having issues with FR2.2 and the plugin then send me an email and we'll see what I can do.

Thanks for the support
D!
Thanks for jumping in, David.

BTW, should anyone come along and be a little confused, I think Matt was referring to 2.0.2 (when he called it 2.2) and while Dave didn't correct him, it didn't even strike me as odd when I first read Matt's comment over the weekend. But to be clear, there was no 2.2 of FR. After 2.0.4 was 3.0 (and now 3.0.1). Anyone can correct me if I'm wrong. Just trying to avoid confusion from a future reader of these comments.
Right, sorry. It's been awhile since I've had to do an install of the product (most of our systems are at 3.x, but there's at least one straggler that remains behind).
Getting a ton of errors trying to get this plugin to work properly either timeouts or simple errors , any thoughts for the below?

./check_fusionreactor -H localhost --port 80 --path /fusionreactor -l Administrator --password x --field /FusionReactorFederatedDataTransfer/SerializedMetrics/MemoryProbe/Total -c 90 -w 80
FusionReactorFederatedDataTransfer
500 Server closed connection without sending any data back http://www.w3.org/TR...
Handler couldn't resolve external entity at line 1, column 108, byte 108
error in processing external entity reference at line 1, column 108, byte 108:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR...">
===========================================================================================================^
<html xmlns="http://www.w3.org/19...">
<head>
at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/XML/Parser.pm line 187
# Posted By jason | 1/20/11 11:00 PM
Jason, I have no responsibility for the plug-in, and I also have no Perl experience, so I'm afraid I can't help, no. Sorry. But since it comes from the folks who make FusionReactor, try using the support resources on their web site, and especially consider sending a note to the FusionReactor mailing list (a google group, free to join and where great info is shared, without being overwhelming, as discussed on the FR support site.)
I do not have fusion reactor installed on my systems. Can i have any nagios plugins to monitor the parameters similar to how Fusion Reactor does.
# Posted By Sam | 5/9/13 3:27 AM
@Sam, I'm not quite sure what you're asking. If you want other Nagios plugins to monitor ColdFusion, I'm afraid I can't help you, no. I was just pointing out this one FusionReactor-specific one, back in 2009.

I did offer a link to another blog entry that discussed another means of monitoring CF from Nagios. While that link seems now broken, I just updated it with another, though it's even older.

I would propose instead that you should visit the Nagios site, to either learn how to do create one yourself (which should be fairly easy, as Nagios is extensible) or perhaps there's a place there where you can ask others to build one for you. Hope that's helpful.
Copyright ©2024 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting