• Simple Message Notification

smn
  1. Help Center
  2. Simple Message Notification
  3. User Guide
  4. SMN Operation Recording
  5. CTS Traces

CTS Traces

Scenarios

After CTS is enabled, CTS starts recording operations on cloud resources. The CTS management console stores the last seven days of operation records.

This section describes how to query or export the last seven days of operation records on the management console.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click Service List and choose Management & Deployment > Cloud Trace Service.
  4. In the left navigation pane, choose Trace List.
  5. Click Filter and specify filters as needed. You can query traces by combining the following filters:
    Figure 1 Specifying filters
    • Trace Source, Resource Type, and Search By

      Select a filter from the drop-down list.

      After you select Trace name for Search By, you also need to select a trace name.

      After you select Resource ID for Search By, you also need to select or enter a resource ID.

      After you select Resource name for Search By, you also need to select or enter a resource name.

    • Operator: Select a specific operator.
    • Trace Status: Select one of All trace statuses, normal, warning, and incident.
    • Time range: You can select start and end time to query traces generated during a time range of the last seven days.
  6. Click on the left of the required trace to expand its details.
  7. Click View Trace. The trace structure details are displayed.

CTS Log Entries

Each log entry consists of a trace in JSON format. A log entry indicates an SMN API request, including the requested operation, the date and time, operation parameters, and information about the user who sent the request. The user information is obtained from the Identity and Access Management (IAM) service.

The following example shows CTS log entries for the CreateTopicDeleteTopic, and  UpdateTopic actions:
{
   "time": "2017-02-15 14:21:50 GMT+08:00",
   "user": "xxx",
   "request": "xxx",
   "response": "xxx",
   "code": 200,
   "service_type": "SMN",
   "resource_type": "topic",
   "resource_id": "topicUrn instance",
   "source_ip": "127.0.0.1",
   "trace_name": "createTopic",
   "trace_rating": "normal",
   "trace_type": "ApiCall",
   "api_version": "2.0",
   "project_id": "tenantId instance",
   "record_time": "2017-02-15 14:21:50 GMT+08:00",
   "trace_id": "xxx"
}

{
   "time": "2017-02-15 14:12:15 GMT+08:00",
   "user": "xxx",
   "response": "xxx",
   "code": 200,
   "service_type": "SMN",
   "resource_type": "topic",
   "resource_id": "topicUrn instance",
   "source_ip": "127.0.0.1",
   "trace_name": "deleteTopic",
   "trace_rating": "normal",
   "trace_type": "ApiCall",
   "api_version": "2.0",
   "project_id": "tenantId instance",
   "record_time": "2017-02-15 14:12:15 GMT+08:00",
   "trace_id": "xxx"
}

{
   "time": "2017-02-13 15:38:30 GMT+08:00",
   "user": "xxx",
   "request": "xxx",
   "response": "xxx",
   "code": 200,
   "service_type": "SMN",
   "resource_type": "topic",
   "resource_id": "topicUrn instance",
   "source_ip": "127.0.0.1",
   "trace_name": "updateTopic",
   "trace_rating": "normal",
   "trace_type": "ApiCall",
   "api_version": "2.0",
   "project_id": "tenantId instance",
   "record_time": "2017-02-13 15:38:30 GMT+08:00",
   "trace_id": "xxx"
}