10.4.1 Install Dynamic Cache Monitor

 

+

Search Tips   |   Advanced Search

 

The Dynamic Cache Monitor (Cache monitor) is an installable Web application that displays simple cache statistics, cache entries and cache policy information.

<WAS_HOME>/installableApps/CacheMonitor.ear

For security reasons, you should not use the same host and port as used for your application. Therefore, you first need to create virtual hosts and host aliases for the Cache monitor application:

  1. Create a new virtual host called "cache_monitor". Click...

    Environment | Virtual Hosts | New

    ...in the Administrative Console. Enter cache_monitor into the Name field and click Apply.

  2. Create a new host alias (verify which port numbers are available on your system first) for the cache_monitor host:

    1. Click cache_monitor.

    2. Click Host Aliases in the Additional Properties pane. Click New.

    3. Enter a * (asterisk) into the Host Name field and add <port_number> (for example 9070).

  3. Click OK and save your configuration.

  4. Add a new WebContainer Inbound Chain to your appserver(s):

    1. Click...

      Servers | Application servers | <AppServer_Name> | Web Container Settings | Web container transport chains | New

    2. Enter CacheMonitor for the Transport chain name and click Next.

    3. Enter * for the Host and <port_number> (for example, 9070) for the Port. We also used the port number in the Port name field.

    4. Click Next, check the summary of the settings, click Finish and save your configuration.

  5. This needs to be done for each appserver in the environment. In our scenario we are using three clustered appservers: Web2a and Web2b reside on the same machine, so we need different ports for these two appservers. Web1 resides on a different machine, so we can use the same port number as was used for Web2a. Our configuration is as follows:

    • Port 9070 for Web1 and Web2a
    • Port 9071 for Web2b

    Repeat step 4 for each appserver in your cluster.

    If you have a similar scenario, you also need to add all ports configured in this step to the cache_monitor virtual host that was created in step 2.

We are also using a separate cluster for our EJB containers. We do not need this configuration in the appservers that belong to the EJBcluster.

Now that these preliminary tasks are done, install the Cache monitor application. Here is how to do this:

  1. Open the Administrative Console and verify whether the Cache monitor is already installed. To do so, click...

    Applications | Enterprise Applications

    If CacheMonitor is not displayed in this list, click Install.

  2. On the Preparing for the application installation panel (Figure 10-6), browse to the <WAS_HOME>/installableApps Server path and select the CacheMonitor.ear file. Click OK, then click Next.

  3. On the next panel, enter cache_monitor for the Virtual Host. Click Next.

  4. On the Application Security Warnings pane, click Continue. Accept the default options on the next panel (Step 1) and click Next once again.

  5. Step 2 - Map modules to servers (Figure 10-9).

    On this panel, select your appserver and the Dynamic Cache Monitor Module. Click Apply, then click Next. You do not need to include the Web servers, select only the Web container cluster.

  6. Step 3- Map virtual hosts for Web modules (Figure 10-10).

    We have created a virtual host called "cache_monitor" in step 1 which we are now referring to.

    Check Dynamic Cache Monitor and select the cache_monitor Virtual host from the pull-down menu. Then click Next.

  7. Step 4 - Map security roles to users/group (Figure 10-11).

    Select All Authenticated, then click Next once more. Please note that this installation panel is only important if you have security enabled for your appservers.

  8. Confirm the installation on the Summary window click Finish and Save your changes to the master configuration.

    The Summary pane in Figure 10-12 shows an warning related to the fact that we did not associate the application with any Web server. In the case of Cache Monitor, this is the proper way to do it, as we will not use the Web server(s) to access it.

  9. Restart your appserver(s) - the WEBcluster in our scenario.

    You can access the Cache monitor using a Web browser and the URL

    http://<your_appserver_hostname>:<cache_monitor_port_number>/cachemonitor

    We are using these URLs:

    • http://app1.itso.ibm.com:9070/cachemonitor/ for Web1
    • http://app2.itso.ibm.com:9070/cachemonitor/ for Web2a
    • http://app2.itso.ibm.com:9071/cachemonitor/ for Web2b

    If your appserver is configured for global security, provide a valid user ID and password after invoking the above URL.

Figure 10-13 shows the Cache Monitor start page which allows access to the cache statistics and some configurable parameters. These are configured in the Administrative Console (see Enabling dynamic cache service).

WebSphere Application Server V6 allows you to create several cache instances, so the new version of the Cache Monitor application includes a pull-down box that allows you to select a specific instance.

We explain some functionality of the Cache monitor as we work on our sample scenarios, but please use the WebSphere InfoCenter to fully understand all functionality. The WebSphere Information Center is available at:

http://www.ibm.com/software/webservers/appserv/infocenter.html

The ESI processor's cache is also monitored through the Dynamic Cache Monitor application. In order for the ESI processor's cache to be visible in the Cache monitor, the DynaCacheEsi application must be installed and the esiInvalidationMonitor property must be set to true in the plugin-cfg.xml file. See External caching by Web server plug-in for more information about the ESI processor.

Next