Help Center > > User Guide> Log Management> Configuring VM Log Collection Paths

Configuring VM Log Collection Paths

Updated at: Mar 17, 2020 GMT+08:00

Application Operations Management (AOM) can collect and display VM logs. VM refers to an Elastic Cloud Server (ECS) or a Bare Metal Server (BMS) running the Linux Operating System (OS). To do so, configure a log collection path according to the following procedure.

Prerequisites

You have installed the ICAgent on a VM according to Installing the ICAgent. Wait for about 5 minutes after the installation is complete. Then you can view the VM in the VM list on the Path Configuration page.

Precautions

  • If you specify a directory, all .log, .trace, and .out text log files in this directory are collected by default. If you specify a log file, only this file is collected. The specified file must be a text file. Other types of log files, such as binary log files, cannot be collected.
  • Ensure that an absolute path of a log directory or file is configured and the path exists. For example, /opt/yilu/work/xig or /opt/yilu/work/xig/debug_cpu.log.
  • The ICAgent does not collect log files from subdirectories. For example, the ICAgent does not collect log files from the /opt/yilu/work/xig/debug subdirectory of /opt/yilu/work/xig.
  • A maximum of 20 log collection paths can be configured for a VM.

Console Mode: Single VM

  1. Log in to the AOM console. In the navigation pane, choose Log Management > Path Configuration, and click the Host Log tab.
  2. In the VM list, click Configure in the Operation column to configure one or more log collection paths for a VM.

    You can use the paths automatically identified by the ICAgent or manually configure paths.
    • Using the Paths Automatically Identified by the ICAgent

      The ICAgent automatically scans the log files of your VM, and displays all the .log, .trace, or .out log files with handles and their paths on the page.

      You can click in the Operation column to add a path automatically identified by the ICAgent to the log collection path list. To configure multiple paths, repeat this operation.

      Figure 1 Using the paths automatically identified by the ICAgent
    • Manually Configuring Log Collection Paths

      If the paths automatically identified by the ICAgent cannot meet your requirements, enter a log directory or file (such as /opt/yilu/work/xig/debug_cpu.log or /opt/yilu/work/xig/*.log) in the Log Collection Path text box, and then click to add the path to the log collection path list. To configure multiple paths, repeat this operation.

      Figure 2 Manually configuring log collection paths

  3. Click OK.

Console Mode: Multiple VMs

You can configure log collection paths for multiple VMs in batches. When your service is deployed on multiple VMs, you can configure log collection paths in batches to reduce workload.

  1. Log in to the AOM console. In the navigation pane, choose Log Management > Path Configuration, and click the Host Log tab.
  2. Configure one or more log collection paths for multiple VMs in batches.

    Select one or more VMs in the list, click Batch Configure, and enter a log directory or file (for example, /opt/yilu/work/xig/debug_cpu.log) in the Log Collection Path text box. To configure multiple paths, click Add Log Collection Path.

    Figure 3 Configuring log collection paths in batches

    If you configure log collection paths for your VM and then configure log collection paths in batches, new paths will be added to the existing path list.

  3. Click OK.

    In the VM list, click in the Log Collection Path column to view the configured log collection paths of the VM.

Viewing VM Logs

After the log collection paths are configured, the ICAgent collects log files from such paths. This operation takes about 1 minute to complete. After collecting logs, you can perform the following operations:

  • Viewing VM Log Files

    In the navigation pane, choose Log Management > Log Files. Click the Host tab to view the collected log files, as shown in the following figure. For details, see Viewing Log Files.

    Figure 4 Viewing VM log files
  • Viewing and Analyzing VM logs

    In the navigation pane, choose Log Management > Log Search. Click the Host tab to view and analyze the collected logs by time range, keyword, and context. For details, see Searching for Logs.

    Figure 5 Viewing and analyzing VM logs

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel