# Traffic Analyzer Management

Before analyzing traffic, you need to create a traffic analyzer. Each traffic analyzer is an independent analysis space that can integrate different types of resources, such as Cloud Connect bandwidth packages. The traffic analyzer will analyze and process the data source according to the specified **sampling interval** and **aggregation dimension**, and store the analysis results. The **storage duration** can be customized. You can create multiple traffic analyzers for different business needs to manage and analyze their respective data traffic.

### **Traffic Analysis Sampling Interval**

- High-precision traffic statistics: Sampling intervals can be configured as 1 minute, 10 minutes, or 1 hour.
- Long-period traffic statistics: The sampling interval is set to 1 day by default.

### **Traffic Analysis Aggregation Dimension and Storage Duration**

> The traffic analyzer supports custom traffic aggregation dimensions.

For Cloud Connect bandwidth package traffic, the supported aggregation dimensions are:

- Unary tuple: Aggregate data by the dimension of **Cloud Connect bandwidth package** resource.
- Binary tuple: Aggregate data by the dimension of **source IP and destination IP**.

#### **Storage Duration**

The storage duration determines the time range that traffic analysis supports for backtracking, with a maximum of 366 days.

#### **How to Choose a Statistical Strategy?**

- High-precision traffic statistics: If you need to cope with timely network traffic bursts, quality degradation, and abnormal interruption issues, it is recommended to configure a high-precision statistics traffic analysis service with a shorter storage duration.
- Long-period traffic statistics: If you need to sort and count network business traffic periodically, such as for network usage evaluation and adjustment, business traffic billing, etc., it is recommended to configure a long-period statistics traffic analysis service with a longer storage duration.

## **Create a Traffic Analyzer**

Before analyzing traffic, you need to create a traffic analyzer.

1. Log into the [Genesis Cloud Console](https://console.ucloud-global.com/nta/list/);

2. Go to All Products -> Monitoring and Operations -> Network Traffic Analysis, and click `Create Traffic Analyzer`

   1. Create a Traffic Analyzer

      1. Choose the statistical strategy

         - High-precision traffic statistics
           - **Traffic Analysis Sampling Interval**: Options include 1 minute, 10 minutes, 1 hour.
           - **Traffic Analysis Storage Duration**: Options include unary tuple and binary tuple aggregation dimensions, with storage duration for each aggregation dimension in days, selectable range 1-366 days.
         - Long-period traffic statistics
           - **Traffic Analysis Sampling Interval**: Option is 1 day.
           - **Traffic Analysis Storage Duration**: Options include unary tuple and binary tuple aggregation dimensions, with storage duration for each aggregation dimension in days, selectable range 1-366 days.

      2. Management Settings

         - Enter the Traffic Analyzer name (length 1-63 characters, supports English, Chinese, numbers, and - _ .).
         - Add Resource Tags: You can complete classification and unified management by creating resource tags and binding resources with the resource. A maximum of 5 resource tags can be bound when creating the resource.

   2. Select Resources

      1. Select Analysis Scenario: Cross-region Traffic

      2. Select Resource Type: Cloud Connect Bandwidth Package

      3. Select Resource: According to the selected region, the system will automatically filter and display the **Cloud Connect Bandwidth Package Resource** belonging to the current account in the region selected for users to choose as needed.

   3. Enable Traffic Analysis

?> After creating a traffic analyzer, a configuration task can be allocated to start traffic capture within 10 minutes. The data generation time depends on the configured traffic analysis sampling interval.

## **Modify Statistical Strategy Configuration**

1. Log into the [Genesis Cloud Console](https://console.ucloud-global.com/nta/list/);
2. Select a traffic analyzer instance to modify the statistical strategy
   - High-precision traffic statistics
     - **Traffic Analysis Sampling Interval**: Options include 1 minute, 10 minutes, 1 hour.
     - **Traffic Analysis Storage Duration**: Options include unary tuple and binary tuple aggregation dimensions, with storage duration in days, selectable range 1-366 days.
   - Long-period traffic statistics
     - **Traffic Analysis Sampling Interval**: Option is 1 day.
     - **Traffic Analysis Storage Duration**: Options include unary tuple and binary tuple aggregation dimensions, with storage duration in days, selectable range 1-366 days.

!> If you adjust and shorten the data storage duration of traffic analysis, the system will immediately clean up historical traffic data that exceeds the range according to the newly configured storage duration, and the cleared data cannot be restored, it is recommended to operate cautiously; If you disable the unary tuple or binary tuple traffic analysis function, all historical traffic data under that dimension will be immediately cleared, and the cleared data cannot be restored, it is recommended to operate cautiously.

## **Stop or Start the Traffic Analyzer**

1. Log into the [Genesis Cloud Console](https://console.ucloud-global.com/nta/list/);
2. Select a traffic analyzer instance to stop/start the traffic analyzer.
   - When the traffic analyzer is in the **started** status (traffic collection and analysis tasks are running normally), the **stop** operation is supported.
   - When the traffic analyzer is in the **stopped** status (traffic collection and analysis tasks are paused), the **start** operation is supported.

## **Batch Stop or Start the Traffic Analyzer**

1. Log into the [Genesis Cloud Console](https://console.ucloud-global.com/nta/list/);
2. Select multiple traffic analyzer instances to stop/start the selected traffic analyzers.
   - When all selected traffic analyzers are in the **stopped** status (traffic collection and analysis tasks are all paused), the **batch start** operation is supported.
   - When all selected traffic analyzers are in the **started** status (traffic collection and analysis tasks are all running normally), the **batch stop** operation is supported.

## **Delete the Traffic Analyzer**

1. The delete operation is supported when the traffic analyzer is in the **stopped** status (traffic collection and analysis tasks are paused).
2. When all selected traffic analyzers are in the **stopped** status (traffic collection and analysis tasks are all paused), the **batch delete** operation is supported.

!> If you perform the traffic analyzer delete operation, all historical traffic data corresponding to the analyzer will be simultaneously cleared, and the cleared data cannot be restored, it is recommended to operate cautiously.