增加磁盘IOPS上报方法
This commit is contained in:
@@ -81,6 +81,8 @@ public enum MsgEnum {
|
||||
|
||||
macvlan状态上报("MACVLAN_STATUS_RSP"),
|
||||
|
||||
iops结果上报("IOPS_RESULT"),
|
||||
|
||||
多网IP探测上报("NETWORK_DETECT");
|
||||
|
||||
private String value;
|
||||
|
||||
@@ -440,6 +440,19 @@ public class AgentEndpoint {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@AgentDispatcher(msgId = MsgEnum.iops结果上报)
|
||||
public class iopsResultHandler implements AgentHandler {
|
||||
@Override
|
||||
public UpMsgResponse upHandle(String data, String clientId) {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("clientId", clientId);
|
||||
jsonObject.put("dataType", MsgEnum.iops结果上报.getValue());
|
||||
jsonObject.put("data", data);
|
||||
MqMsg mqMsg = MqMsg.builder().topic(agentMqConfig.getAgentTopic()).content(jsonObject.toString()).build();
|
||||
agentProducer.asyncSend(mqMsg);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user