k6
k6 copied to clipboard
Prometheus PushGateway output
Feature Description
Pushgateway is one of the best option to send metrics without using scraping mode: https://github.com/prometheus/pushgateway
I think K6 would have great benefits from allowing metrics to be sent using the push gateway instead of the server remote write.
Currently there is a plugin that tries to do it, but it lacks completeness and also have several bugs (trends not handled as histograms, metri labels not being exported, etc): https://github.com/martymarron/xk6-output-prometheus-pushgateway
Suggested Solution (optional)
No response
Already existing or connected issues / PRs (optional)
No response
Hi @lucasoares, I interpret this request for integrating the extension or natively support the Push Gateway in the k6's core.
At the moment, based on the demand this is outside our high-priority list. I leave this issue open for gathering more feedback and reactions.
Currently there is a plugin that tries to do it, but it lacks completeness and also have several bugs (trends not handled as histograms, metri labels not being exported, etc): https://github.com/martymarron/xk6-output-prometheus-pushgateway
I see you're contributing to the extension, currently, it is the best approach for getting faster a working output.
I think K6 would have great benefits from allowing metrics to be sent using the push gateway instead of the server remote write.
Can you report your use case, please?
Hello, our use case has to do with security. The company policies do not allow us to open another port on Prometheus, Given that we already have push gateways in operation, leveraging this existing infrastructure seems like a practical, secure and faster solution
looking forward
Hello, we run a HA prometheus setup and when K6 pushes metrics to prometheus, there is no guarantee of metrics going into both servers. When we want to see the loadtest metrics on grafana dashboards, the dashboard sometimes shows metrics & sometimes it doesnt (the reason being that metrics are available only in one of the prometheus server).
A better approach would be to enable PushGateway compatibility from which both the prometheus servers can scrape the metrics.
Hey @IamGroot19, @lucasoares do you guys know if xk6-output-prometheus-pushgateway has been fixed ?
Hey @IamGroot19, @lucasoares do you guys know if xk6-output-prometheus-pushgateway has been fixed ?
Idk, I haven't been using it for a few months
At this point this is still not being worked on from the core team, and there are good chance it will never will be.
If you want to report issues or want to asks for status on development on the extension - I would recommend openning issues there.
The author of the issues is not in this comments and the k6 core team has no affiliation (AFAIK) with the extension .
i would def agree that only a remote write solution is not possible in several orgs, (also case for us), due to policies etc. However, when we tried to send to PGW metrics once out of a job, we had performance issues. I guess it can be configured and run more smoothly, but not sure if PGW is made for the amount of metrics that can be generated from k6 or any other load test, but any alternative apart from remote-write would be really great.