搜索看看
数据开放接口 / 获取主机系统网络流量(即上下行数据传输速率、数据包、连接数量)接口
1、示例,下面【2】是参数说明:
请求URL:http://localhost:9999/systemInfoOpen/agentNetIoStatesList 请求方式:POST 请求参数(Content-Type:application/json): { "wgToken":"65d05df102851c6535322e73b2f99c06", "hostname":"192.168.1.2", "startTime":"2021-04-26 00:00:00", "endTime":"2021-04-26 23:59:59", "page":1, "pageSize":20 } 返回结果: { "msg":"", "code":"0", "data":{ "pageSize":2, "list":[ { "txbyt":"0.06", "dateStr":"12:57:42", "rxbyt":"1.06", "netConnections":"190", "dropin":"0.0", "rxpck":"0.33", "txpck":"1.0", "hostname":"192.168.1.12", "createTime":1640408262000, "dropout":"0.0", "id":"1474605337184174080" } ], "pageNum":1, "total":15, "pages":8 } }
2、参数说明:
请求参数(Content-Type:application/json): { "wgToken":"必填,server/config/application.yml里的wgToken配置项的md5加密字符串,大小写均可", "hostname":"必填,主机ip,完全匹配", "startTime":"非必填,开始时间", "endTime":"非必填,结束时间", "orderBy":"非必填,排序字段,v3.4.4开始支持此参数,如:TXBYT,RXBYT,NET_CONNECTIONS", "orderType":"非必填,降序或升序,v3.4.4开始支持此参数,DESC或ASC", "page":"必填,第几页", "pageSize":"必填,每页多少条" } 返回结果: { "msg":"错误信息,成功时候为空", "code":"0成功1错误", "data":{ "pageSize":"每页多少条", "list":[ { "txbyt":"发送KB/秒", "dateStr":"12:57:42", "rxbyt":"接收KB/秒", "netConnections":"连接数量,包括tcp,udp,inet", "dropin":"每秒丢弃的传入数据包数", "rxpck":"接收包数/秒", "txpck":"发送包数/秒" "hostname":"主机IP", "createTime":"创建时间,毫秒", "dropout":"每秒丢弃的传出数据包数", "id":"1474605337184174080" } ], "pageNum":"当前第几页", "total":"总共多少条", "pages":"总共多少页" } }