Skip to content

Monitoring Capabilities

Nikolay Musienko edited this page Aug 14, 2013 · 25 revisions

Monitoring Capabilities

Monitoring agent is functionality that allows to

  1. gather information about available system resources
    • CPU
    • Memory
    • Network
  2. gather information about testing system via JMX
    • Heap memory and non heap memory
    • Minor and major GC runs.

Current implementation uses Sigar for system resources monitoring and javax.management.MBeanServerConnection for information about System Under Test (SUT) gathering.

Monitoring agent life-cycle.

  1. Monitoring agent is launched on the same server with SUT.
  2. Pinging cometd COORDINATION_SERVER implementation chassis.coordination.cometd.url and registers on COORDINATION_SERVER after it's available.
  3. Receives Start command from COORDINATION_SERVER.
  4. Processes received through COORDINATION_SERVER commands and sends responses.
  5. Receives Stop command from COORDINATION_SERVER.
  6. goto 2.

Monitoring configuration

To start Agent chassis.coordination.http.url should be set in agent.properties file, or with -D option while launching monitoring agent. chassis.coordination.http.url points to HTTP_COORDINATION_SERVER. You can set name of agent in property agent.name (that name will be shown in the report)

chassis.coordination.http.url=http://192.168.56.1:8089
agent.name=someAgentOnSUT    

To make MASTER wait for agent(s) set properties in corresponding environment.properties

chassis.conditions.monitoring.enable=true
chassis.conditions.min.agents.count=2

Polling interval (how often KERNEL sends commands to monitoring agent) could be configured with property chassis.monitoring.pollinginterval. Default value (value defined in default.environment.properties) is 2000 milliseconds.

Sigar configuration.

Sigar doesn't need any configuration. It analyzes whole localhost resources (irrespective how many processes except SUT are launched there).

JMX monitoring configuration.

  1. To enable SUT monitoring via JMX set jmx.enabled=true and add opened jmx service (services) to jmx.services in agent.properties file, or with -D option while launching monitoring agent.
./start_agent.sh -Dchassis.coordination.http.url=http://Http_Coordination_Server:8089 
    -Djmx.enabled=true -Djmx.services=localhost:9885,localhost:9875

Also you can define name for every service, like:

-Djmx.services=localhost:9885{tomcat},localhost:9875{jetty}

  1. To open JMX port during SUT start add properties to application server start script:
-Dcom.sun.management.jmxremote.port=9870 -Dcom.sun.management.jmxremote.ssl=false
    -Dcom.sun.management.jmxremote.authenticate=false
  1. Monitoring agent could be launched from command line:
java -classpath "./modules/chassis/*:./modules/diagnostics/*:./lib/*:./configuration/boot/" 
    -Djava.library.path=./lib/native com.griddynamics.jagger.agent.AgentStarter

Since Jagger 1.2.1 is possible to define custom jmx metrics:

<configuration ...>
        <monitoring>
            <monitoring-sut>
                <jmx-metrics>
                    <jmx-metrics-group groupName="OperatingSystemGroup" objectName="java.lang:type=OperatingSystem">
                        <jmx-metric-attribute>MaxFileDescriptorCount</jmx-metric-attribute>
                        <jmx-metric-attribute>OpenFileDescriptorCount</jmx-metric-attribute>
                    </jmx-metrics-group>
                </jmx-metrics>
            </monitoring-sut>
        </monitoring>
    ...
</configuration>

Note - value must be a 'Number'.

With this configuration in the report will be created plot for group 'OperatingSystemGroup' with values of attributes 'MaxFileDescriptorCount' and 'OpenFileDescriptorCount' from MBean object 'java.lang:type=OperatingSystem'

Add monitoring to tests.

You can monitor test-group components. Just add attribute value monitoringEnabled=true. Example -

        <test-group id="group2" monitoringEnabled="true">
            <test id="tst3" testDescription="w1">
                <load xsi:type="load-user-groups">
                    <user count="22" startCount="22" life="2h" startIn="0" startBy="0"/>
                </load>
                <termination xsi:type="termination-iterations" iterations="100"/>
            </test>
        </test-group>

In your report you will find monitoring graphs.

monitoring

How to configure your report read [here](Generated reports)

Clone this wiki locally