Configuration Manual for Collector 「Tencent Cloud-MongoDB Slow Query Logs」
Before reading this, please refer to:
Before using this collector, you must install the 「Integration Core Package」and its corresponding third-party dependency packages
This script's code execution depends on MongoDB instance object collection. If MongoDB custom object collection is not configured, the slow log script will not be able to collect slow log data
1. Configuration Structure
The configuration structure of this collector is as follows:
Field | Type | Required | Description |
---|---|---|---|
regions |
list | Required | List of regions to collect data from |
regions[#] |
str | Required | Region ID. For example: 'ap-nanjing' Refer to the appendix for the complete table |
2. Configuration Example
Specified Region
Collect MongoDB slow query log data from the Nanjing region.
Python | |
---|---|
1 2 3 |
|
3. Data Reporting Format
After data synchronization, you can view the data in the 「LOG」section of TrueWatch.
An example of reported data is as follows:
JSON | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
Fields in tags and fields may change with subsequent updates
Values in tags are supplemented by custom objects
fields.message is a string serialized in JSON format
fields.Slowlog is each record of all slow query detail records
X. Appendix
TencentCloud-MongoDB 「Regions」
Please refer to the official Tencent documentation:
TencentCloud-MongoDB 「Slow Log Information Documentation」
Please refer to the official Tencent documentation: