Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

How to easily connect Prometheus to Grafana Cloud

How to easily connect Prometheus to Grafana Cloud

2025-05-13 4 min

Prometheus is one of the most popular open source monitoring tools due to its powerful flexibility for collecting time series metrics. But raw metrics aren’t always helpful on their own. 

That’s where Grafana Cloud comes in. By connecting Prometheus to Grafana Cloud, you get rich visualizations, alerts, and dashboards that make your data actionable without having to manage any additional infrastructure.

In this guide, we’ll show you how to:

  • Set up a local Prometheus instance
  • Collect machine metrics using the Prometheus node exporter
  • Connect it all to Grafana Cloud for powerful, cloud-hosted observability

Watch the video below to see how, or continue reading to get started.

Step 1: Download Prometheus and node exporter

Head over to prometheus.io/download and grab the latest stable release for your operating system. For this guide, we’re using a MacBook Pro with an M3 chip, so we chose the latest LTS arm64 version.

arm64 file highlighted

While you’re there, also download node exporter—this tool gathers machine metrics like CPU, memory, and disk space.

Node exporter file highlighted

Step 2: Extract and run

Once downloaded, we need to run the node exporter to expose our machine’s metrics, and we need Prometheus to scrape those metrics.

tar xvf prometheus-*.tar.gz
tar xvf node_exporter-*.tar.gz

You should now have two directories: one for Prometheus and one for node exporter.

Step 2a. Run node exporter

Navigate to the node exporter directory and run:

./node_exporter

Step 2b. Run Prometheus

First, modify the prometheus.yml config to add a scrape job for node exporter:

scrape_configs:
  - job_name: 'node'
    static_configs:
      - targets: ['localhost:9100']

Then, run Prometheus from its directory:

./prometheus --config.file=prometheus.yml

Prometheus will now be available at http://localhost:9090.

Step 3: Verify metrics

Open your browser and go to http://localhost:9090. You should see the Prometheus UI. Type node_cpu_seconds_total into the query bar—if you see results, your node exporter is successfully being scraped.

Step 4: Connect to Grafana Cloud

Now let’s get these metrics into Grafana Cloud.

  1. Go to grafana.com and log into your account. If you don’t have one yet, the free tier is generous and easy to set up.
  2. Launch your Grafana Cloud stack, then navigate to Connections > Add Data Source.
  3. Choose Prometheus, and decide between:
  • Sending metrics to Grafana Cloud (via Grafana Alloy or OTLP),
  • Or connecting your existing local Prometheus instance.

For the purposes of this blog post, we’ll connect our local Prometheus instance.

Step 5: Expose Prometheus instance with ngrok via secure tunneling

Grafana Cloud requires a publicly accessible URL to connect to your local Prometheus instance, which by default runs on localhost:9090. Since this address is not reachable from the internet, you’ll need to use a secure tunneling tool to expose Prometheus to Grafana Cloud.

In this case, let’s use ngrok:

ngrok http 9090

This will give you a secure public URL like https://something.ngrok.io. Copy that.

Now go back to the Grafana Cloud Prometheus connection setup, paste in the ngrok URL, and save the data source; no auth needed if you’re running locally.

Step 6: Load a prebuilt dashboard

Want to visualize your system metrics in style?

  1. Navigate to https://grafana.com/grafana/dashboards/1860-node-exporter-full/
  2. Download the JSON
  3. Head to Dashboards > New > Import.
  4. Search for or upload the Node Exporter Full dashboard JSON.
  5. Import it, and just like that, you’ll see CPU, memory, disk usage, and more—all from your local machine, visualized in Grafana Cloud.

That’s a wrap

In just a few minutes, you’ve:

  • Set up Prometheus and node exporter locally
  • Configured them to collect and scrape metrics
  • Exposed your local Prometheus with ngrok
  • Hooked everything up to Grafana Cloud
  • Loaded a dashboard to make the data shine

And if you’d like to continue to learn how to get the most from Prometheus and Grafana Cloud, check out our recent blog post about using Prometheus to detect anomalies at scale

Grafana Cloud is the easiest way to get started with metrics, logs, traces, dashboards, and more. We have a generous forever-free tier and plans for every use case. Sign up for free now!