attentionThis page includes instructions for running a local test that sends the test results to a Prometheus instance in Grafana Cloud.
For running and managing cloud tests in Grafana Cloud, check out Grafana Cloud k6.
With Grafana Cloud Prometheus and the k6 output for Prometheus remote write, you can send your k6 results output to Grafana Cloud to visualize your testing results. With k6 metrics in Grafana, you can correlate k6 metrics with other metrics of your observability stack.
While this topic uses Grafana Cloud as an example, this approach is compatible with any remote write capable Prometheus installation.
Set up Grafana Cloud Prometheus
Before you start, you need the following:
- A Grafana Cloud account (sign up). The free plan includes 10,000 Prometheus series.
- The URL, username, and password of your Grafana Cloud Prometheus instance to configure the integration.
After you've set up your account, follow these steps:
Log in to Grafana.com and visit the Cloud Portal. Select the Details of your Prometheus service.
Copy the URL of the Remote Write Endpoint, along with the Username and Instance ID.
In the Password / API Key section, create and copy an API key of the MetricsPublisher role. This will be used as a password.
Run the test
Now, pass the Username, API key, and Remote Write Endpoint of the Grafana Cloud Prometheus Configuration to the k6 binary:
Explore k6 metrics
To explore k6 metrics in Grafana Cloud:
- Click on the Explore icon on the menu bar.
- Choose the Prometheus data source from the dropdown in the top left.
- In the query field, query k6 metrics to explore your testing results.