How to monitor Gunicorn via statsD in hosted setup?

I’d like to monitor a Gunicorn server. It exports to a statsD server via UDP.

The resources I found online say that I’ll need to use statsd_exporter and send them into Prometeus. For example:

My question is how can I do this with hosted Grafana? What do I need to install locally and what on the cloud website?

The application runs inside a Docker container but I have the agent installed on the Linux host which runs Docker.

the second article is spot on. do you currently have a hosted prometheus instance?

What I have is:

  1. A linux host where I’ve installed the Linux agent from the web UI which generated the sudo command with https://raw.githubusercontent.com/grafana/agent/release/production/grafanacloud-install.sh
  2. Now I’m on this screen:

Do I have to install that agent-linux-amd64 as well, or it’s the same agent which is already installed on the host?

If so, do I just need to mix the two configs with each other?

If I understand correctly, I need to add this in my agent config, right?

  - name: hosted-prometheus
    scrape_configs:
      - job_name: node
        static_configs:
        - targets: ['localhost:9100']
    remote_write:
      - url: https://prometheus-prod-01-eu-west-0.grafana.net/api/prom/push
        basic_auth:
          username: 123456
          password: qwerty

Do you solve your issue already? I don’t use Grafana Cloud, but it looks like you can install Grafana Agent on your machine to collect metrics from the local StatsD exporter and then write it to Grafana Cloud’s Prometheus.