Menu
Documentationbreadcrumb arrow Grafana Cloudbreadcrumb arrow Instrument and send databreadcrumb arrow Metricsbreadcrumb arrow Ship your metrics to Grafana Cloud without an integration
Grafana Cloud

Ship your metrics to Grafana Cloud without an integration

If you want to ship your Prometheus metrics to Grafana Cloud, but there isn’t an integration available, you can either use an existing Prometheus exporter, or write one of your own, and deploy Grafana Agent to scrape your local machine or service. Note that you may also be able to use the agentless Metrics Endpoint integration to create scheduled scrape jobs to collect metrics from any Prometheus-compatible publicly accessible URL.

  1. Find and install an exporter.

    There are many open source Prometheus exporters available on GitHub. For a list of Prometheus exporters, see Third-party exporters in the Prometheus documentation. Note that this list is not complete, and you can find additional exporters on other sites.

    If you can’t find an existing exporter for your service, you can write your own. For more information, see Writing exporters in the Prometheus documentation.

Configure Grafana Agent

Caution

Grafana Alloy is the new name for our distribution of the OTel collector. Grafana Agent has been deprecated and is in Long-Term Support (LTS) through October 31, 2025. Grafana Agent will reach an End-of-Life (EOL) on November 1, 2025. Read more about why we recommend migrating to Grafana Alloy.

You can generate the Agent binary and configuration file for your service or machine in your Grafana Cloud stack.

  1. In your Grafana Cloud stack, click the Connections.

  2. Beneath the search field, click Custom data.

  3. Click Hosted Prometheus metrics.

  4. Click the Configuration Details tab.

  5. Select the following options:

    • Choose a method for forwarding metrics: Via Grafana Agent

      Select this method if you do not already have a local Prometheus instance running.

    • Show instructions for: Standard

    • Choose your platform: Select the operating system of the machine or service.

      If you don’t see your binary option displayed, see Agent releases and scroll down to the Assets list to install the binary manually. For more information on installing the Grafana binary, see Install the Grafana Agent binary.

    • Download and install the binary for your OS

      Run the displayed commands in a terminal to download and install the binary if you’ve selected one.

    • Set the configuration

      • Select Create new config to create a new configuration file. Choose this option if this is your first time deploying the Agent.

        If you are creating your first Agent configuration file, you can copy the command provided in the UI, adding your job name to the job_name field and the URL of your machine or service to the targets field . Run this command from your terminal, in the directory where you installed the Agent binary.

      • Select Update existing config manually to generate the settings to add to an existing configuration file.

        If you are adding remote_write to an existing configuration file, add the content generated in the UI to the metrics section of the file. You must also add the scrape_config details for this scrape job. If you already have remote_write enabled, and scrape jobs running, you may only need to add the scrape job details to scrape_configs.

      The following is an example of a simple Agent configuration file with remote_write enabled:

      yaml
      metrics:
        configs:
          - name: integrations
            remote_write:
              - basic_auth:
                  password:
                  username:
                url: https://prometheus-blocks-prod-us-central1.grafana.net/api/prom/push
            scrape_configs:
              - job_name: sglk
                static_configs:
                  - targets: ['localhost:4001']
        global:
          scrape_interval: 60s
        wal_directory: /tmp/grafana-agent-wal
  6. Save your changes and restart the agent.

bash
  ./<NAME_AGENT_BINARY> --config.file=agent-config.yaml