Path

How to verify that metrics are being written to an endpoint

Estimated time: 1 min

Verify Prometheus is running and serving metrics

Installing and configuring Prometheus is out of scope for this path. Before you change its configuration, confirm that Prometheus is running and that it serves metrics. If it isn’t, nothing reaches Grafana Cloud after you add remote_write.

To verify that Prometheus is running and serving metrics:

  1. Log in to the machine on which Prometheus is installed.

  2. If required, switch to a user that has administrative privileges.

  3. Check the Prometheus service status.

    For Linux with systemd:

    systemctl status prometheus

    For Windows:

    sc query prometheus

    The service should report that it’s active or running:

  4. Picture that shows the Prometheus service up and running
  5. In a browser, open the metrics endpoint of your Prometheus server. By default Prometheus listens on port 9090.

    For example, navigate to http://localhost:9090/metrics

    This page lists the metrics Prometheus exposes about itself. If it loads, Prometheus is running and reachable.

  6. Picture that shows metrics in a browser tab
  7. To confirm that Prometheus is also scraping your own targets, navigate to http://localhost:9090/targets.

    Each target you configured under scrape_configs should show the state UP. These are the metrics that remote_write sends to Grafana Cloud.

Tip: If the service isn’t running or a target isn’t UP, fix that first. Refer to the Prometheus documentation for installation and scrape configuration.