腾讯云云拨测¶
采集腾讯云云拨测任务对象、拨测指标。
配置¶
安装 Func¶
推荐开通 观测云 集成 - 扩展 - 托管版 Func,前置条件会自动安装完成。
如果自行部署 Func,请参考自行部署 Func。
安装脚本¶
准备工作
- 创建访问密钥:在腾讯云
访问管理中为用于采集的子用户创建 API 密钥,并保存SecretId和SecretKey - 配置权限:为该 API 密钥所属的 CAM 子用户授予全局预设策略
ReadOnlyAccess;若使用自定义策略按最小权限授权,需允许cat:DescribeProbeTasks、cat:DescribeProbeMetricData。
Dataflux Func 脚本市场安装下列采集器:
Integration (TencentCloud-CAT Collector),脚本集 IDintegration_tencentcloud_cat,采集云拨测任务对象,并可启动任务对象和指标采集。Integration (TencentCloud-CAT Metric Collector),脚本集 IDintegration_tencentcloud_cat_metric,采集云拨测指标数据。
点击【安装】后,输入相应的参数:
TencentCloud SecretId:腾讯云访问密钥 ID,必填。TencentCloud SecretKey:腾讯云访问密钥 Secret,必填。Your Account Name:自定义账号名,非必填。
云拨测任务本身不按地域区分,采集器无需配置地域。
点击【部署启动脚本】,系统会自动创建 Startup 脚本集,并自动配置相应的启动脚本。
开启后可以在「管理 / 自动触发配置」里看到对应的自动触发配置。点击【执行】,即可立即执行一次,无需等待定期时间。稍等片刻,可以查看执行任务记录以及对应日志。
验证¶
- 在「管理 / 自动触发配置」确认对应任务已存在自动触发配置,并检查任务记录及日志是否有异常。
- 在 观测云「基础设施 / 自定义」查看对象数据:
tencentcloud_cat_task。 - 在 观测云「指标」查看对应指标集:
tencentcloud_cat_browse、tencentcloud_cat_network、tencentcloud_cat_transport、tencentcloud_cat_upload_download、tencentcloud_cat_media_stream、tencentcloud_cat_whois。
指标¶
云拨测按任务类型写入不同指标集:
| 任务类型 | measurement |
|---|---|
| 页面性能 | tencentcloud_cat_browse |
| 网络质量 | tencentcloud_cat_network |
| 端口性能 | tencentcloud_cat_transport |
| 文件传输 | tencentcloud_cat_upload_download |
| 音视频体验 | tencentcloud_cat_media_stream |
| 域名 Whois | tencentcloud_cat_whois |
常见标签¶
以下为指标采集器保留的常见标签。标签名均为写入 观测云 后的名称,采用小写下划线格式。
| 字段 | 说明 |
|---|---|
area |
拨测点所在地域 |
area_id |
拨测点地域 ID |
city |
拨测点城市 |
city_code |
拨测点城市编码 |
cloud_provider |
云厂商标识,固定为 tencentcloud |
destination_city_name |
目的城市名称,文件传输类任务可能返回 |
distinct |
拨测点地域展示名称 |
error_id |
错误 ID |
error_info |
错误信息 |
operator |
拨测点运营商 |
operator_id |
拨测点运营商 ID |
probe_app_id |
拨测应用 ID |
probe_nodes_code |
拨测节点编码 |
target_address |
拨测目标地址 |
task_category |
拨测任务分类 |
task_id |
拨测任务 ID |
task_name |
拨测任务名称 |
task_type |
拨测任务类型 |
task_type_name |
拨测任务类型名称 |
type |
上传/下载类型,文件传输类任务可能返回 |
指标数据中的 host 不作为标签写入,避免与 观测云 内置 host 标签冲突。任务名称统一使用 tencentcloud_cat_task 对象补充的 task_name。
指标集(measurement)¶
tencentcloud_cat_browse
原始指标¶
| metricName | description | unit |
|---|---|---|
average_dns_query_time |
平均 DNS 查询时间 | ms |
average_download_time |
平均下载耗时 | ms |
average_request_time |
平均请求耗时 | μs |
average_response_time |
平均响应耗时 | ms |
average_ssl_time |
平均 SSL 握手耗时 | ms |
average_tcp_connection_time |
平均 TCP 连接耗时 | ms |
block_projection_time |
阻塞阶段预估耗时 | 无参考 |
bytes_received |
接收字节数 | B |
count |
拨测总次数 | count |
d_time |
页面整体加载耗时 | ms |
dns_error_count |
DNS 错误次数 | count |
dns_look_up |
DNS 查询耗时 | ms |
dns_query_time |
DNS 查询耗时 | ms |
document_finish_time |
Document 完成耗时 | ms |
dom_load_time |
DOM 加载耗时 | ms |
element_hijack_count |
元素劫持次数 | count |
err_ele_count |
错误元素数 | count |
error_count |
拨测失败次数 | count |
file_download_size |
下载文件大小 | B |
file_download_speed |
文件下载速度 | 无参考 |
file_download_time |
文件下载耗时 | ms |
first_ele_all_num |
首屏元素数 | count |
first_err_ele_num |
首屏错误元素数 | count |
first_full_time |
首次完全加载耗时 | ms |
first_packet_arrival_time |
首包到达耗时 | ms |
first_screen_time |
首屏耗时 | ms |
hijack_302_count |
302 劫持次数 | count |
hijack_302_success_count |
302 劫持成功次数 | count |
hijack_count |
劫持次数 | count |
hijack_error_count |
劫持错误次数 | count |
hijack_normal_count |
正常劫持次数 | count |
hijack_third_count |
第三方劫持次数 | count |
host_hijack_count |
Host 劫持次数 | count |
http_error_count |
HTTP 错误次数 | count |
k100_time |
100 KB 下载耗时 | ms |
onload_time |
Window onload 耗时 | ms |
overall_download_speed |
整体下载速度 | KB/s |
page_3xx_num |
页面 3xx 跳转次数 | count |
page_start_render |
页面开始渲染耗时 | ms |
projection_dns_query_time |
DNS 查询预估耗时 | 无参考 |
projection_download_time |
下载预估耗时 | 无参考 |
projection_request_time |
请求预估耗时 | 无参考 |
projection_response_time |
响应预估耗时 | 无参考 |
projection_ssl_time |
SSL 预估耗时 | 无参考 |
projection_tcp_connection_time |
TCP 连接预估耗时 | 无参考 |
redirect_count |
重定向次数 | count |
redirect_time |
重定向耗时 | ms |
render_speed |
渲染速度 | 无参考 |
render_time |
渲染耗时 | ms |
request_time |
请求耗时 | ms |
response_time |
响应耗时 | ms |
round_trips |
往返次数 | count |
slow_count |
慢拨测次数 | count |
ssl_error_count |
SSL 错误次数 | count |
ssl_time |
SSL 握手耗时 | ms |
success_count |
拨测成功次数 | count |
tcp_connection_time |
TCP 连接耗时 | ms |
tcp_connects |
TCP 连接次数 | count |
tcp_error_count |
TCP 错误次数 | count |
trans_error_count |
传输错误次数 | count |
计算指标¶
以下指标基于同一拨测周期内的原始指标汇总计算,用于展示页面性能的传输速度和成功率。统计维度为 task_id、area、city、operator、probe_nodes_code。
| metricName | description | unit |
|---|---|---|
overall_transfer_speed |
整体传输速度,公式:(sum("bytes_received") / 1024) / (sum("d_time") / 1000) |
KB/s |
success_rate |
拨测成功率,公式:sum("success_count") / sum("count") * 100 |
percent |
指标集(measurement)¶
tencentcloud_cat_network
原始指标¶
| metricName | description | unit |
|---|---|---|
count |
拨测总次数 | count |
dig_error_count |
DNS 解析错误次数 | count |
dig_success_count |
DNS 解析成功次数 | count |
error_count |
拨测失败次数 | count |
hijack_count |
劫持次数 | count |
ping_count |
Ping 包数 | count |
ping_drop_package_count |
Ping 丢包数 | count |
ping_drop_package_percent |
Ping 丢包百分比 | 无参考 |
ping_error_count |
Ping 错误次数 | count |
ping_success_count |
Ping 成功次数 | count |
ping_time |
Ping 时延 | ms |
ping_timeout_num |
Ping 超时次数 | count |
query_time |
DNS 查询耗时 | ms |
success_count |
拨测成功次数 | count |
tracert_avg_time |
平均 Tracert 时延 | ms |
tracert_error_count |
Tracert 错误次数 | count |
tracert_skip_count |
Tracert 跳过次数 | count |
tracert_success_count |
Tracert 成功次数 | count |
ttl_time |
TTL 值 | s |
计算指标¶
以下指标基于同一拨测周期内的原始指标汇总计算,用于展示网络拨测的整体耗时、成功率、DNS 解析成功率和 Ping 丢包率等。统计维度为 task_id、area、city、operator、probe_nodes_code。
| metricName | description | unit |
|---|---|---|
dns_error_rate |
DNS 解析错误率,公式:sum("dig_error_count") / (sum("dig_success_count") + sum("dig_error_count")) * 100 |
percent |
dns_success_rate |
DNS 解析成功率,公式:sum("dig_success_count") / (sum("dig_success_count") + sum("dig_error_count")) * 100 |
percent |
packet_loss_rate |
Ping 丢包率,公式:sum("ping_drop_package_count") / sum("ping_count") * 100 |
percent |
ping_success_rate |
Ping 成功率,公式:sum("ping_success_count") / (sum("ping_success_count") + sum("ping_error_count")) * 100 |
percent |
success_rate |
拨测成功率,公式:sum("success_count") / (sum("success_count") + sum("error_count")) * 100 |
percent |
total_time |
网络质量整体耗时,公式:avg("query_time") + avg("ping_time") |
ms |
指标集(measurement)¶
tencentcloud_cat_transport
原始指标¶
| metricName | description | unit |
|---|---|---|
avg_error_rate |
平均错误率 | 无参考 |
client_net_speed |
客户端网络速度 | 无参考 |
connection_time |
连接耗时 | ms |
count |
拨测总次数 | count |
d_time |
整体耗时 | ms |
dns_error_count |
DNS 错误次数 | count |
dns_time |
DNS 解析耗时 | ms |
error_count |
拨测失败次数 | count |
max_time |
最大耗时 | ms |
min_time |
最小耗时 | ms |
request_time |
请求耗时 | ms |
response_time |
响应耗时 | ms |
send_true_package_num |
成功发送包数 | count |
ssl_error_count |
SSL 错误次数 | count |
ssl_time |
SSL 握手耗时 | ms |
success_count |
拨测成功次数 | count |
tcp_error_count |
TCP 错误次数 | count |
trans_error_count |
传输错误次数 | count |
verify_error_rate |
校验错误率 | 无参考 |
wait_time |
等待耗时 | ms |
计算指标¶
以下指标基于同一拨测周期内的原始指标汇总计算,用于展示端口拨测成功率和校验成功率。统计维度为 task_id、area、city、operator、probe_nodes_code。
| metricName | description | unit |
|---|---|---|
success_rate |
拨测成功率,公式:sum("success_count") / (sum("success_count") + sum("error_count")) * 100 |
percent |
verify_success_rate |
校验成功率,公式:(1 - sum("verify_error_rate") / (sum("verify_error_rate") + (sum("success_count") * 100))) * 100 |
percent |
指标集(measurement)¶
tencentcloud_cat_upload_download
原始指标¶
| metricName | description | unit |
|---|---|---|
avg_speed |
平均传输速度 | 无参考 |
count |
拨测总次数 | count |
dns_time |
DNS 解析耗时 | ms |
error_count |
拨测失败次数 | count |
file_size |
文件大小 | B |
first_package_time |
首包耗时 | ms |
hijack_count |
劫持次数 | count |
host_hijack_count |
Host 劫持次数 | count |
rec_time |
接收耗时 | ms |
redirect_count |
重定向次数 | count |
redirect_times |
重定向次数 | count |
response_time |
响应耗时 | ms |
send_time |
发送耗时 | ms |
slow_count |
慢拨测次数 | count |
ssl_time |
SSL 握手耗时 | ms |
success_count |
拨测成功次数 | count |
tcp_time |
TCP 连接耗时 | ms |
total_time |
总传输耗时 | ms |
transfer_time |
传输耗时 | ms |
计算指标¶
以下指标基于同一拨测周期内的原始指标汇总计算,用于展示文件上传或下载任务的成功率。统计维度为 task_id、area、city、operator、probe_nodes_code、type。
| metricName | description | unit |
|---|---|---|
success_rate |
文件传输成功率,公式:sum("success_count") / sum("count") * 100 |
percent |
指标集(measurement)¶
tencentcloud_cat_media_stream
原始指标¶
| metricName | description | unit |
|---|---|---|
audio_rate |
音频码率 | 无参考 |
avg_down_speed |
平均下载速度 | 无参考 |
buffer_num |
缓冲次数 | count |
caton_flag |
卡顿标记 | 无参考 |
caton_number |
卡顿次数 | count |
caton_rate |
卡顿率 | 无参考 |
caton_time |
卡顿时长 | ms |
client_net_speed |
客户端网络速度 | 无参考 |
connect_time |
连接耗时 | ms |
connecting_time |
建连耗时 | ms |
count |
拨测总次数 | count |
dns_resolution_time |
DNS 解析耗时 | ms |
download_size |
下载大小 | B |
error_count |
拨测失败次数 | count |
first_buffer_time |
首次缓冲耗时 | ms |
first_down_size |
首次下载大小 | B |
first_down_speed |
首次下载速度 | 无参考 |
first_duration_time |
首次播放时长 | 无参考 |
first_frame |
首帧耗时 | ms |
first_plag_time |
首次播放卡顿耗时 | 无参考 |
fps |
帧率 | 无参考 |
hijack_count |
劫持次数 | count |
hijack_domain_count |
域名劫持次数 | count |
page_first_time |
页面首字节耗时 | ms |
page_one_byte_time |
页面单字节耗时 | 无参考 |
resource_ssl |
资源 SSL 耗时 | 无参考 |
response_time |
响应耗时 | ms |
slow_count |
慢拨测次数 | count |
success_count |
拨测成功次数 | count |
total_buffer_time |
总缓冲时长 | ms |
total_down_time |
总下载耗时 | ms |
total_plag_time |
总播放卡顿耗时 | 无参考 |
video_rate |
视频码率 | 无参考 |
wait_rate |
等待率 | 无参考 |
计算指标¶
以下指标基于同一拨测周期内的原始指标汇总计算,用于展示音视频拨测成功率。统计维度为 task_id、area、city、operator、probe_nodes_code。
| metricName | description | unit |
|---|---|---|
success_rate |
音视频拨测成功率,公式:sum("success_count") / (sum("success_count") + sum("error_count")) * 100 |
percent |
Tip
指标点间隔与腾讯云云拨测任务的拨测频率保持一致。