Accessibility

ColdFusion Article

 

ColdFusion 8 server monitoring – Part 4: Multiserver Monitor, Admin API monitoring, and more


Table of Contents

An enterprise dashboard with the Multiserver Monitor

You may not notice, but there are actually two monitors available in ColdFusion 8: the Server Monitor and the Multiserver Monitor. Some may confuse this as being related to the Multiserver deployment mode option of ColdFusion Enterprise, but really it's for when you need to monitor any of several ColdFusion 8 servers, regardless of whether they're in your current environment or another location, remote from where the monitor is being run (subject to security implications discussed later). The Multiserver Monitor can monitor any form of deployment of ColdFusion, whether stand-alone, multiserver (multiple instances), or J2EE (WAR/EAR-style) modes. That said, only other Enterprise (or Developer) edition servers can be monitored, not ColdFusion 8 Standard edition (nor earlier releases of ColdFusion.)

The key benefit of the Multiserver Monitor is that you don't need to open a separate window for each monitored ColdFusion 8 server, as it offers a single dashboard-style interface that enables you to easily see high-level status information for multiple servers from one window, with the option to drill down into each server's own Monitor. (I'm referring to the monitor interface that's been discussed so far in this article series.)

Opening the Multiserver Monitor

You open the Multiserver Monitor in nearly the same way as the basic monitor. The option to open it appears in the Server Monitoring page of the ColdFusion Administrator (Server Monitoring > Server Monitor), a second button labelled Launch Multiserver Monitor at the bottom of its page (see Figure 1).

The Launch Multiserver Monitor button

Figure 1. The Launch Multiserver Monitor button

You can also launch the Multiserver Monitor from a URL entered in your browser directly, as:

http://[servername]/CFIDE/administrator/monitor/launch-multiservermonitor.cfm

The first time you open the Multiserver Monitor, you will be prompted to create a master password. This is used because you would likely configure the Monitor to watch multiple servers, and you want to ensure that someone else who may open the Multiserver Monitor is properly authenticated to access this one Monitor that monitors them all. (You will also specify the login security for each server to be monitored when you add a new monitor to the Multiserver Monitor, as discussed in the next section.)

Adding new monitors

When you open the Multiserver Monitor for the very first time, there will be no servers listed as being monitored, not even for the local machine from which you launched the Monitor itself (see Figure 2).

The initial screen of the Multiserver Monitor

Figure 2. The initial screen of the Multiserver Monitor

To add new servers, click Add (at the top left of the screen in Figure 2). This will open a new window (see Figure 3) where you provide the servername, port, and administrator login information for the server to be monitored.

Adding a server to be monitored

Figure 3. Adding a server to be monitored

Use whatever domain and port you would use to access the ColdFusion Administrator on that server. Do not specify http:// and such as part of the domain name. Just provide the domain name. Note that the port used will depend on whether you've deployed ColdFusion using its built-in web server or an external web server (like IIS or Apache). The Context root field needs only to be populated if the server to be monitored was deployed using the J2EE mode, in which case you'll name the context root in which the web application (or WAR/EAR file) was deployed.

Finally, you need to specify authentication information to access the server, using the same information used to log in to the server's administrator. You can select the HTTPS option if the ColdFusion Administrator is on an SSL-enabled web server, in which case your authentication information will be encrypted when sent to the server. And since ColdFusion 8 offers a new option to define multiple Admin users, note that this Add Server interface offers the option to provide a username. If you have not defined one, just use admin and then use your Admin password. Even if you've chosen to have no Admin password security at all in the ColdFusion Administrator, simply enter any username and password, as you cannot leave them blank here.

As a first test, try adding the server from which you are running the Multiserver Monitor itself. For my local stand-alone development edition deployed using IIS, where I have not defined multiple admin users, I used localhost for the server, 80 for the port, admin for the username , and my ColdFusion Administrator password.

If you try to name a server on a domain other than that which you used to launch the Multiserver Monitor, you may receive an indication of Permission Denied. This is caused by a default security feature whereby a server can't be monitored by a remote Multiserver Monitor without granting it explicit permission. See the later section, "Securing the monitoring of your server".

Of course, the real power in the Multiserver Monitor is in adding multiple servers, but even with just one server monitored, you can explore the features of the Multiserver dashboard, as discussed in the next section.

Observing the status of a monitored server

Once added, a new monitor box will display for that server (see Figure 4). Note that if you do add multiple servers, they will display alongside each other in this window.

Monitoring a single server

Figure 4. Monitoring a single server

If the settings for a given server are correct and the Multiserver Monitor successfully connects to it, the Status line (at the bottom of that box) will show Logged In. If it shows Unreachable, that means either that the server is stopped or the configuration settings are incorrect. If the status shows Permission Denied, again that's a problem of configuration discussed in the section, "Securing the monitoring of your server."

If you receive any errors and need to correct a mistake, you can edit the connection information for a server by selecting it and choosing the Edit button, at the top of the screen. (Once you have multiple servers defined, you'll be able to tell which is selected because the box for the server will show the yellow background, as you see with the lone server shown in Figure 4.)

What the monitor box shows

When successfully connected, the monitor box will show such high-level information as how long the server has been online, whether any alerts have been triggered, and it will also show a "warning" when any given alert set for that server achieves 80% of its threshold.

As discussed in Part 3 of this series, alerts can be configured in the Server Monitor to detect whether too many requests are taking too long, average response time is too high, too much memory is being used, or too many requests are timing out. When any alert is triggered on the server being monitored, the Multiserver Monitor box for that server will show a red X next to the server and a phrase next to Alerts to indicate the kind of alert, such as "Slow Server", as shown in Figure 5.

A Slow Server alert detected

Figure 5. A Slow Server alert detected

If you've seen this display and thought that was all that the Multiserver Monitor provided, you might conclude that it's rather anemic. You may want to see more about the current status of the server(s) being monitored, such as how many requests are running, how much memory is in use, and so on. Fortunately, there is still more data available. You just need to know how to ask to see it.

Don't miss the Detail View

This could be a hidden gem that many miss. There's an available Detail View icon at the far right of the display of the Multiserver Monitor (in Figure 4) that displays a new detail page for all the servers being monitored. The detail page is shown in Figure 6.

The Detail View

Figure 6. The Detail View

That's quite a bit more detail! For each monitored server, you're shown how many active requests are currently running, how many requests per second, the average response time of requests, whether there have been any alerts, the amount of JVM memory in use, how many application errors there have been, and how long the server has been running.

This detail is only about what's going on at this moment. To see any sort of historical perspective (such as why the server was slow a few minutes ago), you'd need to use the Server Monitor (discussed in the first two parts of this series), and I'll show you soon how to get to that from within the Multiserver Monitor.

A couple of tricks in the Detail View

But there's really still more available on this Detail View than may be obvious: first, if you place your mouse over some of the columns, you'll see that they show still more data. For the Active Requests column, it splits that number into the number of active and queued requests. If you place your mouse over the JVM Memory column, you'll see the used and free memory. Finally, if you place your mouse over the Errors column, you'll see that the error count actually sums errors and page timeouts.

You may wonder why you should have to place your mouse over these columns to see this information. You don't. Notice that the bottom of the screen has lots of extra fields, which are initially blank when you come to this screen.

If you select one of the servers in your list (while on the Detail View), however, that line will turn blue and the fields at the bottom of the page will be populated for that server, with the very data shown in the pop-ups.

So why are there two approaches? The pop-up feature is nice when you have many servers listed and you want to get quick insight into one of them while reviewing the list of servers. It simply saves you having to select one just to populate the bottom of the screen and move your eyes to that location: Use whichever approach serves you best. Figure 7 shows both features enabled: a server selected to populate the bottom data and a pop-up displayed.

The Detail View with server selected and pop ups shown

Figure 7. The Detail View with server selected and pop ups shown

You can return to the main view of the Multiserver Monitor (from the Detail View) by clicking the icon just left of the Detail View icon, which is labelled Quick View (if you place your mouse over it.)

Drilling down into the Server Monitor for a selected server

It's nice that you can get more high-level overview data about a selected server, but you may want still more. Of course, the main Server Monitor is available for each server, and you can drill into it to find out much more.

Whether on the detail or the main/quick view page, select a server and click the Monitor button shown at the top of the list of servers (where the Add and Edit buttons are.) That will launch the Server Monitor for that server in a new window/tab of your browser.

Monitoring communication errors with Multiserver Monitor-to-Server Communications

There's one last interface feature of the Multiserver Monitor that requires some explanation. You may notice an Errors tab at the top of the Multiserver Monitor, visible in most of the previous figures. It does not list application errors (errors that would be logged in the application.log file of ColdFusion), but rather, it shows errors in the communication from the Multiserver Monitor—a Flex application—to the ColdFusion server being monitored. See Figure 8.

Errors tab for a server

Figure 8. Errors tab for a server

It shows all the monitored servers and whether any have had errors, and if so, for each, when it last occurred (and how long ago), what the error fault code was, and a string of info and detail about the error. Like the aforementioned Details view, if you select the line for a given server, the bottom of the page shows the same information, but with more room to see each string's details.

(If you're interested instead in tracking application errors, note that those errors appear in the Server Monitor, in the Errors > Requests with Errors page of the Statistics tab, as discussed in Part 2 of this series.)