Rate This Document
Findability
Accuracy
Completeness
Readability

Collecting HAF Logs in One-Click Mode

The one-click log collection function is used to pack all logs in the log_directory directory. The packed logs are stored in /var/log/haf/log_collection.tar by default.

The configuration file of log_directory on a host node is in /opt/haf-host/haf.conf.

The configuration file of log_directory on an offload node is haf.conf in the running path, for example, /opt/haf-target/haf.conf.

  • Run the following command on the host node:

    /opt/haf-host/tools/haf-tool collect

  • Run the following command on the offload node:

    su -s /bin/bash - haf -c "haf-tool collect"

    Collect successfully, the output package is /var/log/haf/log_collection.tar

The following uses SmartKit log collection on an offload node as an example.

  1. Select Command Execution and click Add a Task.
  2. Edit the task content and click Save.

    Parameter

    Description

    Task Name

    One-click log collection and packaging

    Run Directory

    /

    Run Command

    su -s /bin/bash - haf -c "haf-tool collect"

  3. Select File Transfer and click Add a Task.

    Before using SmartKit to download logs, you must obtain customers' authorization.

  4. Edit the task content and click Save.

    Parameter

    Description

    Task Name

    Collecting and packing logs to the local PC.

    Transfer Direction

    From Remote to Local

    Local Path

    Directory where the local installation package is stored

    Remote Path

    /log_directory/haf/log_collection.tar

    The root directory of logs stored in the remote path is the value of the log_directory field in the haf_target_install.conf file during installation. The default value is /var/log.