-
Notifications
You must be signed in to change notification settings - Fork 0
Monitoring Capabilities
Monitoring agent is functionality that allows to
- gather information about available system resources
- CPU
- Memory
- Network
- 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 is launched on the same server with SUT.
- Pinging cometd COORDINATION_SERVER implementation
chassis.coordination.cometd.urland registers on COORDINATION_SERVER after it's available. - Receives Start command from COORDINATION_SERVER.
- Processes received through COORDINATION_SERVER commands and sends responses.
- Receives Stop command from COORDINATION_SERVER.
- goto 2.
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=2Polling 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 doesn't need any configuration. It analyzes whole localhost resources (irrespective how many processes except SUT are launched there).
- To enable SUT monitoring via JMX set
jmx.enabled=trueand add opened jmx service (services) tojmx.servicesinagent.propertiesfile, 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:9875Also you can define name for every service, like:
-Djmx.services=localhost:9885{tomcat},localhost:9875{jetty}
- 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- 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.AgentStarterSince 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'
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.
How to configure your report read [here](Generated reports)
