Skip to content

olares logs

Synopsis

The olares logs command retrieves logs from Olares components and services found on the local machine. It searches for each component listed below, collects logs if the component is found, and skips it if not:

  • K3s/Kubelet logs
  • Containerd logs
  • JuiceFS logs
  • Redis logs
  • MinIO logs
  • etcd logs
  • olaresd logs
  • Kubernetes pod info and logs
  • Kubernetes node info
bash
olares-cli logs [option]

Options

OptionShorthandUsageRequiredDefault
--componentsCollects logs from specific components (comma-separated).
Supported values: k3s, containerd, olaresd, kubelet, juicefs, redis, minio, etcd, NetworkManager.
NoAll detectable components
--help-hDisplays help information.NoN/A
--ignore-kube-errorsIgnores errors from kubectl commands (e.g., when Kubernetes API is unreachable) and continues collecting logs.Nofalse
--max-linesLimits the maximum number of lines for each component's logs to prevent large log files.No3000
--output-dirSaves logs to the specified directory. Creates the directory if it does not exist.No./olares-logs
--sinceFetches logs newer than a specified relative duration (e.g., 5s, 2m, 3h).No7d

Example

bash
# Collect all logs with default settings
olares-cli logs

# Collect logs for specific components
olares-cli logs --components k3s,redis,minio

# Collect logs for the last 3 hours only
olares-cli logs --since 3h