Collecting logs using chectl

An installation of Eclipse Che consists of several containers running in the Kubernetes cluster. While it is possible to manually collect logs from each running container, chectl provides commands which automate the process.

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 -d parameter. For example, to download Che logs to the /home/user/che-logs/ directory, use the command

chectl server:logs -d /home/user/che-logs/

When run, chectl server:logs prints 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:logs requires the -n <NAMESPACE> paremeter, where <NAMESPACE> is the Kubernetes namespace or OpenShift project in which Eclipse Che was installed. For example, to get logs from Che in the my-namespace namespace, use the command

chectl server:logs -n my-namespace
chectl server:deploy

Logs are automatically collected during the Che installation when installed using chectl. As with chectl server:logs, the directory logs are stored in can be specified using the -d parameter.

Additional resources