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

Adding Log Dumps

Updated on 2024-09-06 GMT+08:00

AOM enables you to dump logs to Object Storage Service (OBS) buckets for long-term storage. To store logs for a longer time, add log dumps.

AOM offers both periodic and one-off dump modes. You can choose one of them as required.

  • Periodic dump: Current logs are dumped in real time into an OBS bucket and 1-day logs are divided based on the dump cycle.

    To periodically store logs for a long period, add periodic dumps. For details, see Adding Periodical Dumps.

  • One-off dump: Dump historical logs to a log file of an OBS bucket at one time.

    One-off dump is similar to the export function on the Log Search page. You can export up to 5000 logs on that page. When you need to export more logs but the export function cannot meet your needs, dump the logs at a time according to Adding One-Off Dumps.

NOTE:
  • To add a log dump, you must have OBS administrator permissions in addition to AOM and LTS permissions.
  • If you need to dump logs to OBS buckets in real time for long-term storage, use the log dump function of LTS.

Adding Periodical Dumps

Assume that you need to dump the logs of the als0320a component into files in the /home/Periodical Dump directory of the obs-store-test OBS bucket in real time, and the dump cycle is 3 hours, perform the following steps:

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane, choose Log Analysis > Log Dumps.

    NOTE:

    In regions where new log analysis functions are supported, you can access the Log Transfer page through the entry described in Table 2.

  3. Click Add Log Dump in the upper right corner of the page. Then, set parameters according to Table 1 and click OK.

    Table 1 Periodical dump parameters

    Parameter

    Description

    Example

    Dump Mode

    Select Periodic dump.

    Periodic dump

    Filter Criteria

    Logs can be filtered by multiple criteria such as log type, cluster, or namespace, so that you can dump the logs that meet specific criteria.

    Select the Component log type and select the als0320a component.

    Log Group

    Logs can be categorized into logical groups, so that you can dump them based on groups.

    log-group1

    Dump Cycle

    You can divide 1-day logs based on the dump cycle. There are "N" time segments in a day (Number of time segments = 24 hours/Dump cycle). The logs of the same time segment are dumped into the same log file.

    For example, if the dump cycle is set to 3 hours, there are 8 time segments in a day. The logs generated at 00:00–03:00 in a day are dumped to the log file in the Log collection date (format: YYYY-MM-DD) > 00 path, and the logs generated at 03:00–06:00 in a day are dumped to the log file in the Log collection date (format: YYYY-MM-DD) > 03 path. Other time segments can be deduced by analogy.

    3 hours

    Target OBS Bucket

    OBS bucket for storing logs.

    NOTE:

    You must create an OBS bucket first. Click View OBS to create a bucket on the OBS console.

    obs-store-test

    OBS Bucket Directory

    OBS bucket directory for storing logs.

    /home/Periodical Dump

    After the periodical dump is added, the new logs of the specified resource will be dumped into the OBS bucket in real time.

    In the preceding example, the logs of als0320a will be dumped into log files in the /home/Periodical Dump directory of the obs-store-test OBS bucket in real time, and the dump cycle is 3 hours.

    NOTE:

    Periodical dump is a near-real-time dump but has latency in minutes. The latency varies depending on the number of logs and log size. Details are as follows:

    • If the number of logs generated within 5 minutes exceeds 1000 or the log size exceeds 2 MB, the logs are dumped in real time.
    • If the number of logs generated within 5 minutes is less than 1000 or the log size is less than 2 MB, the logs are dumped every 5 minutes.

  4. Download the log files in the OBS bucket to a local host for locating faults.

    1. In the periodical dump list, click the target OBS bucket to go to the Objects page on the OBS console.
    2. On the Objects tab page, find the log files stored in OBS, such as 192.168.0.74_var-paas-sys-log-apm-count_warn.log and 192.168.0.74_var-paas-sys-log-apm-debug_erro.trace.
      Paths of the log files dumped to the OBS bucket: Log file paths are related to the selected log types, as shown in the following table.
      Table 2 Paths of the log files dumped to the OBS bucket

      Log Type

      Log File Path

      Component

      Bucket directory > Log group name > Cluster name > Component name > Log collection date (format: YYYY-MM-DD) > File ID (format: 0X)

      For example, obs-store-test > home > Periodical Dump > log-group1 > zhqtest0112n > als0320a > 2019-03-22 > 03.

      Host

      Belong bucket directory > Log group name > CONFIG_FILE > default_appname > Log collection date (format: YYYY-MM-DD) > File ID (format: 0X)

      OS

      Belong bucket directory > Log group name > Cluster name > Log collection date (format: YYYY-MM-DD) > File ID (format: 0X)

      Names of the log files dumped to the OBS bucket: Host IPv4 address_Log file source_Log file name. Note that slashes (/) in a log file source must be replaced with hyphens (-). For example, 192.168.0.74_var-paas-sys-log-apm-count_warn.log or 192.168.0.74_var-paas-sys-log-apm-debug_erro.trace.

    3. Select the required log file and click Download to download it to the default download path. To save the log file to a custom path, choose More > Download As.

Adding One-Off Dumps

For example, to dump the logs that contain the warn keyword in the last 30 minutes of als0320a to the /home/One-off Dump directory of the obs-store-test OBS bucket, perform the following steps:

  1. Log in to the AOM 2.0 console.
  2. In the navigation pane, choose Log Analysis > Log Dumps.

    NOTE:

    In regions where new log analysis functions are supported, you can access the Log Transfer page through the entry described in Table 2.

  3. Click Add Log Dump in the upper right corner of the page. Then, set parameters according to Table 3 and click OK.

    Table 3 One-off dump parameters

    Parameter

    Description

    Example

    Dump Mode

    Select One-off dump.

    One-off dump

    Filter Criteria

    Logs can be filtered by multiple criteria such as log collection time, cluster, or namespace, so that you can dump the logs that meet specific criteria.

    Set the log collection time to Last 30 minutes, select the als0320a component, and set the keyword to warn.

    Log Group

    Logs can be categorized into logical groups, so that you can dump them based on groups.

    NOTE:

    After a dump task is deleted, log groups will also be deleted.

    log-group2

    Target OBS Bucket

    OBS bucket for storing logs.

    NOTE:
    • If no OBS bucket is available, click View OBS to create a bucket on the OBS console.
    • If you select an unauthorized OBS bucket, AOM will take 15 minutes to authorize the ACL for the bucket. If your configuration fails, try again 15 minutes later.
    • Data cannot be dumped to an OBS bucket whose storage class is Archive or for which cross-region replication has been configured.

    obs-store-test

    OBS Bucket Directory

    OBS bucket directory for storing logs.

    NOTE:

    If this parameter is left blank, logs are stored in the root directory of the OBS bucket by default.

    /home/One-off Dump

    After the one-off dump is added and the dump status changes to Dumped, the historical logs that meet criteria are dumped into the same log file of the OBS bucket at one time.

    For example, the historical logs that contain the warn keyword in the last 30 minutes of als0320a will be dumped to the log-group2_shard_0(custom).log file in the /home/One-off Dump directory of the obs-store-test OBS bucket at one time.

  4. Download the log files in the OBS bucket to a local host for locating faults.

    1. In the one-off dump list, click the target OBS bucket to go to the Objects page on the OBS console.
    2. On the Objects tab page, find the log file stored in OBS, for example, /home/One-off Dump/log-group2_shard_0(custom).log.

      Paths of the log files dumped to the OBS bucket: OBS bucket > Belong bucket directory For example, obs-store-test/home/One-off Dump.

      Names of the log files dumped to the OBS bucket: Log file names are related to dump file formats, as shown in the following table.
      Table 4 Names of the log files dumped to the OBS bucket

      Log File Name

      • Log group name_shard_0(custom), for example, log-group2_shard_0(custom).log
      • Log group name_shard_1(custom)
    3. Select the required log file and click Download to download it to the default download path. To save the log file to a custom path, choose More > Download As.

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