Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Configuring VM Log Collection Paths

Updated on 2023-11-28 GMT+08:00

AOM can collect and display VM logs. VM refers to an Elastic Cloud Server (ECS) or a Bare Metal Server (BMS) running Linux. To use this function, first configure a log collection path according to the following procedure.

Prerequisites

  • You have installed an ICAgent on a VM according to Installing an 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

  • Ensure that your VMs are ECSs or BMSs running Linux.
  • 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.
  • If the difference between the last modification time of a log file and the current time exceeds 12 hours, the log file will not be collected.
  • For ECSs in the same resource set, logs will be collected based on the latest log collection configuration. AOM and LTS log collection configurations cannot take effect at the same time. For example, if you set log collection paths in AOM for ECSs, the previous LTS collection configurations of all ECSs under the resource set become invalid.
  • When configuring the collection path of VM logs, do not use the log paths for mapping container service logs to VMs. Otherwise, the collected VM logs may be overwritten by container logs.

Configuring Log Collection Paths for a Single VM Through the Console

  1. Log in to the AOM console. In the navigation pane, choose Log > Path Configuration. The Host Log tab page is displayed.
  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.

Configuring Log Collection Paths for Multiple VMs in Batches Through the Console

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 > Path Configuration. The Host Log tab page is displayed.
  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
    NOTE:

    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 them. 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 > Log Files. Click the Host tab to view the collected log files. For details, see Viewing Log Files.

  • Viewing and Analyzing VM logs

    In the navigation pane, choose Log > 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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback