Skip to content

Commit

Permalink
Add Tomcat JMX Metrics Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sethAmazon committed Apr 10, 2024
1 parent de7dbf7 commit c8ce908
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/metric_value_benchmark/agent_configs/jmx_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
"metrics_collected": {
"jmx": [
{
"endpoint": "localhost:2020",
"target_system": "jvm,kafka"
"endpoint": "localhost:2020"
},
{
"endpoint": "localhost:2030"
}
]
}
Expand Down
Binary file not shown.
5 changes: 5 additions & 0 deletions test/metric_value_benchmark/jmx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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",
}
}

Expand Down

0 comments on commit c8ce908

Please sign in to comment.