<接口地址>:/siteapi/data/snapshot
<请求方式>:GET
<请求类型>:URL参数
<响应类型>:JSON
<请求参数>:
参数名称 | 是否必须 | 类型 | 默认值 | 描述 |
task_id | 是 | int | 无 | 任务编号 |
start_time | 是 | date | 无 | 开始时间 |
end_time | 是 | date | 无 | 结束时间 |
monitor_id | 是 | int | 无 | 监测点ID |
resp_result | 否 | int | 无 | 响应结果,0-失败,1-成功 |
page_size | 否 | int | 10 | 每页条数 |
page | 否 | int | 1 | 当前页码 |
<请求示例>:
curl -H "token:a3af84f7c1d0d935024ba58b5da78aaa" "https://v6-api.jiankongbao.com/siteapi/data/snapshot?task_id=64&start_time=2018-01-01&end_time=2018-01-02&monitor_id=1"
<响应数据>:
参数名称 | 数据类型 | 描述 |
pagination | json object | 分页信息 |
total_records | int | 记录总条数 |
total_pages | int | 总页数 |
current_page | int | 当前页码 |
page_size | int | 每页条数 |
monitor_info | array | 监测点信息 |
monitor_id | string | 监测点ID |
monitor_name | string | 监测点名称 |
monitor_ip | string | 监测点IP |
monitor_location | string | 监测点所属地区 |
data | array | 数据列表 |
check_time | int | 时间(unix时间戳) |
resp_time | int | 响应时间 |
resp_result | float | 响应结果 |
resp_status | string | 响应状态 |
monitor_id | string | 监测点ID |
server_ip | string | 响应服务器ip |
resp_summary | array | 当前监控概要 |
http监控参数 | ||
dns_time | float | DNS域名解析时间(此响应参数仅适用于HTTP/HTTPS类型监控任务) |
connect_time | float | 建立连接时间(此响应参数仅适用于HTTP/HTTPS类型监控任务) |
appconnect_time | float | Ssl握手时间(适用于https任务) |
process_time | float | 服务器计算时间(此响应参数仅适用于HTTP/HTTPS类型监控任务) |
download_time | float | 下载时间(此响应参数仅适用于HTTP/HTTPS类型监控任务) |
total_time | string | 总计时间 |
size_download | string | 下载的字节数 |
speed_download | int | 下载的速度 |
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 | 重定向耗时, |
certinfo | array | 认证信息 |
primary_ip | string | 响应ip |
redirect_url | string | 重定向url |
errno | int | 请求出错号 |
errmsg | string | 请求出错信息 |
ip | string | 响应ip |
http_code_desc | string | 响应状态说明 |
req_headers | array | 请求头信息 |
req_method | string | 请求方式 |
resp_headers | object | 响应头信息 |
__sid | string | 监测点编号, |
mip | string | 监测点IP, |
Ping监控 resp_summary监控概要 | ||
loss | int | 丢包率 |
transmitted | int | 发送的包数 |
bytes_total | int | 总数据包大小 |
target_ip | String | 主机IP |
raw_data | array | Ping快照(根据不同的监控任务返回不同的快照内容) |
ttl | int | TTL值 |
bytes_per_request | int | 数据包大小 |
received | int | 收到的包数 |
Dns监控resp_summary监控概要 | ||
res | string | Dig结果 |
answerfrom | string | 响应ip |
__sid | string | 监测点编号, |
mip | string | 监测点IP |
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 |
process_time | float | 服务器计算时间 |
total_time | float | 总响应时间 |
__sid | string | 监测点编号, |
mip | string | 监测点IP |
Traceroute监控resp_summary监控概要 | ||
loss | int | 无响应跳数比 |
max_loss | int | 最大无响应跳数比 |
no_resps | int | 无响应跳数 |
ip | string | 响应ip |
steps | int | 总跳数 |
raw_data | array | 响应结果内容 |
<响应示例>:
{
"pagination": {
"total_records": 800,
"total_pages": 40,
"current_page": 18,
"page_size": 20
},
"monitor_info": {
"monitor_id": 1,
"monitor_name": "陕西西安电信",
"monitor_location": "陕西",
"monitor_ip": "123.23.23.23",
},
"data": [
{
"check_time": "1463964437",
"resp_result": "1",
"resp_status": "302 Moved Temporarily",
"resp_time": "135.20",
"dns_time": "0.63",
"connect_time": "65.47",
"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": "*******************"
},
............. //其他检测时间
]
}