configured_collect_log

Description

Collects diagnostic logs. Similar to zstack-ctl collect_log, the configured_collect_log command can be used to collect new logs and view the log size. You can also specify the log collection time, whether to collect logs of a single management node, database, or compute node, and whether to collect logs of all nodes.

Usage

Parameter Description Example
-p Customizes the YAML configuration file path for log collection. zstack-ctl configured_collect_log -p /var/lib/zstack/
--check Only checks and displays the log size without collecting logs. zstack-ctl configured_collect_log --check
--full (Default) Collects all logs other than database logs, including management node logs, compute node logs, backup storage logs, primary storage logs, and vRouter logs. zstack-ctl configured_collect_log --full
--full-db Collects all logs, including the database logs. zstack-ctl configured_collect_log --full-db
--mn-db Collects management node logs, including the database logs. zstack-ctl configured_collect_log --mn-db
--mn-only Collects only management node logs, excluding database logs. zstack-ctl configured_collect_log --mn-only
--mn-host Collects management node and compute node logs, excluding database logs. zstack-ctl configured_collect_log --mn-host
--since SINCE Collects logs within N days (Nd) or N hours (Nh). zstack-ctl configured_collect_log --since 2d
--from-date FROM_DATE
  • The date and time when logs are collected. Supported formats:
    • yyyy-MM-dd: Sets only the year, month, and day. The hour, minute, and second are 0 by default. For example, 2018-11-22 (equals to 2018-11-22 00:00:00).
    • Sets the specific time, accurate to minutes. For example, 2018-11-22_09:30:00.
  • If you set only FROM_DATE, you can collect logs generated from the value of FROM_DATE to the current time.
  • If you set FROM_DATE to -1, you can collect all logs generated before the deadline.
zstack-ctl configured_collect_log --from-date 2018-11-22
--to-date TO_DATE
  • The date and time when logs stop to collect. The format of this parameter is the same as the FROM_DATE parameter.
  • If you set only the TO_DATE parameter, the value of FROM_DATE is 24 hours earlier than the current time.
zstack-ctl configured_collect_log --to-date 2018-11-23