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.
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
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.
}