Collect logs with chectl
The chectl management tool provides commands to collect Che logs for troubleshooting and diagnostics. These commands automate log collection from the multiple containers that comprise a Eclipse Che installation in the Kubernetes cluster.
Following commands are available to collect Eclipse Che logs from the Kubernetes cluster using the chectl tool:
chectl server:logs-
Collects existing Eclipse Che server logs and stores them in a directory on the local machine. By default, logs are downloaded to a temporary directory on the machine. However, this can be overwritten by specifying the
-dparameter. For example, to download Che logs to the/home/user/che-logs/directory, use the commandchectl server:logs -d /home/user/che-logs/When run,
chectl server:logsprints a message in the console specifying the directory that will store the log files:Eclipse Che logs will be available in '/tmp/chectl-logs/1648575098344'
If Eclipse Che is installed in a non-default namespace,
chectl server:logsrequires the-n <NAMESPACE>parameter, where<NAMESPACE>is the Kubernetes namespace or OpenShift project in which Eclipse Che was installed. For example, to get logs from Che in themy-namespacenamespace, use the commandchectl server:logs -n my-namespace chectl server:deploy-
Logs are automatically collected during the Che installation when installed using
chectl. As withchectl server:logs, the directory logs are stored in can be specified using the-dparameter.