diff --git a/test/metric_value_benchmark/agent_configs/jmx_config.json b/test/metric_value_benchmark/agent_configs/jmx_config.json index 0e12212fe..49b3e499d 100644 --- a/test/metric_value_benchmark/agent_configs/jmx_config.json +++ b/test/metric_value_benchmark/agent_configs/jmx_config.json @@ -16,8 +16,10 @@ "metrics_collected": { "jmx": [ { - "endpoint": "localhost:2020", - "target_system": "jvm,kafka" + "endpoint": "localhost:2020" + }, + { + "endpoint": "localhost:2030" } ] } diff --git a/test/metric_value_benchmark/jars/spring-boot-web-starter-tomcat.jar b/test/metric_value_benchmark/jars/spring-boot-web-starter-tomcat.jar new file mode 100644 index 000000000..426b7e70c Binary files /dev/null and b/test/metric_value_benchmark/jars/spring-boot-web-starter-tomcat.jar differ diff --git a/test/metric_value_benchmark/jmx_test.go b/test/metric_value_benchmark/jmx_test.go index 8548b4e0a..89d4e5ef8 100644 --- a/test/metric_value_benchmark/jmx_test.go +++ b/test/metric_value_benchmark/jmx_test.go @@ -63,6 +63,7 @@ func (t *JMXTestRunner) SetupBeforeAgentRun() error { "echo 'KAFKA_JMX_OPTS=\"-Dcom.sun.management.jmxremote.port=2020 -Dcom.sun.management.jmxremote.rmi.port=2021 -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false\"'|cat - kafka_2.13-3.6.1/bin/kafka-run-class.sh > /tmp/kafka-jmx-config && mv /tmp/kafka-jmx-config kafka_2.13-3.6.1/bin/kafka-run-class.sh", "sudo chmod +x kafka_2.13-3.6.1/bin/kafka-run-class.sh", "kafka_2.13-3.6.1/bin/kafka-server-start.sh kafka_2.13-3.6.1/config/server.properties >/dev/null 2>&1 &", + "nohup java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=2030 -Dcom.sun.management.jmxremote.local.only=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.rmi.port=2031 -Djava.rmi.server.hostname=127.0.0.1 -jar jars/spring-boot-web-starter-tomcat.jar > /tmp/spring-boot-web-starter-tomcat-jar.txt &", } err = common.RunCommands(startJMXCommands) @@ -81,6 +82,10 @@ func (t *JMXTestRunner) GetMeasuredMetrics() []string { "kafka.request.count", "kafka.request.time.50p", "kafka.network.io", + "tomcat.sessions", + "tomcat.errors", + "tomcat.processing_time", + "tomcat.request_count", } }