Configuring the CLI Activity Tracker
The CLI Activity Tracker monitors running CLI processes in workspace containers and prevents workspace idling while those processes are active. As an administrator, you can enable and configure this feature cluster-wide through the CheCluster custom resource. The operator propagates these settings as environment variables to all workspace containers.
When the CLI Activity Tracker is enabled, it periodically scans for active CLI processes. If it detects a watched process, it resets the workspace idle timer, preventing the workspace from stopping while unattended tasks such as builds, deployments, or long-running scripts are in progress.
All timing fields are optional. When omitted, the CLI Activity Tracker calculates defaults dynamically based on the workspace idle timeout.
-
An active
kubectlsession with administrative permissions to the destination Kubernetes cluster. See Overview of kubectl.
-
Enable the CLI Activity Tracker:
kubectl patch checluster eclipse-che \ --namespace eclipse-che \ --type merge \ --patch '{ "spec": { "devEnvironments": { "cliActivityTracker": { "enabled": true } } } }' -
Optional: Configure timing parameters to fine-tune the CLI Activity Tracker behavior:
kubectl patch checluster eclipse-che \ --namespace eclipse-che \ --type merge \ --patch '{ "spec": { "devEnvironments": { "cliActivityTracker": { "enabled": true, "secondsOfCheckPeriod": <check_period>, "secondsOfActivityWindow": <activity_window>, "secondsOfGracePeriod": <grace_period>, "secondsOfMaxProcessAge": <max_process_age> } } } }'Table 1. CLI Activity Tracker timing parameters Parameter Description secondsOfCheckPeriodHow often (in seconds) to scan for active CLI processes.
secondsOfActivityWindowHow long (in seconds) to wait for input from interactive processes before considering them idle.
secondsOfGracePeriodDuration (in seconds) during which newly started processes unconditionally prevent idling.
secondsOfMaxProcessAgeSafety limit (in seconds). Processes older than this value stop preventing idling.
-
To disable the CLI Activity Tracker, remove the
cliActivityTrackersection or setenabledtofalse:kubectl patch checluster eclipse-che \ --namespace eclipse-che \ --type merge \ --patch '{ "spec": { "devEnvironments": { "cliActivityTracker": { "enabled": false } } } }'