Viewing Metrics with Glowroot
This article describes how to use Glowroot in Liferay installations hosted in AWS. For information on how to set up Glowroot in other circumstances, see Using Glowroot with Liferay.
Liferay DXP’s Docker images contain the Glowroot APM tool out-of-the-box. To enable Glowroot, set the GLOWROOT_ENABLED environment variable to true using the customEnv property:
customEnv:
x-glowroot:
- name: GLOWROOT_ENABLED
value: "true"
By default, Glowroot runs as an embedded collector and standalone agent on every replica.
Configuring Glowroot
Glowroot configurations are written in three files:
admin.jsonconfig.jsonglowroot.properties
You can override them using the configmap and customVolumeMounts properties:
configmap:
data:
admin.json: |
<file_contents>
config.json: |
<file_contents>
glowroot.properties: |
<file_contents>
customVolumeMounts:
x-glowroot:
- mountPath: /opt/liferay/glowroot/admin.json
name: liferay-configmap
subPath: admin.json
- mountPath: /opt/liferay/glowroot/config.json
name: liferay-configmap
subPath: config.json
- mountPath: /opt/liferay/glowroot/glowroot.properties
name: liferay-configmap
subPath: glowroot.properties
Using the Glowroot UI
To view the Glowroot UI, use the kubectl port-forward command in the terminal:
kubectl -n liferay-system port-forward liferay-default-0 4000:4000
Then, open your browser to https://localhost:4000. From this URL, you can access the Glowroot dashboard to view the cluster metrics.