chiabre / jmeter_prom_exporter

Docker image to run Jmeter exposing Prometheus Listener for Jmeter metrics.
MIT License
3 stars 0 forks source link

metrics endpoint not available #1

Closed ooOOJavaOOoo closed 3 years ago

ooOOJavaOOoo commented 3 years ago

After running the docker container the metrics endpoint is not available to browse

docker run --rm -e JMETER_LOG_LEVEL=DEBUG --name jmeter -i -v ${PWD}:${PWD} -w ${PWD} -p 9270:9270 chiabre/jmeter_prom_exporter:5.4.1-0.6.0 -t test.jmx
START Running Jmeter on Wed Mar 17 20:47:46 UTC 2021
jmeter log level = DEBUG
jmeter defautl args -n -Dlog_level.jmeter=DEBUG -Jprometheus.ip=0.0.0.0
jmeter user args -t test.jmx
Mar 17, 2021 8:47:52 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Creating summariser <summary>
Created the tree successfully using test.jmx
Starting standalone test @ Wed Mar 17 20:47:54 GMT 2021 (1616014074249)
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
Warning: Nashorn engine is planned to be removed from a future JDK release
summary +      1 in 00:00:05 =    0.2/s Avg:  3472 Min:  3472 Max:  3472 Err:     0 (0.00%) Active: 1 Started: 1 Finished: 0
summary +     50 in 00:00:30 =    1.6/s Avg:   607 Min:   108 Max:  2539 Err:     0 (0.00%) Active: 1 Started: 1 Finished: 0
summary =     51 in 00:00:36 =    1.4/s Avg:   663 Min:   108 Max:  3472 Err:     0 (0.00%)
curl http://localhost:9270/metrics
curl: (52) Empty reply from server
chiabre commented 3 years ago

Hi, is the plugin correctly configured in the test plan? Is it publishing the metrics if executed from a standard (not dockerized) jmeter?

If so try it adding

--network host

to the docker run command.

docker run --rm --name jmeter --network host -i -v pwd:/tmp -w /tmp -p 9270:9270 chiabre/jmeter_prom_exporter -t ramp_test_plan.jmx -JTARGET_HOST= webinarlr.lab.akamas.io

WARNING: Published ports are discarded when using host network mode START Running Jmeter on Wed Mar 17 21:13:06 UTC 2021 jmeter log level = OFF jmeter defautl args -n -Dlog_level.jmeter=OFF -Jprometheus.ip=0.0.0.0 jmeter user args -t ramp_test_plan.jmx -JTARGET_HOST=webinarlr.lab.akamas.io Mar 17, 2021 9:13:07 PM java.util.prefs.FileSystemPreferences$1 run INFO: Created user preferences directory. Creating summariser

Created the tree successfully using ramp_test_plan.jmx Starting standalone test @ Wed Mar 17 21:13:08 GMT 2021 (1616015588350) Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445 Warning: Nashorn engine is planned to be removed from a future JDK release summary + 19 in 00:00:21 = 0.9/s Avg: 1304 Min: 753 Max: 3562 Err: 0 (0.00%) Active: 3 Started: 3 Finished: 0

curl http://localhost:9270/metrics

HELP jvm_memory_pool_allocated_bytes_total Total bytes allocated in a

given JVM memory pool. Only updated after GC, not continuously.

TYPE jvm_memory_pool_allocated_bytes_total counter

jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'profiled nmethods'",} 8396288.0 jvm_memory_pool_allocated_bytes_total{pool="G1 Old Gen",} 1.7933024E7 jvm_memory_pool_allocated_bytes_total{pool="G1 Eden Space",} 1.4680064E8 jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'non-profiled nmethods'",} 2072448.0 jvm_memory_pool_allocated_bytes_total{pool="G1 Survivor Space",} 9437184.0 jvm_memory_pool_allocated_bytes_total{pool="Compressed Class Space",} 4786256.0 jvm_memory_pool_allocated_bytes_total{pool="Metaspace",} 4.2312584E7 jvm_memory_pool_allocated_bytes_total{pool="CodeHeap 'non-nmethods'",} 1256448.0

HELP jvm_info JVM version info

TYPE jvm_info gauge

jvm_info{version="11.0.9+11-alpine-r0",vendor="Alpine",runtime="OpenJDK Runtime Environment",} 1.0

HELP jvm_threads_current Current thread count of a JVM

TYPE jvm_threads_current gauge

jvm_threads_current 45.0

HELP jvm_threads_daemon Daemon thread count of a JVM

TYPE jvm_threads_daemon gauge

jvm_threads_daemon 21.0

HELP jvm_threads_peak Peak thread count of a JVM

TYPE jvm_threads_peak gauge

jvm_threads_peak 45.0

chiabre

Il giorno mer 17 mar 2021 alle ore 21:54 ooOOJavaOOoo < @.***> ha scritto:

After running the docker container the metrics endpoint is not available to browse

docker run --rm -e JMETER_LOG_LEVEL=DEBUG --name jmeter -i -v ${PWD}:${PWD} -w ${PWD} -p 9270:9270 chiabre/jmeter_prom_exporter:5.4.1-0.6.0 -t test.jmx

START Running Jmeter on Wed Mar 17 20:47:46 UTC 2021 jmeter log level = DEBUG jmeter defautl args -n -Dlog_level.jmeter=DEBUG -Jprometheus.ip=0.0.0.0 jmeter user args -t test.jmx Mar 17, 2021 8:47:52 PM java.util.prefs.FileSystemPreferences$1 run INFO: Created user preferences directory. Creating summariser

Created the tree successfully using test.jmx Starting standalone test @ Wed Mar 17 20:47:54 GMT 2021 (1616014074249) Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445 Warning: Nashorn engine is planned to be removed from a future JDK release summary + 1 in 00:00:05 = 0.2/s Avg: 3472 Min: 3472 Max: 3472 Err: 0 (0.00%) Active: 1 Started: 1 Finished: 0 summary + 50 in 00:00:30 = 1.6/s Avg: 607 Min: 108 Max: 2539 Err: 0 (0.00%) Active: 1 Started: 1 Finished: 0 summary = 51 in 00:00:36 = 1.4/s Avg: 663 Min: 108 Max: 3472 Err: 0 (0.00%)

curl http://localhost:9270/metrics curl: (52) Empty reply from server

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chiabre/jmeter_prom_exporter/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2WL4FUUO4ENFFQQW2QZVDTEEJILANCNFSM4ZLKXJFQ .