搜索看看
数据开放接口 / 获取网络设备SNMP监测的数据列表
1、示例,下面【2】是参数说明:
请求URL:http://localhost:9999/snmpInfo/agentList 请求方式:POST 请求参数(Content-Type:application/json): { "wgToken":"65d05df102851c6535322e73b2f99c06" } 返回结果: { "msg":"", "code":"0", "data":[ { "diskPerOid": "1.3.6.1.2.1.25.2.2.0", "sysDescVal": "Linux SNMP 2024 x86_64", "recvAvg": "2:0.07,3:0.0,1:0.6,7:0.0,5:0.0,9:0.0,", "snmpUnit": "byte", "cpuPer": "86.0", "memPerDouble": 68, "pageSize": 20, "remark": "一楼交换机1", "memPer": "68.0", "recvOID": "1.3.6.1.2.1.2.2.1.10", "ifOperStatusValue": "1:1,2:1,3:1,5:1,7:1,9:1,", "cpuPerOID": "1.3.6.1.4.1.2021.11.11.0", "hostname": "45.32.216.123", "sentAvg": "1:0.6,2:0.08,3:0.0,5:0.0,7:0.0,9:0.0,", "sentOID": "1.3.6.1.2.1.2.2.1.16", "state": "1", "id": "1643819667640418304", "temperatureOid": "1.3.6.1.2.1.2.1.0", "snmpCommunity": "public", "diskPer": "56.0", "voltageUnit": "mV", "snmpVersion": "1", "warnLevel": "ERROR", "cpuPerDouble": 86, "active": "1", "memSizeOID": ".1.3.6.1.4.1.2021.4.5.0", "bytesSent": "63070202", "sysDescOid": "1.3.6.1.2.1.1.1.0", "ifOperStatusOid": "1.3.6.1.2.1.2.2.1.8", "voltageValue": "29.0", "voltageOid": "1.3.6.1.2.1.25.2.2.0", "createTime": 1725279294000, "bytesRecv": "529014790", "snmpPort": "161", "page": 1, "temperatureValue": "6.0" } ] }
2、参数说明:
请求参数(Content-Type:application/json): { "wgToken":"必填,server/config/application.yml里的wgToken配置项的md5加密字符串,大小写均可" } 返回结果: { "msg":"错误信息", "code":"0成功1错误", "data":[ { "diskPerOid": "磁盘占用率%的OID,或计算磁盘占用率%的表达式", "sysDescVal": "设备基本信息获取到的值", "recvAvg": "每个接口的下行速率,单位KB/s,接口序号:速率,格式如:1:1,2:1,3:1,5:1,", "snmpUnit": "单位byte,未使用此字段", "cpuPer": "CPU使用率%", "memPerDouble": "内存使用率%", "remark": "一楼交换机1", "memPer": "内存使用率%", "recvOID": "下行入口流量字节数,接口的OID集合", "ifOperStatusValue": "所有接口状态OID采集的状态值,接口序号:接口状态,格式如:1:1,2:1,3:1,5:1,", "cpuPerOID": "CPU使用率OID,或计算CPU使用率的表达式", "hostname": "设备IP", "sentAvg": "每个接口的上行速率量,单位KB/s,接口序号:速率,格式如:1:1,2:1,3:1,5:1,", "sentOID": "上行出口流量字节数OID,接口OID集合", "state": "设备状态,1在线,2下线", "id": "1643819667640418304", "temperatureOid": "设备运行温度OID,或计算设备运行温度的表达式", "snmpCommunity": "snmp团体名称", "diskPer": "磁盘占用率%", "voltageUnit": "设备电压单位", "snmpVersion": "snmp版本,0对应version1,1对应version2c,3对应version3", "warnLevel": "告警级别", "cpuPerDouble": "CPU使用率%", "active": "监控状态,1监控中,2已停止", "memSizeOID": "内存使用率OID,或计算内存使用率的表达式", "bytesSent": "上行出口总计流量,单位byte", "sysDescOid": "设备基本信息OID", "ifOperStatusOid": "所有接口状态OID", "voltageValue": "设备电压值", "voltageOid": "设备电压OID", "createTime": "更新时间,毫秒", "bytesRecv": "下行入口总计流量,单位byte", "snmpPort": "SNMP的端口", "temperatureValue": "设备运行温度值" } ] }