Querying a Tracker
Function
This API is used to query the details of a tracker. The details include the name of the tracker, name of the OBS bucket for storing traces, and prefix of the trace files stored in the OBS bucket.
URI
GET /v1.0/{project_id}/tracker
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
tracker_name |
Yes |
String |
Tracker name. If this parameter is not specified, all trackers of a tenant will be queried. Currently, only one tracker is allowed for each tenant. The tracker name is system. |
Request Parameters
None
Response Parameters
Status code: 200
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. |
tracker_name |
String |
Tracker name. The default value is system. |
tracker_type |
String |
Tracker type. |
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. |
status |
String |
Tracker status. The value can be enabled, disabled, or error. If the value is set to error, the detail field is required for specifying the source of the error. Value:
|
detail |
String |
This parameter is returned only when the tracker status is error. It indicates the cause of the abnormal status, and its value can be bucketPolicyError, noBucket, or arrears. |
is_obs_created |
Boolean |
Whether an OBS bucket is created. 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 |
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. |
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. |
Example Request
GET https://{endpoint}/v1.0/{project_id}/tracker?tracker_name=system
Example Response
Status code: 200
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", "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 |
---|---|
200 |
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. |
500 |
Failed to complete the request because of an internal service error. |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot