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
Log on to the Simple Log Service console.
In the Log Applications area, click Network Quality Analyzer.
In the upper-right corner of the page, click Client Management.
On the Client Management page, find the target client application in the list and click the
icon.In the Application Details panel, click the target Logstore.
In the target Logstore, view the network probing data.
For more information about the network probing data fields, see Network probing field descriptions.
NoteAlternatively, 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 10000000Query 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 10000000Query result:
For more information about functions, see Function overview.
Step 3: Add a dashboard
On the Statistical Chart tab of the query results, click Add to Dashboard.
In the dashboard, view the custom report for Network Quality Analyzer.
Step 4: Set an alert
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.
On the Alert Rule configuration page, click the Add Query Statistics button.
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.
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.