<接口地址>:/siteapi/data/snapshot/time
<请求方式>:GET
<请求类型>:URL参数
<响应类型>:JSON
<请求参数>:
参数名称 | 是否必须 | 类型 | 默认值 | 描述 |
task_id | 是 | int | 无 | 任务编号 |
check_time | 是 | int | 无 | 检查时间,时间戳 |
monitor_id | 否 | int | 无 | 监测点ID |
<请求示例>:
curl -H "token:a3af84f7c1d0d935024ba58b5da78aaa" "https://v6-api.jiankongbao.com/siteapi/data/snapshot/time?task_id=64&check_time=1463964437"
<响应数据>:
参数名称 | 数据类型 | 描述 |
data | array | 数据列表 |
monitor_id | int | 监测点ID |
monitor_location | string | 监测点所属地区 |
monitor_ip | string | 监测点IP |
monitor_name | string | 监测点名称 |
check_result | array | 监测点返回结果 |
check_time | string | 时间(unix时间戳) |
resp_result | int | 响应结果 |
resp_status | string | 响应状态 |
resp_time | float | 响应时间 |
resp_summary | array | 当前监控概要,不同的监控类型概要内容不同,以下列举ping监控概要为例 |
task_type | array | 任务类型 |
http监控参数 | ||
dns_time | float | DNS域名解析时间 |
connect_time | float | 建立连接时间 |
appconnect_time | float | SSL握手时间,只适用于https任务 |
process_time | float | 服务器计算时间 |
download_time | float | 下载时间 |
total_time | float | 总计时间 |
size_download | float | 下载的字节数 |
speed_download | float | 下载的速度 |
url | string | 请求url |
content_type | string | 资源类型 |
http_code | int | 响应状态码 |
header_size | int | header的大小 |
request_size | int | request的大小 |
file_time | int | 文件创建的时间 |
ssl_verify_result | int | SSL验证结果 |
redirect_count | int | 跳转计数 |
total_time | float | 总耗时 |
namelookup_time | float | NS查询耗时 |
connect_time | float | 等待连接耗时 |
pretransfer_time | float | 传输前准备耗时 |
size_upload | int | 上传数据的大小 |
size_download | int | 下载数据的大小 |
speed_download | int | 下载速度 |
speed_upload | int | 上传速度 |
download_content_length | int | 下载内容的长度 |
upload_content_length | int | 上传内容的长度 |
starttransfer_time | float | 开始传输的时间 |
redirect_time | int | 重定向耗时 |
__sid | string | 监测点编号 |
mip | string | 监测点IP |
certinfo | array | 认证信息 |
primary_ip | string | 响应ip |
primary_port | int | 响应端口 |
local_ip | string | 监控点ip |
local_port | int | 监控点端口 |
redirect_url | string | 重定向url |
errno | int | 出错状态号 |
errmsg | string | 出错信息 |
Ping监控 resp_summary监控概要 | ||
target_ip | String | 主机IP |
bytes_per_request | int | 数据包大小 |
bytes_total | int | 总数据包大小 |
ttl | int | TTL值 |
raw_data | array | Ping快照(根据不同的监控任务返回不同的快照内容) |
transmitted | int | 发送的包数 |
received | int | 收到的包数 |
loss | int | 丢包率 |
traceroute_raw_data | Array | Traceroute结果 |
Dns监控resp_summary监控概要 | ||
res | string | Dig结果 |
answerfrom | string | 响应ip |
mip | string | 监测点IP |
__sid | string | 监测点编号 |
Tcp监控resp_summary监控概要 | ||
total_time | float | 总响应时间 |
ip | string | 响应ip |
connect_time | float | 等待连接耗时 |
errno | int | 出错号 |
namelookup_time | float | NS查询耗时 |
errmsg | string | 出错信息 |
Udp监控resp_summary监控概要 | ||
namelookup_time | string | NS查询耗时 |
ip | string | 响应ip |
raw_data | string | 响应结果内容 |
process_time | string | 服务器计算时间 |
total_time | float | 总响应时间 |
mip | string | 监测点IP |
__sid | string | 监测点编号 |
Traceroute监控resp_summary监控概要 | ||
raw_data | array | 响应结果内容 |
no_resps | int | 无响应跳数 |
steps | int | 总跳数 |
max_loss | int | 最大无响应跳数比 |
loss | int | 无响应跳数比 |
ip | string | 响应ip |
__sid | string | 监测点编号 |
<响应示例>:
{
"data": [
{
"monitor_id": 1,
"monitor_name": "陕西西安电信",
"monitor_location": "陕西",
"monitor_ip": "123.23.23.23",
"check_result": {
"check_time": "1463964437",
"resp_result": "1",
"resp_status": "302 Moved Temporarily",
"resp_time": "135.20",
"dns_time": "0.63",
"connect_time": "65.47",
"appconnect_time":"100",
"process_time": "69.07",
"download_time": "0.03",
"total_time": "135.20",
"size_download": "0.28",
"speed_download": "2.11",
"resp_summary": {
"url": "http://116.52.1.245/",
"content_type": "text/html; charset=UTF-8",
"http_code": 302,
"header_size": 234,
"request_size": 422,
"filetime": -1,
"ssl_verify_result": 0,
"redirect_count": 0,
"total_time": 135.197,
"namelookup_time": 0.633,
"connect_time": 66.1,
"pretransfer_time": 66.102,
"size_upload": 0,
"size_download": 291,
"speed_download": 2161,
"speed_upload": 0,
"download_content_length": -1,
"upload_content_length": 0,
"starttransfer_time": 135.171,
"redirect_time": 0,
"certinfo": [],
"primary_ip": "116.52.1.245",
"redirect_url": "http://www.yngs.gov.cn/newW/template/index.jsp",
"req_headers": [],
"req_method": "GET",
"req_httpv": "1.1",
"ip": "116.52.1.245",
"resp_httpv": "1.1",
"resp_headers": {
"Date": "Mon, 23 May 2016 00:40:23 GMT",
"Transfer-Encoding": "chunked",
"Location": "http://www.yngs.gov.cn//template/index.jsp",
"Content-Type": "text/html; charset=UTF-8",
"X-Powered-By": "*******************"
}
}
}
}
............... //其他监测点
]
}