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

Creating a Tracker

Updated on 2024-05-22 GMT+08:00

Function

When you enable CTS, a tracker is automatically created to associate with the cloud services you are using and record all operations on the services. Currently, only one management tracker can be created for a cloud account in a region. Traces are retained in the CTS console for seven days. For long-term storage, you can enable Object Storage Service (OBS) and deliver real-time operation records to OBS buckets.

URI

POST /v1.0/{project_id}/tracker

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain a project ID, see Obtaining a Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

bucket_name

Yes

String

OBS bucket name. The value contains 3 to 63 characters and must start with a digit or lowercase letter. Only lowercase letters, digits, hyphens (-), and periods (.) are allowed.

file_prefix_name

No

String

Prefix of trace files that need to be stored in OBS buckets. The value can contain 0 to 64 characters, including letters, digits, hyphens (-), underscores (_), and periods (.).

is_obs_created

No

Boolean

Whether an OBS bucket is created. The default value is false. If the value is true, an OBS bucket will be created to store trace files. If the value is false, trace files will be stored in an existing OBS bucket. A bucket name contains 3 to 64 characters, including digits, letters, and a hyphen (-) or a period (.).

is_support_trace_files_encryption

No

Boolean

Whether trace files are encrypted during transfer to an OBS bucket. This parameter must be used with kms_id.

kms_id

No

String

Key ID used for transferring and encrypting trace files. This key ID is obtained from Key Management Service (KMS). This parameter is mandatory when is_support_trace_files_encryption is set to true.

lts

No

Lts object

Trace analysis.

log_file_validate

No

LogFileValidate object

File verification.

Table 3 Lts

Parameter

Mandatory

Type

Description

is_lts_enabled

Yes

Boolean

Whether the LTS search function is enabled.

log_group_name

Yes

String

Name of the log group that CTS creates in LTS.

log_topic_name

Yes

String

Name of the log topic that CTS creates in LTS.

Table 4 LogFileValidate

Parameter

Mandatory

Type

Description

is_support_validate

Yes

Boolean

Whether to enable trace file verification.

Response Parameters

Status code: 201

Table 5 Response body parameters

Parameter

Type

Description

id

String

Unique tracker ID.

create_time

Long

Timestamp when the tracker was created.

domain_id

String

Account ID. For details about how to obtain an account ID, see Obtaining an Account ID.

project_id

String

Project ID.

is_support_trace_files_encryption

Boolean

Whether trace files are encrypted during transfer to an OBS bucket. This parameter must be used with kms_id.

kms_id

String

Key ID used for transferring and encrypting trace files. This key ID is obtained from Key Management Service (KMS). This parameter is mandatory when is_support_trace_files_encryption is set to true.

obs_info

ObsInfo object

Information about the bucket to which traces are transferred.

status

String

Status of a tracker. The value enabled indicates normal status.

tracker_name

String

Tracker name.

tracker_type

String

Tracker type.

group_id

String

Unique ID of a log group.

stream_id

String

Unique ID of a log stream.

lts

Lts object

Trace analysis.

is_support_validate

Boolean

Whether to enable trace file verification. This function is supported only when the value of tracker_type is system.

Table 6 ObsInfo

Parameter

Type

Description

bucket_name

String

OBS bucket name. The value contains 3 to 63 characters and must start with a digit or lowercase letter. Only lowercase letters, digits, hyphens (-), and periods (.) are allowed.

file_prefix_name

String

Prefix of trace files that need to be stored in OBS buckets. The value can contain 0 to 64 characters, including letters, digits, hyphens (-), underscores (_), and periods (.).

is_obs_created

Boolean

Whether the OBS bucket is automatically created by the tracker.

is_authorized_bucket

Boolean

Whether CTS has been granted permissions to perform operations on the OBS bucket.

bucket_lifecycle

String

Duration that traces are stored in the OBS bucket. This parameter is valid when tracker_type is set to data.

Table 7 Lts

Parameter

Type

Description

is_lts_enabled

Boolean

Whether the LTS search function is enabled.

log_group_name

String

Name of the log group that CTS creates in LTS.

log_topic_name

String

Name of the log topic that CTS creates in LTS.

Example Request

POST https://{endpoint}/v1.0/{project_id}/tracker

{
 "bucket_name": "obs-f1da", 
 "is_support_trace_files_encryption": true, 
 "kms_id": "13a4207c-7abe-4b68-8510-16b84c3b5504",
 "is_obs_created": true,
 "file_prefix_name": "yO8Q",  
 "lts": {
  "is_lts_enabled": true,
  "log_group_name": "CTS",
  "log_topic_name": 'system-trace'
 }, 
  "log_file_validate": {
 "is_support_validate": true
 }
}

Example Response

Status code: 201

The request is successfully sent.

{
  "id" : "2e6fa9b8-8c6e-456d-b5d3-77be972d220b",
  "create_time" : 1587958482923,
  "domain_id" : "aexxxxxxxx4d4fb4bexxxxxxx791fbf",
  "is_support_trace_files_encryption" : true,
  "kms_id" : "13a4207c-7abe-4b68-8510-16b84c3b5504",
  "obs_info" : {
    "bucket_name" : "obs-f1da",
    "file_prefix_name" : "yO8Q"
  },
  "project_id" : "bb1xxxxxxxxe4f498cbxxxxxxxx35634",
  "lts" : {
    "is_lts_enabled" : true,
    "log_group_name" : "CTS",
    "log_topic_name" : "system-trace"
  },
  "log_file_validate" : {
    "is_support_validate" : true
  },
  "tracker_name" : "system",
  "tracker_type" : "system",
  "status" : "enabled"
}

Status Codes

Status Code

Description

201

The request is successfully sent.

400

The server failed to process the request.

401

The request is rejected due to authentication failure.

403

The server understood the request but refused to authorize it.

404

The requested OBS bucket does not exist.

500

Failed to complete the request because of an internal service error.

Error Codes

For details, see Error Codes.

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