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

Ingesting OBS Files to LTS (Beta)

Updated on 2025-01-24 GMT+08:00

Files in OBS buckets can be imported to LTS at a time or periodically. Then, you can search for, analyze, and process these files. Files in encrypted buckets cannot be imported to LTS. To import such files, delete the buckets' encryption configurations first. For details, see Deleting the Encryption Configuration of a Bucket.

This function is available only for whitelisted users in regions CN North-Beijing4 and CN South-Guangzhou. To use it, submit a service ticket.

Importing Files in a Single OBS Bucket to LTS

  1. Log in to the LTS console.
  2. Choose Log Ingestion > Ingestion Center in the navigation pane and click OBS (Object Storage Service).

    Alternatively, choose Log Ingestion > Ingestion Management in the navigation pane, and click Ingest Log > OBS (Object Storage Service).

    Alternatively, choose Log Management in the navigation pane and click the target log stream to access its details page. Click in the upper right corner. On the displayed page, click the Log Ingestion tab and click Ingest Log. In the displayed dialog box, click OBS (Object Storage Service).

  3. Select a log group from the Log Group drop-down list. If there is no desired log group, click Create Log Group. For details, see Managing Log Groups.
  4. Select a log stream from the Log Stream drop-down list. If there is no desired log stream, click Create Log Stream. For details, see Managing Log Streams.
  5. Click Next: Configurations.
  6. On the Configurations page, set parameters by referring to Table 1.

    Table 1 Configuring the collection

    Type

    Parameter

    Description

    Basic Settings

    Collection Configuration Name

    Enter a name containing 1 to 64 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed. It cannot start with a period or underscore, or end with a period.

    Task Monitoring

    This function is enabled by default.

    It logs task execution statuses to log stream lts-system/lts-obs2lts-statistics, allowing you to view OBS file import data on LTS's Task Monitoring Center and configure alarm rules to promptly detect any import issues.

    OBS Data Source Configuration

    OBS Bucket

    Select the OBS bucket from which log files are imported.

    Folder Prefix

    Enter the prefix (your_prefix/) or the full path (your_prefix/file.gz) of the OBS files to be imported. Only original files whose size less than 5 GB can be imported.

    Regular Expression for File Filtering

    Enter a regular expression for filtering files, so that only files with names matching the regular expression will be imported. If no regular expression is specified, files are not filtered.

    NOTE:

    Assume that there are files aab and aba in the directory:

    • To match only file aab, use regular expression aab, aa, ^aab, or aa.
    • To match only file aba, use regular expression aba, ^aba, or ^ab. Do not use ab, which will also match aab.
    • To match both aab and aba, use regular expression ab or a.*.
    • If there are regular keywords, they must be escaped. For example, {} must be escaped to \{\}.

    Compressed Format

    Auto check, non-compression, and gzip/zip/snappy compression are supported. If you select ZIP, only zip packages containing a single file without any folders are supported.

    Import Interval

    • One-off: LTS imports files only once and does not detect new files.
    • Custom interval: LTS automatically detects new files and imports them at a fixed interval.

      If you enable Restore Archived Files, OBS files in the Archive storage class can be restored. This option must be enabled for Archive files. Restoring Archive files takes some time (an expedited restore of Archive files takes 1 to 5 minutes). For details, see Object Restore Option and Time Required. Clicking Preview in the lower right corner for the first time may time out. Try clicking Preview again.

      NOTE:
      • If a periodic task starts its first scan of files on OBS, the range of the last modification time of the files is (First run time of the period – Fixed interval time, First run time of the period]. For example, if the periodic task starts for the first time at 12:00:00 and the fixed time interval configured for the OBS import task is 10 minutes, then the last modification time of the OBS files scanned for the first time will be within the interval (11:50:00, 12:00:00]. The second period runs at 12:10:00, so the last modification time of the files scanned will be within the interval (12:00:00, 12:10:00].
      • If a one-off task fails to process a file, it will not parse or report any other scanned files to LTS.
      • If a custom-interval task is disabled and then enabled again, the monitoring data continuity can be retained for up to one day.
      • If a custom-interval task fails to process files in an interval, it will not parse or report any other files scanned during that interval to LTS.

    Data Format Configuration

    Log File Code

    The log file encoding format can be UTF-8 or GBK.

    UTF-8 encoding is a variable-length encoding mode and represents Unicode character sets. GBK, an acronym for Chinese Internal Code Extension Specification, is a Chinese character encoding standard that extends both the ASCII and GB2312 encoding systems.

    Extraction Mode

    Select an extraction mode based on the log type. A maximum of 1 MB of an OBS log will be extracted. Any excess will be truncated and discarded.

    NOTE:
    • If a single-line log exceeds 1 MB, the excess of that line will be truncated and discarded.
    • If a block in a multi-line log exceeds 1 MB, the excess of that block will be truncated and discarded.
    • Logs in ORC and JSON formats are parsed as single-line logs. If a single line exceeds 1 MB, the log will be discarded.
    • Single-line - full-text: collects the full text of single-line logs without structuring parsing. To perform structuring parsing on logs, complete OBS file import and then configure structuring parsing by referring to Setting Cloud Structuring Parsing.
    • Multi-line - full-text: collects the full text of multi-line logs (such as stack logs) without structuring parsing. To perform structuring parsing on logs, complete OBS file import and then configure structuring parsing by referring to Setting Cloud Structuring Parsing.
    • ORC: collects logs in ORC format.

      If Custom Time is disabled, the time when logs are collected is used as the log time.

      If Custom Time is enabled, you can specify a field to set the log time. Set the time field key name, value, and time format, and click to verify your settings. If the imported data is written to the Cluster Switch System (CSS), LTS does not support you to set a time two days ago for ORC logs. For details about the custom time format, see Patterns for Formatting and Parsing on the Oracle official website.

    • JSON: collects logs in JSON format.

      If Custom Time is disabled, the time when logs are collected is used as the log time.

      If Custom Time is enabled, you can specify a field to set the log time. Set the time field key name, value, and time format, and click to verify your settings. If the imported data is written to the CSS, LTS does not support you to set a time two days ago for JSON logs. For details about the custom time format, see Patterns for Formatting and Parsing on the Oracle official website.

      Set 1 to 4 JSON parsing layers. The value must be an integer and is 1 by default. This function expands the fields of a JSON log. For example, for raw log {"key1":{"key2":"value"}}, if you choose to parse it into 1 layer, the log will become {"key1":{"key2":"value"}}; if you choose to parse it into 2 layers, the log will become {"key1.key2":"value"}.

  7. After the setting is complete, click Preview in the lower right corner. The preview function scans and returns only the first 10 lines of the first file that meets the conditions.
  8. Check the result preview in the lower part. If the result is correct, click Submit.
  9. The created ingestion configuration will be displayed. During closed beta testing, up to 10 OBS ingestion configurations can be created.

    • Click its name to view its details.
    • Click Modify in the Operation column to modify the ingestion configuration. Ingestion configurations whose import interval is One-off cannot be modified.
    • Click Configure Tag in the Operation column to add a tag.
    • Click Copy in the Operation column to copy the ingestion configuration.
    • Click Delete in the Operation column to delete the ingestion configuration.
      NOTE:

      Deleting an ingestion configuration may lead to log collection failures, potentially resulting in service exceptions related to user logs. In addition, the deleted ingestion configuration cannot be restored. Exercise caution when performing this operation.

    • Click the log stream in the Log Stream column to go to its details page. Then you can search for and analyze logs ingested to LTS. For details, see Log Search and Analysis.

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