Grafana Agent is a distribution of the OpenTelemetry Collector, with a configuration style inspired by Terraform. It is designed to be a flexible, high-performance, and ecosystem-compatible observability data collector, including Prometheus and OpenTelemetry.
⚠️ Important Note: Grafana Agent has been deprecated and is now in long-term support mode. It is recommended to migrate to Grafana Alloy, a new version built on Grafana Agent Flow.
Grafana Agent is built on components. Components are connected together to form programmable observability pipelines for the collection, processing, and transmission of telemetry data.
Grafana Agent can collect, transform, and send data to:
This page mainly focuses on "Flow Mode," which is a Terraform-inspired revision of Grafana Agent. Flow Mode provides a more intuitive configuration method, allowing users to:
// Discover Kubernetes pods to collect metrics
discovery.kubernetes "pods" {
role = "pod"
}
// Collect metrics from Kubernetes pods
prometheus.scrape "default" {
targets = discovery.kubernetes.pods.targets
forward_to = [prometheus.remote_write.default.receiver]
}
// Fetch API key from disk
local.file "apikey" {
filename = "/var/data/my-api-key.txt"
is_secret = true
}
// Send metrics to Prometheus remote_write endpoint
prometheus.remote_write "default" {
endpoint {
url = "http://localhost:9009/api/prom/push"
basic_auth {
username = "MY_USERNAME"
password = local.file.apikey.content
}
}
}
Grafana Alloy is the new name for our OTel Collector distribution. Grafana Agent has been deprecated and will be provided with Long Term Support (LTS) until October 31, 2025. Grafana Agent will reach End of Life (EOL) on November 1, 2025.
The project maintainers strongly recommend that users migrate to Grafana Alloy for reasons including:
The project provides complete documentation and examples:
Suitable for large-scale Prometheus deployments that need to handle millions of active series.
Unified collection of metrics, logs, traces, and profiling data.
Provides a consistent observability solution in multi-cloud and hybrid cloud environments.
Deep integration with CI/CD pipelines and GitOps workflows.
Grafana Agent, as a mature observability data collector, provides users with powerful telemetry data collection, processing, and transmission capabilities. Although the project has entered maintenance mode, its core concepts and architecture have laid a solid foundation for the next-generation Grafana Alloy. For existing users, it is recommended to gradually migrate to Grafana Alloy according to the official guide to obtain better performance and continuous support.