搜索看看
获取监控进程列表接口
1、示例,下面【2】是参数说明:
请求URL:http://localhost:9999/appInfo/agentList 请求方式:POST 请求参数(Content-Type:application/json): { "wgToken":"65d05df102851c6535322e73b2f99c06", "hostname":"192.168.1.1" } 返回结果: { "msg":"", "code":"0", "data":[ { "cpuPer":1.01, "appName":"wgcloud-server-release", "active":"1", "memPer":3.8, "appPid":"wgcloud-server-release.jar", "threadsNum":"49", "hostname":"10.2.10.19", "createTime":1640614252000, "appType":"3", "readBytes":"60.0", "state":"1", "id":"1475390370966798336", "writesBytes":"0.0" } ] }
2、参数说明:
请求参数(Content-Type:application/json): { "wgToken":"必填,server/config/application.yml里的wgToken配置项的md5加密字符串,大小写均可", "hostname":"必填,主机ip,完全匹配,非模糊查询", } 返回结果: { "msg":"错误信息", "code":"0成功1错误", "data":[ { "cpuPer":"cpu使用率%", "appName":"进程名称", "active":"进程监控状态,1监控中,2已停止", "memPer":"内存使用率%", "appPid":"和进程获取途径对应,1此处存进程id号,2此处存pid文件,3进程名称关键字", "threadsNum":"进程当前使用的线程数量", "hostname":"主机ip", "createTime":"添加时间,毫秒", "appType":"进程获取途径,1进程id号,2进程pid文件,3进程名称关键字", "readBytes":"读取流量,单位M", "state":"进程状态,1正常,2下线", "id":"1475390370966798336", "writesBytes":"写入流量,单位M" } ] }