Home

Awesome

Deprecation notice: Grafana Agent has been deprecated and is now in Long-Term Support mode. We recommend migrating to the new Grafana Alloy collector, which is built on the foundation of Grafana Agent Flow.

For more information, read our blog posts about Alloy and how to easily migrate from Agent to Alloy:

<p align="center"><img src="docs/sources/assets/logo_and_name.png" alt="Grafana Agent logo"></p>

Grafana Agent is an OpenTelemetry Collector distribution with configuration inspired by Terraform. It is designed to be flexible, performant, and compatible with multiple ecosystems such as Prometheus and OpenTelemetry.

Grafana Agent is based around components. Components are wired together to form programmable observability pipelines for telemetry collection, processing, and delivery.

NOTE: This page focuses mainly on "Flow mode," the Terraform-inspired revision of Grafana Agent.

Grafana Agent can collect, transform, and send data to:

Why use Grafana Agent?

Getting started

Check out our documentation to see:

Example

// Discover Kubernetes pods to collect metrics from.
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]
}

// Get an API key from disk.
local.file "apikey" {
  filename  = "/var/data/my-api-key.txt"
  is_secret = true
}

// Send metrics to a 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
    }
  }
}

We maintain an example Docker Compose environment that can be used to launch dependencies to play with Grafana Agent locally.

Release cadence

A new minor release is planned every six weeks.

The release cadence is best-effort: if necessary, releases may be performed outside of this cadence, or a scheduled release date can be moved forwards or backwards.

Minor releases published on cadence include updating dependencies for upstream OpenTelemetry Collector code if new versions are available. Minor releases published outside of the release cadence may not include these dependency updates.

Patch and security releases may be created at any time.

Community

To engage with the Grafana Agent community:

Contribute

Refer to our contributors guide to learn how to contribute.