Menu
Open source

Getting Started

Install Grafana Agent

To use Grafana Agent Flow, first install Grafana Agent. Grafana Agent Flow is a separate operating mode available when using the Grafana Agent binary.

Running Grafana Agent Flow

Grafana Agent Flow can be enabled by setting the AGENT_MODE environment variable to flow.

Then, use the agent run command to start Grafana Agent Flow, replacing FILE_PATH with the path of a config file to use:

AGENT_MODE=flow agent run FILE_PATH

Grafana Agent Flow uses a different command-line interface and command line flags than the normal Grafana Agent. You can see the supported commands and the flags they support in the reference documentation for the command-line interface.

You can use this file as an example to get started:

prometheus.scrape "default" {
  targets = [
    {"__address__" = "demo.robustperception.io:9090"},
  ]
  forward_to = [prometheus.remote_write.default.receiver]
}

prometheus.remote_write "default" {
  // No endpoints configured; metrics will be accumulated locally in a WAL
  // and discarded.
}