Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Re-use of existing metrics for single test plan with multiple TG's #89

Open
winstondz opened this issue Sep 22, 2020 · 4 comments

Comments

@winstondz
Copy link

winstondz commented Sep 22, 2020

I am having issues getting all the metrics in the grafana dashboard. Here is my current setup:
Grafana (docker) v 7.1.5
Prometheus (docker) v2.21.0

I have an existing JMeter test plan which is structured as such:
Test Plan
| Reusable Test Fragments
----|Samplers
| TG1
----| Simple Controller
--------|SamplerA
|Prometheus Listener1
|TG2
----|SimpleController1
--------|SamplerA
----|SimpleController2
--------|SamplerB
--------|SamplerC
|Prometheus Listener2

Prometheus Listener 1 and Prometheus Listener 2 are the exact same components (with the same metric names) defined for each TG

In Grafana, I see only the metrics related to Sampler A (I dont have additional filtering in the PROM query), but I dont see any from Samplers B and C. I am not sure whether I am using it the right way or if there's a better way to use it?

I am using api_count_total with the legend {{label}}

@johrstrom
Copy link
Owner

It's got to do with the internals of the prometheus library. Basically once you "register" a metric, you can't register another with the same name. This is why the 2nd listener is useless, it can't register anything.

I'd suggest just moving them to a single global listener outside of the thread groups if you can. Otherwise you'll have to rename the metrics in one of the listeners.

@sriram474
Copy link

Hi Jeff ohrstrom,

Do you have any plugins for the testng as well to extract the metrics from testng suite to prometheus db. Appreciate your reply.

Regards
Ramakrishna
[email protected]

@johrstrom
Copy link
Owner

@sriram474 Not sure I follow. You want to pull the metrics from prometheus and put them into a csv so jmeter can read them?

@sriram474
Copy link

sriram474 commented Sep 28, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants