HCL Commerce provides a Dynamic Cache Monitor application for displaying cache
statistics, edge side and disk statistics, cache entries, dependency IDs, and cache policy
information. A Cache Monitor is an installable web application that provides a real-time view
of the current state of dynamic cache.
Note: For version 9.1.18.0 and above, the WebSphere Cache Monitor is not
available for search servers based on Open Liberty stack. Grafana monitoring and Redis
querying remains available to validate the configuration and function of the cache.
Procedure
Install and open the Cache Monitor for each server for which you want to view cache
statistics.
| Option | Description |
|---|
| Production environment: Liberty Server WebSphere Application Server V8.5.5 Liberty,
(Store server and Search server) |
To configure the cache monitoring on WebSphere Application Server V8.5.5 Liberty within a
Docker container:
- Create an XML file, cachemonitor.xml, containing the
following configuration.
<server>
<featureManager>
<feature>webCacheMonitor-1.0</feature>
<feature>restConnector-1.0</feature>
<feature>appSecurity-2.0</feature>
</featureManager>
<administrator-role>
<user>wcsadmin</user>
</administrator-role>
<basicRegistry id="Cache Monitor" realm="Cache Monitor">
<user name="wcsadmin" password="password"></user>
</basicRegistry>
</server>
Note:
- The
restConnector-1.0 and
appSecurity-2.0 features are required to run the Cache
Monitor securely.
- Set the user name and password values for basic authentication to access
the Cache Monitor application.
- Liberty is unable to start if it finds multiple
basicRegistry definitions. If the server.xml or any other
configuration file located at
Liberty_installdir/usr/servers/<profile_name>/
already includes basicRegistry, you will need to merge the
basicRegistry from the
cachemonitor.xml file with the other basicRegistry.
In another scenario, if the server.xml contains an
empty basicRegistry definition, remove it from the
server.xml.
- Copy the cachemonitor.xml configuration file into the
Liberty /configDropins/overrides/ directory within your
Docker container.
This can be done within your Dockerfile
configuration file via the COPY command during your Docker
container deployment. For example:
COPY cachemonitor.xml /opt/WebSphere/Liberty/usr/servers/default/configDropins/overrides/
- Ensure that you have network access to the Cache Monitor
application.
In a Kubernetes environment, the Cache Monitor needs access to be
granted for each pod by using the port-forward
command. For example:
kubectl port-forward POD_NAME -n commerce 8483:8483
Warning: When enabling access, ensure that this URL is not
made accessible to those outside of your organization.
- Access the Cache Monitor application.
For the Store server, you can access the Cache Monitor in your browser
by navigating to
https://localhost:8483/cachemonitor. Note: For the
Search server, the default port is
3738.
|
| Production environment: WebSphere Application Server (Transaction server) |
To configure the cache monitoring on WebSphere Application Server within a Docker container:
- Before deployment, utilize the following Transaction server Run Engine commands by entering the following
into your Docker container Dockerfile configuration
files.
- Ensure that you have network access to the Cache Monitor application.
In a
Kubernetes environment, the Cache Monitor needs access to be granted for each
pod by using the port-forward command. For example:
kubectl port-forward POD_NAME -n commerce 5080:5080
Warning: When enabling access, ensure that this URL is not
made accessible to those outside of your organization.
|
| Developer environment: |
To configure the cache monitoring within your development environment:Complete the following steps fo WebSphere Application Server to enable the cache
monitoring. All WebSphere Dynacaches are accessible through the Extended Cache
Monitor user interface. It lets you inspect every item in the cache as well as clear
(invalidate) specific cache entries or entire caches.
- Using WebSphere Application Server Administrative Console, click
- In the New Application window, click and locate the CacheMonitor.ear file in the
IBM\WebSphere\AppServer\installableApps directory.
- Click Next and select Fast Path
installation. Select the installation options accept the
default values and click Next.
- Map the modules to the servers, and select the application servers to be
monitored. Click Next.
- Map security roles to users or groups. Click Next with
default settings and click Finish. Go to WebSphere Application Server Administrative Console to start the cache monitor.
- Click and check the box next to Dynamic Cache
Monitor. Click Start.
Enable the manager to utilize the Dynamic Cache
Monitor.
- In the WebSphere Application Server Administrative Console, go to .
- Search and click the Dynamic Cache Monitor. The
wintitle Configuration screen for the Dynamic Cache
Monitor is displayed.
- In the Detail Properties section click the link
Security role to user/group mapping.
- Check the box next to Administrator and click the
button at the top labeled Map users.
- Enter the administrator user in the Search string box
and click the Search button.
- Your administrator user should show up in the Available
list below.
- Select the user and click the Arrow to move it to the
Selected list. Click OK
button.
The manager can use Dynamic Cache Monitor as a result.
- Access the Dynamic Cache Monitor
- Access the cachemonitor using a URL similar to the following.
https://localhost:10041/cachemonitor
Note: For additional updates for the cache monitor, see Cache monitor. These updates are not
required to view the Portal caches, and may prevent the display of those caches.
Testing is suggested. |