Monitoring of ColdFusion with Nagios
First, you’ll need to install the NRPE_?NT daemon on each of the Windows servers you have running CF. Follow the instructions within the zip to install. It just works.
Add Coldfusion host to hosts.cfg
If your CF servers aren’t already among the hosts you’re monitoring, add them to hosts.cfg. A typical host definition looks similar to the one below.
Add host groups for your Coldfusion server
Assuming all your CF servers are running the same CF version, you can make a Nagios host group for those servers. This is much less work than adding individual servers to the service check (detailed below). If you have servers running disparate CF versions, set up a host group for each. Add your host group defintion to hostgroups.cfg. A typical host group definition looks similar to the one below.
Add Coldfusion commands to checkcommands.cfg
In a default Nagios installation, checkcommands.cfg contains all the definitions of the commands Nagios uses to inspect services running on the hosts it monitors. The following list of command definitions should cover ColdFusion 7 (and will likely also cover other versions (not checked)). Add the following lines to checkcommands.cfg.
The last two commands in the above listing check actual CF processes running on the server. Note the comments. The values we use may well be very different in your environment. The easiest way to check is to have a look at what your servers are doing and make an educated guess at the needed levels in your setup. No harm done if you use these values, you just may end up getting copious notifications from Nagios that you don’t need (or conversely, no notifications at all). Test and tweak.
Adding CF-??related services to services.cfg
Nagios’ monitoring model is centered on the concept of services, so this step is perhaps one of the most important. You need to add service definitions to services.cfg for each of the command definitions you built earlier. A couple of sample service definitions are shown below.
At this point, Nagios should be ready, willing and able to monitor CF on your Windows-??based CF servers. Restart Nagios by whichever method you use. After restarting, if you log into the Nagios web interface, you should be able to see the CF services you set up being monitored.
ColdFusion installed on Linux
The above works good for Coldfusion installed on Windows. The below steps should help to get it going when Coldfusion is installed on Linux, but has not been tested!
Use “pstree” command in bash script:
This will print a CFChildren variable like:
and the results of the script can be exported within snmp; an entry in snmpd.conf like:
exec .126.96.36.199.4.1.2021.500 coldfusion-??threads /usr/local/bin/coldfusion-threads-snmp.sh will do it.