增加采集内存详情方法
This commit is contained in:
+46
@@ -0,0 +1,46 @@
|
|||||||
|
######################################################################
|
||||||
|
# Build Tools
|
||||||
|
|
||||||
|
.gradle
|
||||||
|
/build/
|
||||||
|
!gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
target/
|
||||||
|
!.mvn/wrapper/maven-wrapper.jar
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# IDE
|
||||||
|
|
||||||
|
### STS ###
|
||||||
|
.apt_generated
|
||||||
|
.classpath
|
||||||
|
.factorypath
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
.springBeans
|
||||||
|
|
||||||
|
### IntelliJ IDEA ###
|
||||||
|
.idea
|
||||||
|
*.iws
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
|
||||||
|
### JRebel ###
|
||||||
|
rebel.xml
|
||||||
|
### NetBeans ###
|
||||||
|
nbproject/private/
|
||||||
|
build/*
|
||||||
|
nbbuild/
|
||||||
|
dist/
|
||||||
|
nbdist/
|
||||||
|
.nb-gradle/
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Others
|
||||||
|
*.log
|
||||||
|
*.xml.versionsBackup
|
||||||
|
*.swp
|
||||||
|
|
||||||
|
!*/build/*.java
|
||||||
|
!*/build/*.html
|
||||||
|
!*/build/*.xml
|
||||||
@@ -83,6 +83,8 @@ public enum MsgEnum {
|
|||||||
|
|
||||||
macvlan状态上报("MACVLAN_STATUS_RSP"),
|
macvlan状态上报("MACVLAN_STATUS_RSP"),
|
||||||
|
|
||||||
|
内存详情上报("MEMORY_DETAILS"),
|
||||||
|
|
||||||
iops结果上报("IOPS_RESULT"),
|
iops结果上报("IOPS_RESULT"),
|
||||||
|
|
||||||
tcpdump结果上报("TCPDUMP_RESULT"),
|
tcpdump结果上报("TCPDUMP_RESULT"),
|
||||||
|
|||||||
@@ -483,7 +483,19 @@ public class AgentEndpoint {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@AgentDispatcher(msgId = MsgEnum.内存详情上报)
|
||||||
|
public class MemoryDetailsHandler implements AgentHandler {
|
||||||
|
@Override
|
||||||
|
public UpMsgResponse upHandle(String data, String clientId) {
|
||||||
|
JSONObject jsonObject = new JSONObject();
|
||||||
|
jsonObject.put("clientId", clientId);
|
||||||
|
jsonObject.put("dataType", MsgEnum.内存详情上报.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