Best practices for data analytics in Network Quality Analyzer

更新时间:
复制 MD 格式

This topic provides examples of data query and analysis, dashboards, and alerts to help you get started with Network Quality Analyzer.

Prerequisites

Create a client application and set network probing rules. For more information, see Create a client application and Set network probing rules.

Background information

The Network Quality Analyzer in Alibaba Cloud Simple Log Service is a tool for real-time network quality analysis and monitoring. After data is collected through the analyzer, you can analyze it, view it, and set alerts. This topic explains how to customize dashboards, configure alerts, and view analytical data.

Step 1: Find the Logstore that stores the probing data

  1. Log on to the Simple Log Service console.

  2. In the Log Applications area, click Network Quality Analyzer.

  3. In the upper-right corner of the page, click Client Management.

  4. On the Client Management page, find the target client application in the list and click the image.png icon.

  5. In the Application Details panel, click the target Logstore.

  6. In the target Logstore, view the network probing data.

    For more information about the network probing data fields, see Network probing field descriptions.

    Note

    Alternatively, in the project that contains the client application, find the Logstore named ipa-${Application ID}-raw to view the raw probing data.

Step 2: Custom query and analysis

Indexes are preset for all data. Use the `json_extract_scalar` function to extract fields from `attribute.net.origin`.

Example 1

  • Query requirement: View the total number of probes per second for the ping probing method.

  • Search statement:

    * and attribute.net.origin: ping | select date_trunc('second', __time__) as time, sum(cast(json_extract_scalar("attribute.net.origin",'$.count') as bigint)) as total group by time order by time asc limit 10000000
  • Query result:

Example 2

  • Query requirement: Count the distinct device IDs for all probing methods.

  • Search statement:

    *  | select DISTINCT json_extract_scalar("attribute.net.origin",'$.deviceId')
  • Query result:

Example 3

  • Query requirement: View the average packet loss rate per minute for the TCP ping probing method.

  • Search statement:

    * and attribute.net.origin: tcpping | select date_trunc('minute', __time__) as time, avg(cast(json_extract_scalar("attribute.net.origin",'$.loss') as double)) as total group by time order by time asc limit 10000000
  • Query result:

For more information about functions, see Function overview.

Step 3: Add a dashboard

  1. On the Statistical Chart tab of the query results, click Add to Dashboard.

  2. In the dashboard, view the custom report for Network Quality Analyzer.

Step 4: Set an alert

  1. On the Dashboard page, choose Alert > Create Alert in the upper-right corner. The following example shows how to create an alert for a TCP ping packet loss rate that is greater than 0.1.

  2. On the Alert Rule configuration page, click the Add Query Statistics button.

  3. Set Associated Report to the Network Quality Analyzer report, or click Advanced Configuration to customize the configuration for query statistics. For more information, see Create a log-based alert monitoring rule.

  4. Click OK on the Alert Rule configuration page.

    After the configuration takes effect, the system sends an alert notification when the packet loss rate is abnormal.