How to collect HCL DX logs from an OpenShift or Kubernetes deployment
Applies to
HCL Digital Experience v8.5 and higher
Introduction
The wpcollector command-line tool automates the collection of Portal logs and configuration files. Running this tool proactively expedites troubleshooting your issues.
This article explains how to run wpcollector on an OpenShift or Kubernetes environment. For other environments, refer to:
- Docker: How to collect Portal logs from the Docker image using wpcollector utility
- On-premises: Automated data collection capability provided by wpcollector tool
Note
If your issue requires tracing, you must manually enable trace strings and reproduce the problem before running wpcollector.
Instructions
Follow these steps to run wpcollector in your container environment.
-
Locate the
dx.nameproperty in yourfull-deployment.propertiesfile to identify the Portal Code pod name. For example:dx.name: dx-core -
Find the specific core pod name by listing the pods in your namespace (for example,
dx-191):-
OpenShift:
-
Verify your current project:
oc projectSample output:
Using project "dx-191" on server "https://api.lab.dx.com:6443". -
List the running pods:
oc get podsSample output:
NAME READY STATUS RESTARTS AGE dx-191-operator-564955dc65-cw7c9 1/1 Running 0 21m dx-core-0 1/1 Running 0 2m47s dx-core-contentui-6c67dd6786-2685b 1/1 Running 0 20m
-
-
Kubernetes:
-
List all available namespaces to identify your Portal deployment project:
kubectl get namespacesSample output:
NAME STATUS AGE default Active 4d dx-191 Active 4d kube-system Active 4d -
List the pods in your identified namespace:
kubectl get pods -n dx-191Sample output:
NAME READY STATUS RESTARTS AGE ambassador-redis-54f6846876-p874m 1/1 Running 0 16m dx-core-0 1/1 Running 0 17m dx-operator-b9b4f9979-8tbvz 1/1 Running 0 14m
-
-
-
Open a shell session in the Portal Core pod. Use the pod name identified in the previous step (for example,
dx-core-0):-
OpenShift:
oc exec -it dx-core-0 -- /bin/bash -
Kubernetes:
kubectl exec -it dx-core-0 -n dx-191 -- /bin/bash
-
-
Run the
wpcollector.shscript from the/opt/HCL/wp_profile/PortalServer/bin/directory:cd /opt/HCL/wp_profile/PortalServer/bin/ ./wpcollector.sh -
After the "BUILD SUCCESSFUL" message appears, navigate to the
/opt/HCL/wp_profile/filesForAutoPDdirectory and get the ZIP file name. For example:wp.mustgather-2021.02.11-14.33.19.166+0000.zip. -
Exit the pod shell and copy the ZIP file to your local machine:
-
OpenShift:
oc cp dx-core-0:/opt/HCL/wp_profile/filesForAutoPD/wp.mustgather-2021.02.11-14.33.19.166+0000.zip /temp/wp.mustgather-2021.02.11-14.33.19.166+0000.zip -
Kubernetes:
kubectl cp -n dx-191 dx-core-0:/opt/HCL/wp_profile/filesForAutoPD/wp.mustgather-2021.02.11-14.33.19.166+0000.zip /temp/wp.mustgather-2021.02.11-14.33.19.166+0000.zip`
-
-
Send the file to HCL Support using the steps provided in the HTTPS and SFTP upload and download instructions.