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

Add instance label #107

Closed
yjuba opened this issue Feb 24, 2023 · 2 comments
Closed

Add instance label #107

yjuba opened this issue Feb 24, 2023 · 2 comments

Comments

@yjuba
Copy link

yjuba commented Feb 24, 2023

Is it possible to add an instance label to each metric?
Prometheus fails to record metrics correctly when multiple k6 write to a single Prometheus.

@codebien
Copy link
Contributor

Hi @yjuba, can you clarify how you run your multiple k6 instances? Are you running the k6-operator or just k6 in parallel across several machines?

Anyway, you should be able to do it defining a test-wide tag https://k6.io/docs/using-k6/tags-and-groups/#test-wide-tags

@yjuba
Copy link
Author

yjuba commented Feb 25, 2023

Hi @codebien

Are you running the k6-operator or just k6 in parallel across several machines?

I running k6 in parallel across several machines.
I am not using the k6-operator.

I was able to add an instance label by executing the following command.

k6 run --tag 'instance=192.0.2.100:6565' -o xk6-prometheus-rw script.js

Thank you for your prompt and accurate reply.

@yjuba yjuba closed this as completed Feb 25, 2023
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

2 participants