MOF Agent

MOF Agent Components

  • Main principle of MOF Agent:

    Build in the logic which enables the pre-loaded codes to monitor the businesses with JavaAgent

  • Core components:
    MOFAgent
    MOFClsTransformer
    MOFAdaptor
    MOFInterceptor

  • Core technologies:
    JavaAgent
    Javassist

Hooking Principle of MOF Agent TomCat/MSCP

  • TomcatAdaptor/MSCPAdaptor hooking: TomcatAdaptor/MSCPAdaptor uses two methods, namely onStartup and onLoadClass:

    onStartup loads the targeted hooking class and builts in bytecodes during initialization;  
    onLoadClass hooks codes in the business logic and builts in bytecodes of UAV monitoring codes.
    
  • TomcatIT/MSCPIT parsing: TomcatIT/MSCPIT correponds to class loading and configuration file initialization when TomcatAdaptor/MSCPIT executes onStartup.

  • TomcatPlusIT/MSCPPlusIT parsing: TomcatPlusIT/MSCPPlusIT corresponds to different classes that execute onLoadClass in TomcatAdaptor/MSCPPlusIT and the monitoring logic executed in the method.

  • Key hooking targets and functionality of Tomcat/MSCP:
    Key hooking targets of Tomcat:

    Bootstrap\(createClassLoader\)-->Tomcat loads MOFJar package during initialization and initializes the configuration file  
    Connector\(invoke\)-->Tomcat executes the MOF monitoring logic with the onServiceStart method
    

    Key hooking targets of MSCP:

    MSCPBoot\(createBootClassLoader\): corresponds to the initialization of MOFJar package when MSCP is loaded  
    SystemStarter\(startServer\): corresponds to the MOF monitoring logic executed by the system
    

MOF-MOFAgent Package-level Dependency Structure

  • Key technologies:
    JavaAsssist
    HOOK (hooking framework)
    webAppClassLoader

  • Key classes and functionality:
    TomcatAdpater
    MSCPAdpater
    The profile data and the client monitoring metrics are captured and monitored via the InterceptSupport and hookProxy mechanism.
    The monitoring data is stored in DataStore and provides JMX interface.

  • Key configuration file or script: uavmof.location
    run.sh-->javaAgent
    uav.properties

MOFAgent Class Diagram

MonitorFramework Startup Workflow

results matching ""

    No results matching ""