johrstrom / jmeter-prometheus-plugin

A Prometheus Listener for Apache JMeter that exposes results in an http API
Apache License 2.0
168 stars 111 forks source link

Not All metrics pushed to 9270 port #81

Open pkumarsingh opened 4 years ago

pkumarsingh commented 4 years ago

I am using the JMeter script and grafana dashboard which is attached in the source code. However, I don't see all the metrics being pushed to 9270 port. The Dashboard is showing empty data.

For e.g. ResponseTime_sum, ResponseTime_count etc are not listed under metrics.

johrstrom commented 4 years ago

Hi! Sorry for the late reply. I haven't had time to look into it, but I'm guessing there's some mis match inbetween the default metrics, the jmeter script and the grafana dashboard.

dhanyanayak24 commented 2 years ago

hi,

I was trying Johrstrom's post of integrating jmeter with prometheus .I placed the jar file 0.6.0 in the jemeter bin/ext folder and then gave the host details for prometheus i.e http://localhost:9090 and localhost:9270 for jmeter job but http://localhost:9270 is not showing any data , it is not coming up even. What is the setup i am missing anywhere to make this up and see the jmeter metrics there.I did the changes in yaml file and ran the test..restarted prometheus as well but the url http://localhost:9270 is not coming up.

prometheus yaml file:

A scrape configuration containing exactly one endpoint to scrape:

Here it's Prometheus itself.

scrape_configs:

The job name is added as a label job=<job_name> to any timeseries scraped from this config.

prometheus url is up but i cannot see any meter related parameters there.So how can i fix my issue and integrate the jmeter result

johrstrom commented 2 years ago

It's not enough just to have the jar, you need the listener as a part of your testplan.

dhanyanayak24 commented 2 years ago

Yes,i do have the promotheus listener details added in test plan and now i could see the listnener parameters are showing up in http:local host:9270 when i run jmeter test but i dnt see the metrics in Prometheus nor grafana.

I have installed jmeter in my local n Prometheus and grafana in docker..Is that is why my data is not pulled into Prometheus.

Thanks Dhanya

On Mon, 10 Jan, 2022, 20:01 Jeff Ohrstrom, @.***> wrote:

It's not enough just to have the jar, you need the listener as a part of your testplan.

— Reply to this email directly, view it on GitHub https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1008928893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXHLKU5RUED5AQEQAMWABRTUVLUUHANCNFSM4OAVHYEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

johrstrom commented 2 years ago

Oh i see. OK then you may have to connect the containers. That is, localhost:9270 probably doesn't resolve to your actual localhost where your jmeter is running.

Try using the --network host docker arguements so that it can see the jmeter instance as the same localhost as it.

dhanyanayak24 commented 2 years ago

hi Jeff,

Thanks for your help!

For time-being I dropped the idea of docker. I am just setting up jmeter-prometheus and grafana in a VM. Is it possible to run multiple jmeter test at the same time in a VM using 2 instances of jmeter and then view the results like response time and other parameters in grafana or prometheus for both the test based on the labels during the execution of both the tests.

Issue1: 1.I started the run at almost the same time in both the instances.But in Grafana or prometheus, it shows the data only for one test whichever we trigger first. Say if we are triggering the Test1 a second before the test 2, only the test1 data is displayed in prometheus and grafana. How to fix this issue?

2.We want to create a dashboard where we can see the results for all the multiple tests which are running currently.

Issue2: https://github.com/johrstrom/jmeter-prometheus-plugin/issues/66 You mentioned that the issue related thread count is fixed in 66,is this 66 is a new jar where this fix is available.Now we are not getting correct jmeter thread count.Lets say if we are running 2 tests of threads 10 n 15 each. thread count shows only 10 if the test1 is executed first. it doesnt sum up the threads of 2 tests n show in grafana.How can i fix this issue?It is similar to my issue 1.

Please help us so that i can create a required dashboard. Your input will be much appreciated.

Thanks Dhanya

On Mon, Jan 10, 2022 at 9:46 PM Jeff Ohrstrom @.***> wrote:

Oh i see. OK then you may have to connect the containers. That is, localhost:9270 probably doesn't resolve to your actual localhost where your jmeter is running.

Try using the --network host docker arguements so that it can see the jmeter instance as the same localhost as it.

— Reply to this email directly, view it on GitHub https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1009040017, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXHLKUZOK2ZORI4XMLFVFP3UVMA65ANCNFSM4OAVHYEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

chiabre commented 2 years ago

Hi Dhanya, yep, you can scrape data from 2 JMeters instances running in parallel.

From a technical standpoint, this set-up is quite similar to a distributed test where a Jmeter master controls 2+ Jmeter slaves, each one exposing its own metrics.

From a JMeter perspective, 2 instances/test plans running in parallel are not common/recommended (at least from my pov) since you should be able to generate the same workload from a single instance/test plan.

If you run the 2 JMeter instances on the same server keep in mind to configure 2 different ports in the JMeter exporters otherwise the second one that you will start won't able to bind to that port (that's most likely the issue that you are facing)

Generally speaking before looking at the data in Grafana I suggest checking that the 2 JMeter exporters are correctly configured as targets in Prometheus. Once you have the data in Prometheus building a dashboard in Grafana is just a matter of defining the right PROMQL query to aggregate the data.

Luca

On Mon, Jan 17, 2022 at 10:54 AM dhanyanayak24 @.***> wrote:

hi Jeff,

Thanks for your help!

For time-being I dropped the idea of docker. I am just setting up jmeter-prometheus and grafana in a VM. Is it possible to run multiple jmeter test at the same time in a VM using 2 instances of jmeter and then view the results like response time and other parameters in grafana or prometheus for both the test based on the labels during the execution of both the tests.

Issue1: 1.I started the run at almost the same time in both the instances.But in Grafana or prometheus, it shows the data only for one test whichever we trigger first. Say if we are triggering the Test1 a second before the test 2, only the test1 data is displayed in prometheus and grafana. How to fix this issue?

2.We want to create a dashboard where we can see the results for all the multiple tests which are running currently.

Issue2: https://github.com/johrstrom/jmeter-prometheus-plugin/issues/66 You mentioned that the issue related thread count is fixed in 66,is this 66 is a new jar where this fix is available.Now we are not getting correct jmeter thread count.Lets say if we are running 2 tests of threads 10 n 15 each. thread count shows only 10 if the test1 is executed first. it doesnt sum up the threads of 2 tests n show in grafana.How can i fix this issue?It is similar to my issue 1.

Please help us so that i can create a required dashboard. Your input will be much appreciated.

Thanks Dhanya

On Mon, Jan 10, 2022 at 9:46 PM Jeff Ohrstrom @.***> wrote:

Oh i see. OK then you may have to connect the containers. That is, localhost:9270 probably doesn't resolve to your actual localhost where your jmeter is running.

Try using the --network host docker arguements so that it can see the jmeter instance as the same localhost as it.

— Reply to this email directly, view it on GitHub < https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1009040017 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AXHLKUZOK2ZORI4XMLFVFP3UVMA65ANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1014684571, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2WL4BLOB2WXE2S4F36QRLUWQ3U3ANCNFSM4OAVHYEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

dhanyanayak24 commented 2 years ago

Hi Luca,

Thanks for your quick reply and input. I tried giving 2 exporters in my target json file which i am passing in yaml file in prometheus but still the data is displayed only in 9270 port (the default one) and the the other test data is not still showing up in 9271 which i had set in my json file as below:

[{"targets":["localhost:9090"],"labels":{"env":"local","job":"prometheus"}},{"targets":["localhost:9270", "localhost:9271"],"labels":{"env":"local","job":"jmeter"}}]

Can you please let me know what is the mistake I am doing here.I am trying this locally in my machine.

Regards Dhanya

On Tue, Jan 18, 2022 at 2:09 AM Luca Chiabrera @.***> wrote:

Hi Dhanya, yep, you can scrape data from 2 JMeters instances running in parallel.

From a technical standpoint, this set-up is quite similar to a distributed test where a Jmeter master controls 2+ Jmeter slaves, each one exposing its own metrics.

From a JMeter perspective, 2 instances/test plans running in parallel are not common/recommended (at least from my pov) since you should be able to generate the same workload from a single instance/test plan.

If you run the 2 JMeter instances on the same server keep in mind to configure 2 different ports in the JMeter exporters otherwise the second one that you will start won't able to bind to that port (that's most likely the issue that you are facing)

Generally speaking before looking at the data in Grafana I suggest checking that the 2 JMeter exporters are correctly configured as targets in Prometheus. Once you have the data in Prometheus building a dashboard in Grafana is just a matter of defining the right PROMQL query to aggregate the data.

Luca

On Mon, Jan 17, 2022 at 10:54 AM dhanyanayak24 @.***> wrote:

hi Jeff,

Thanks for your help!

For time-being I dropped the idea of docker. I am just setting up jmeter-prometheus and grafana in a VM. Is it possible to run multiple jmeter test at the same time in a VM using 2 instances of jmeter and then view the results like response time and other parameters in grafana or prometheus for both the test based on the labels during the execution of both the tests.

Issue1: 1.I started the run at almost the same time in both the instances.But in Grafana or prometheus, it shows the data only for one test whichever we trigger first. Say if we are triggering the Test1 a second before the test 2, only the test1 data is displayed in prometheus and grafana. How to fix this issue?

2.We want to create a dashboard where we can see the results for all the multiple tests which are running currently.

Issue2: https://github.com/johrstrom/jmeter-prometheus-plugin/issues/66 You mentioned that the issue related thread count is fixed in 66,is this 66 is a new jar where this fix is available.Now we are not getting correct jmeter thread count.Lets say if we are running 2 tests of threads 10 n 15 each. thread count shows only 10 if the test1 is executed first. it doesnt sum up the threads of 2 tests n show in grafana.How can i fix this issue?It is similar to my issue 1.

Please help us so that i can create a required dashboard. Your input will be much appreciated.

Thanks Dhanya

On Mon, Jan 10, 2022 at 9:46 PM Jeff Ohrstrom @.***> wrote:

Oh i see. OK then you may have to connect the containers. That is, localhost:9270 probably doesn't resolve to your actual localhost where your jmeter is running.

Try using the --network host docker arguements so that it can see the jmeter instance as the same localhost as it.

— Reply to this email directly, view it on GitHub <

https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1009040017

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AXHLKUZOK2ZORI4XMLFVFP3UVMA65ANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1014684571 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB2WL4BLOB2WXE2S4F36QRLUWQ3U3ANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1014872243, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXHLKU6VEQFQBT7EBZLDGETUWR47VANCNFSM4OAVHYEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

chiabre commented 2 years ago

Hi, the Prom conf. seems correct, did you configure the 2nd JMeter instance in order to expose the metrics on 9271 passing

-J prometheus.port=9271

as argument?

If you open the browser on youserverIP: 9271 once started the 2nd JMeter instance are you able to see the metrics?

Luca

On Tue, Jan 18, 2022 at 1:32 AM dhanyanayak24 @.***> wrote:

Hi Luca,

Thanks for your quick reply and input. I tried giving 2 exporters in my target json file which i am passing in yaml file in prometheus but still the data is displayed only in 9270 port (the default one) and the the other test data is not still showing up in 9271 which i had set in my json file as below:

[{"targets":["localhost:9090"],"labels":{"env":"local","job":"prometheus"}},{"targets":["localhost:9270", "localhost:9271"],"labels":{"env":"local","job":"jmeter"}}]

Can you please let me know what is the mistake I am doing here.I am trying this locally in my machine.

Regards Dhanya

On Tue, Jan 18, 2022 at 2:09 AM Luca Chiabrera @.***> wrote:

Hi Dhanya, yep, you can scrape data from 2 JMeters instances running in parallel.

From a technical standpoint, this set-up is quite similar to a distributed test where a Jmeter master controls 2+ Jmeter slaves, each one exposing its own metrics.

From a JMeter perspective, 2 instances/test plans running in parallel are not common/recommended (at least from my pov) since you should be able to generate the same workload from a single instance/test plan.

If you run the 2 JMeter instances on the same server keep in mind to configure 2 different ports in the JMeter exporters otherwise the second one that you will start won't able to bind to that port (that's most likely the issue that you are facing)

Generally speaking before looking at the data in Grafana I suggest checking that the 2 JMeter exporters are correctly configured as targets in Prometheus. Once you have the data in Prometheus building a dashboard in Grafana is just a matter of defining the right PROMQL query to aggregate the data.

Luca

On Mon, Jan 17, 2022 at 10:54 AM dhanyanayak24 @.***> wrote:

hi Jeff,

Thanks for your help!

For time-being I dropped the idea of docker. I am just setting up jmeter-prometheus and grafana in a VM. Is it possible to run multiple jmeter test at the same time in a VM using 2 instances of jmeter and then view the results like response time and other parameters in grafana or prometheus for both the test based on the labels during the execution of both the tests.

Issue1: 1.I started the run at almost the same time in both the instances.But in Grafana or prometheus, it shows the data only for one test whichever we trigger first. Say if we are triggering the Test1 a second before the test 2, only the test1 data is displayed in prometheus and grafana. How to fix this issue?

2.We want to create a dashboard where we can see the results for all the multiple tests which are running currently.

Issue2: https://github.com/johrstrom/jmeter-prometheus-plugin/issues/66 You mentioned that the issue related thread count is fixed in 66,is this 66 is a new jar where this fix is available.Now we are not getting correct jmeter thread count.Lets say if we are running 2 tests of threads 10 n 15 each. thread count shows only 10 if the test1 is executed first. it doesnt sum up the threads of 2 tests n show in grafana.How can i fix this issue?It is similar to my issue 1.

Please help us so that i can create a required dashboard. Your input will be much appreciated.

Thanks Dhanya

On Mon, Jan 10, 2022 at 9:46 PM Jeff Ohrstrom @.***> wrote:

Oh i see. OK then you may have to connect the containers. That is, localhost:9270 probably doesn't resolve to your actual localhost where your jmeter is running.

Try using the --network host docker arguements so that it can see the jmeter instance as the same localhost as it.

— Reply to this email directly, view it on GitHub <

https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1009040017

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AXHLKUZOK2ZORI4XMLFVFP3UVMA65ANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1014684571

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AB2WL4BLOB2WXE2S4F36QRLUWQ3U3ANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1014872243 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AXHLKU6VEQFQBT7EBZLDGETUWR47VANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1015110918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2WL4FZ4AJB7GXWWDFNDPDUWUCPJANCNFSM4OAVHYEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

dhanyanayak24 commented 2 years ago

Thanks Luca for your help!

Yes I had missed to configure that in the jmeter user.properties file..I did that and checked and its working fine now.I could see the metrics in 9271 for the 2nd instance jmeter test data.

Thanks Dhanya

On Tue, Jan 18, 2022 at 7:31 PM Luca Chiabrera @.***> wrote:

Hi, the Prom conf. seems correct, did you configure the 2nd JMeter instance in order to expose the metrics on 9271 passing

-J prometheus.port=9271

as argument?

If you open the browser on youserverIP: 9271 once started the 2nd JMeter instance are you able to see the metrics?

Luca

On Tue, Jan 18, 2022 at 1:32 AM dhanyanayak24 @.***> wrote:

Hi Luca,

Thanks for your quick reply and input. I tried giving 2 exporters in my target json file which i am passing in yaml file in prometheus but still the data is displayed only in 9270 port (the default one) and the the other test data is not still showing up in 9271 which i had set in my json file as below:

[{"targets":["localhost:9090"],"labels":{"env":"local","job":"prometheus"}},{"targets":["localhost:9270", "localhost:9271"],"labels":{"env":"local","job":"jmeter"}}]

Can you please let me know what is the mistake I am doing here.I am trying this locally in my machine.

Regards Dhanya

On Tue, Jan 18, 2022 at 2:09 AM Luca Chiabrera @.***> wrote:

Hi Dhanya, yep, you can scrape data from 2 JMeters instances running in parallel.

From a technical standpoint, this set-up is quite similar to a distributed test where a Jmeter master controls 2+ Jmeter slaves, each one exposing its own metrics.

From a JMeter perspective, 2 instances/test plans running in parallel are not common/recommended (at least from my pov) since you should be able to generate the same workload from a single instance/test plan.

If you run the 2 JMeter instances on the same server keep in mind to configure 2 different ports in the JMeter exporters otherwise the second one that you will start won't able to bind to that port (that's most likely the issue that you are facing)

Generally speaking before looking at the data in Grafana I suggest checking that the 2 JMeter exporters are correctly configured as targets in Prometheus. Once you have the data in Prometheus building a dashboard in Grafana is just a matter of defining the right PROMQL query to aggregate the data.

Luca

On Mon, Jan 17, 2022 at 10:54 AM dhanyanayak24 @.***> wrote:

hi Jeff,

Thanks for your help!

For time-being I dropped the idea of docker. I am just setting up jmeter-prometheus and grafana in a VM. Is it possible to run multiple jmeter test at the same time in a VM using 2 instances of jmeter and then view the results like response time and other parameters in grafana or prometheus for both the test based on the labels during the execution of both the tests.

Issue1: 1.I started the run at almost the same time in both the instances.But in Grafana or prometheus, it shows the data only for one test whichever we trigger first. Say if we are triggering the Test1 a second before the test 2, only the test1 data is displayed in prometheus and grafana. How to fix this issue?

2.We want to create a dashboard where we can see the results for all the multiple tests which are running currently.

Issue2: https://github.com/johrstrom/jmeter-prometheus-plugin/issues/66 You mentioned that the issue related thread count is fixed in 66,is this 66 is a new jar where this fix is available.Now we are not getting correct jmeter thread count.Lets say if we are running 2 tests of threads 10 n 15 each. thread count shows only 10 if the test1 is executed first. it doesnt sum up the threads of 2 tests n show in grafana.How can i fix this issue?It is similar to my issue 1.

Please help us so that i can create a required dashboard. Your input will be much appreciated.

Thanks Dhanya

On Mon, Jan 10, 2022 at 9:46 PM Jeff Ohrstrom @.***> wrote:

Oh i see. OK then you may have to connect the containers. That is, localhost:9270 probably doesn't resolve to your actual localhost where your jmeter is running.

Try using the --network host docker arguements so that it can see the jmeter instance as the same localhost as it.

— Reply to this email directly, view it on GitHub <

https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1009040017

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AXHLKUZOK2ZORI4XMLFVFP3UVMA65ANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1014684571

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AB2WL4BLOB2WXE2S4F36QRLUWQ3U3ANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1014872243

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AXHLKU6VEQFQBT7EBZLDGETUWR47VANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1015110918 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB2WL4FZ4AJB7GXWWDFNDPDUWUCPJANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1015439996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXHLKU3JD7TJ3ETVMURCJNDUWVXERANCNFSM4OAVHYEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

dhanyanayak24 commented 2 years ago

hi Jeff/Luca,

I am trying to deploy graphs in grafana using the jmeter plugin.I have given the below parameters in listener but i wanted to show Avg Response time in grafana. I thought using jmeter_summary parameters it will calculate response time for the test but it calculates only 90th,95th and 99th percentile as we are giving quantiles in the listener.

[image: image.png] The query used for Avg response time was avg(jmeter_summary{}) by (TestID)

Is this query correct based on the parameter been set in the listener?But when i run the jmeter thru CLi, i see the avg response time is around 230ms but in grafana it shws as 480 ms which seems to avg of 90th,99 n 95th percentile.

could you please me with what exact parameter should i set in listener to get the response time of the test.

Thanks Dhanya

On Tue, Jan 18, 2022 at 7:37 PM Dhanya Nayak @.***> wrote:

Thanks Luca for your help!

Yes I had missed to configure that in the jmeter user.properties file..I did that and checked and its working fine now.I could see the metrics in 9271 for the 2nd instance jmeter test data.

Thanks Dhanya

On Tue, Jan 18, 2022 at 7:31 PM Luca Chiabrera @.***> wrote:

Hi, the Prom conf. seems correct, did you configure the 2nd JMeter instance in order to expose the metrics on 9271 passing

-J prometheus.port=9271

as argument?

If you open the browser on youserverIP: 9271 once started the 2nd JMeter instance are you able to see the metrics?

Luca

On Tue, Jan 18, 2022 at 1:32 AM dhanyanayak24 @.***> wrote:

Hi Luca,

Thanks for your quick reply and input. I tried giving 2 exporters in my target json file which i am passing in yaml file in prometheus but still the data is displayed only in 9270 port (the default one) and the the other test data is not still showing up in 9271 which i had set in my json file as below:

[{"targets":["localhost:9090"],"labels":{"env":"local","job":"prometheus"}},{"targets":["localhost:9270", "localhost:9271"],"labels":{"env":"local","job":"jmeter"}}]

Can you please let me know what is the mistake I am doing here.I am trying this locally in my machine.

Regards Dhanya

On Tue, Jan 18, 2022 at 2:09 AM Luca Chiabrera @.***> wrote:

Hi Dhanya, yep, you can scrape data from 2 JMeters instances running in parallel.

From a technical standpoint, this set-up is quite similar to a distributed test where a Jmeter master controls 2+ Jmeter slaves, each one exposing its own metrics.

From a JMeter perspective, 2 instances/test plans running in parallel are not common/recommended (at least from my pov) since you should be able to generate the same workload from a single instance/test plan.

If you run the 2 JMeter instances on the same server keep in mind to configure 2 different ports in the JMeter exporters otherwise the second one that you will start won't able to bind to that port (that's most likely the issue that you are facing)

Generally speaking before looking at the data in Grafana I suggest checking that the 2 JMeter exporters are correctly configured as targets in Prometheus. Once you have the data in Prometheus building a dashboard in Grafana is just a matter of defining the right PROMQL query to aggregate the data.

Luca

On Mon, Jan 17, 2022 at 10:54 AM dhanyanayak24 @.***> wrote:

hi Jeff,

Thanks for your help!

For time-being I dropped the idea of docker. I am just setting up jmeter-prometheus and grafana in a VM. Is it possible to run multiple jmeter test at the same time in a VM using 2 instances of jmeter and then view the results like response time and other parameters in grafana or prometheus for both the test based on the labels during the execution of both the tests.

Issue1: 1.I started the run at almost the same time in both the instances.But in Grafana or prometheus, it shows the data only for one test whichever we trigger first. Say if we are triggering the Test1 a second before the test 2, only the test1 data is displayed in prometheus and grafana. How to fix this issue?

2.We want to create a dashboard where we can see the results for all the multiple tests which are running currently.

Issue2: https://github.com/johrstrom/jmeter-prometheus-plugin/issues/66 You mentioned that the issue related thread count is fixed in 66,is this 66 is a new jar where this fix is available.Now we are not getting correct jmeter thread count.Lets say if we are running 2 tests of threads 10 n 15 each. thread count shows only 10 if the test1 is executed first. it doesnt sum up the threads of 2 tests n show in grafana.How can i fix this issue?It is similar to my issue 1.

Please help us so that i can create a required dashboard. Your input will be much appreciated.

Thanks Dhanya

On Mon, Jan 10, 2022 at 9:46 PM Jeff Ohrstrom @.***> wrote:

Oh i see. OK then you may have to connect the containers. That is, localhost:9270 probably doesn't resolve to your actual localhost where your jmeter is running.

Try using the --network host docker arguements so that it can see the jmeter instance as the same localhost as it.

— Reply to this email directly, view it on GitHub <

https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1009040017

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AXHLKUZOK2ZORI4XMLFVFP3UVMA65ANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1014684571

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AB2WL4BLOB2WXE2S4F36QRLUWQ3U3ANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub <

https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1014872243

, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AXHLKU6VEQFQBT7EBZLDGETUWR47VANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS <

https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android <

https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub

.

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1015110918 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AB2WL4FZ4AJB7GXWWDFNDPDUWUCPJANCNFSM4OAVHYEA

. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675

or Android < https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1015439996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXHLKU3JD7TJ3ETVMURCJNDUWVXERANCNFSM4OAVHYEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

johrstrom commented 2 years ago

I think average would be through dividing _sum over _count metrics from a histogram. So you don't look at the buckets, just the running totals and divide.

dhanyanayak24 commented 2 years ago

Thanks Jeff. I guess now i am getting approx value which i am seeing from jmeter.

I gave the below query and it worked. avg((jmeter_hist_sum{})/(jmeter_hist_count{}))

I have one question here,Using this prometheus jmeter plugin which i am using currently, is it possible to switch between the tests in grafana using the TestID or any unique name that represents the test. I don't see backend listener for prometheus where as i see influxDB Backend listener that allows to setup the application name in jmeter and it can be seen in grafana too.Is there anything like that which i can setup in jmeter which acts like a prometheus backend listener.

My requirement is, in Grafana i want a variable where i give the application or test name and the graphs related to that test should show up. So currently i am using the jmeter-prometheus plugin where i have setup the prometheus listener to pull the jmeter data and show up in the grafana using the queries generated using those parameters.

I have also set a variable in Grafana but i am not sure what should i give in the query section of grafana variable that pulls my lists my jmeter test names: [image: image.png]

So should i configure influxdb or is this can be setup in prometheus also so that i can select the testname from the dropdown and corresponding dashboard shows up?Or if there is any query which i can use here to extract the testname from jmeter or so?

Your help will be much appreciated here please.

Thanks Dhanya

On Thu, Jan 20, 2022 at 8:17 PM Jeff Ohrstrom @.***> wrote:

I think average would be through dividing _sum over _count metrics from a histogram. So you don't look at the buckets, just the running totals and divide.

— Reply to this email directly, view it on GitHub https://github.com/johrstrom/jmeter-prometheus-plugin/issues/81#issuecomment-1017583454, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXHLKU7LPRWEK3UMDBBKZBLUXAN6NANCNFSM4OAVHYEA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>