tencent cloud

TencentDB for MongoDB

Release Notes and Announcements
Release Notes
Announcements
User Guide
Product Introduction
Overview
Strengths
Use Cases
Cluster Architecture
Product Specifications
Features
Regions and AZs
Terms
Service Regions and Service Providers
Purchase Guide
Billing Overview
MongoDB Pricing
Billing Formula
Payment Overdue
Backup Space Billing
Configuration Adjustment Billing
Getting Started
Quickly Creating an Instance
Connecting to a TencentDB for MongoDB Instance
Reading/Writing Database
Operation Guide
Access Management
Instance Management
Node Management
Version Upgrade
Network Configuration
Monitoring
Backup and Rollback
Database Audit
Data Security
SSL Authentication
Log Management
Database Management
Multi-AZ Deployment
Disaster Recovery/Read-Only Instances
Parameter Configuration
Recycle Bin
Task Management
Performance Optimization
Data Migration Guide
Practical Tutorial
Optimizing Indexes to Break Through Read/Write Performance Bottlenecks
Troubleshooting Mongos Load Imbalance in Sharded Cluster
Considerations for Using Shard Clusters
Sample of Reading and Writing Data in MongoDB Instance
Methods for Importing and Exporting Data Based on CVM Connected with MongoDB
What to Do for Errors of Repeated Instance Creation and Deletion of Databases with the Same Names?
Troubleshooting MongoDB Connection Failures
Shard Removal Task: Guide for Confirming the Progress and Troubleshooting Issues
Performance Fine-Tuning
Ops and Development Guide
Development Specifications
Command Support in Sharded Cluster v3.2
Command Support in v3.6
Development Ops
Troubleshooting
Increased Slow Queries
Number of Connections Exceeding Limit
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Backup APIs
Account APIs
Other APIs
Task APIs
Introduction
Data Types
Error Codes
Instance Connection
Shell Connection Sample
PHP Connection Sample
Node.js Connection Sample
Java Connection Sample
Python Connection Sample
Python Read/Write Sample
Go Connection Sample
PHP Reconnection Sample
Product Performance
Test Environment
Test Method
Test Result
FAQs
Cost
Features
Sharded Cluster
Instance
Rollback and Backup
Connection
Data Migration
Others
Service Agreement
Service Level Agreement
Terms of Service
Glossary
Contact Us

CLS Log Shipping

PDF
フォーカスモード
フォントサイズ
最終更新日: 2025-08-22 16:46:37
The log shipping feature of TencentDB for MongoDB (MongoDB) automatically delivers key slow logs, error logs, and operation logs to the Cloud Log Service (CLS). This enables users to leverage CLS's powerful analysis and retrieval capabilities to gain deep insights into log data and quickly identify and resolve issues.

Supported Log Types for Shipping

Slow logs: Record database operations that exceed a specified execution time threshold. These logs are typically used for performance monitoring and optimization, helping developers and Ops personnel identify and resolve performance bottlenecks.
Error logs: Record error information that occurs during database operations, including fatal errors, general errors, and warnings. These logs are used for troubleshooting and system maintenance, helping quickly locate and resolve runtime issues.
Operation logs: Record all database operation events, including queries, updates, deletions, and more. They also capture the users performing these operations and related permission details, supporting auditing and compliance checks to ensure data security and integrity.

Billing Overview

CLS is an independently billed third-party cloud product. When log shipping is enabled for MongoDB, CLS charges traffic fees based on the volume of shipped logs. It supports two billing methods: pay-as-you-go (postpaid) and resource package (prepaid). For detailed billing standards, see CLS Billing Overview.

Enabling Log Shipping

2. In the left sidebar, expand the MongoDB dropdown list and select either Replica Set Instance or Shard Instance. The operations for replica set instances and sharded instances are similar.
3. Select a region at the top of the instance list page on the right.
4. Locate the target instance in the instance list.
5. Click the Target Instance ID to go to the Instance Details page.
6. Select the Log Management tab, and then select the CLS Log Shipping tab, as shown below.

7. MongoDB Log Management automatically detects whether CLS is enabled and whether the service role is authorized. Follow the on-screen prompts to enable the service or grant the required permissions. Slow logs, error logs, and operation logs can be configured individually as needed. For example, to enable slow logs, click Enable now, and in the Enable Log Delivery window, select the log topic and logset for shipping.

Parameter
Description
Destination region
Select the region for log shipping. Cross-region shipping is supported.
Log topic operations
Note:
CLS manages stored log data using log topics and logsets. A log topic is the basic unit for log data collection, storage, retrieval, and analysis, while a logset serves as a classification method for organizing log topics to simplify management.
Select existing log topic: In the logset dropdown list, select a logset that has already been created in the CLS console, and then choose the corresponding log topic from the Log topic dropdown list.
Create Log Topic: Create a logset for log shipping. In the Log Topic input box below, enter the name of the log topic. For specific requirements, see log topic. Then, in logset operation, choose whether to add the new log topic to an existing logset or to create a logset for the topic.
Select the existing logset In the logset dropdown list, select an existing logset for the created log topic.
Create Logset: In the logset input box, enter a new logset name. For specific requirements, see logset.
8. Click Enable Now to enable the log shipping feature. As shown below, click Search and Analysis to go to the retrieval and analysis page of the CLS service, where you can directly analyze logs using CLS retrieval and analysis rules. For details, see Search and Analysis.


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック