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.
Procedure
Install and open the cache monitor for each server that you want to view cache statistics
for.
Option | Description |
---|
Production environment: Liberty Server (Store server and Search server) |
To configure cache monitoring on 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>
- 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 at the time of your Docker
container deployment, via the COPY command. 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, 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 cache monitoring on WebSphere Application Server within a Docker container:
- Utilize the following Transaction server Run Engine commands, by entering the following into your Docker container
Dockerfile configuration files before deployment.
- Ensure that you have network access to the Cache Monitor application.
In a
Kubernetes environment, 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 cache monitoring within your development environment: Complete the following
steps for each application server that you want to enable cache monitoring on.
- Install the cache monitor feature by using the
installUtility.bat utility
script within the Liberty or WebSphere Application Server
\bin\ directory.
- Open the server.xml configuration file for editing. This file is found at
the following location.
- Liberty:
Liberty_installdir/usr/servers/default/server.xml
- WebSphere Application Server:
WAS_installdir/wasprofile/config/cells/localhost/nodes/localhost/servers/server1/server.xml
- Add the feature.
<feature>webCacheMonitor-1.0</feature>
- Save and close the file.
- Start or restart the servers where you have enabled the Cache Monitor application.
- Open the Cache Monitor application in your browser:
- On the Transaction server: http://localhost/cachemonitor
- On the Search server:
http://localhost:3737/cachemonitor
- On the Store server:
http://localhost:8080/cachemonitor
|