grafana / k6-operator

An operator for running distributed k6 tests.
Apache License 2.0
582 stars 159 forks source link

prometheus cant scrape the metrics from the job #114

Closed ranyhb closed 2 years ago

ranyhb commented 2 years ago

hi, after a job is completed you cant scrape the metrics from the job. so the soultion of exporting the metrics for the prometheus using the pod monitor isn't a good solution. i would like to hear from you how to solve this problem. regards, rani

yorugac commented 2 years ago

Hi @ranyhb, Are you using https://github.com/szkiba/xk6-prometheus for metrics? You're right, the pull-based approach is not very suitable for operator. Instead, it makes sense to switch to push-based approach with PRW extension: https://github.com/grafana/xk6-output-prometheus-remote With it, k6 will exit only after pushing the metrics to Prometheus.

ranyhb commented 2 years ago

yeah, i found that extension after opening this issue. im trying to install it to work with k8s. maybe we should udpate the ReadMe file to refence the https://github.com/grafana/xk6-output-prometheus-remote extension instead of the https://github.com/szkiba/xk6-prometheus.

yorugac commented 2 years ago

maybe we should udpate the ReadMe file to refence the https://github.com/grafana/xk6-output-prometheus-remote extension instead of the https://github.com/szkiba/xk6-prometheus.

Yes, for sure! I believe it was even planned once but then forgotten :sweat_smile:

yorugac commented 2 years ago

Docs were updated to point to the PRW extension. Closing this issue as resolved.