Application Data Collection
Self-detection workflow:
In the start method of Monitor Agent
- Create and start the AppServerMonitorDetector instance, obtain all JVM processes with the run method, and start the corresponding data fetching task.
- Create the AppServerMonitorDetector instance and start a thread to collect the profile data.
- Start MDFListener to receive the MDF or MDF array pushed by the third-party so as to collect the runtime monitoring data.
Periodical fetching workflow:
AppServerMonitorDataCatchWorker (Tomcat), MSCPMonitorDataCatchWorker (MSCP) and JavaMonitorDataCatchWorker (JavaSE). Take Tomcat as an example:
In the run method of AppServerMonitorDataCatchWorker
- Obtain all MBean corresponding to Monitor with the doCaptureMonitorData method and store all Mbean into MDF.
- Process data with the detector.runHandlers method.
- Obtain all MBean corresponding to Profile with the doCaptureProfileData method and store all Mbean into PMDF.
- Display the profile data with apdc.putData.
wherein, Mbean is classified into different types:
MBean queried by AppServer/MSCP: profile: "com.creditease:feature=profiles,*" monitor: "com.creditease:feature=monitors,*"
MBean queried by Java: "java.lang.management" ClassLoadingMXBean MemoryMXBean MemoryPoolMXBean “com.sun.management." GarbageCollectorMXBean ThreadMXBean OperatingSystemMXBean UnixOperatingSystemMXBean