Top Related Projects
The Prometheus monitoring system and time series database.
Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
Main repository for Datadog Agent
Architected for speed. Automated for easy. Monitoring and troubleshooting, transformed!
Fluentd: Unified Logging Layer (project under CNCF)
Quick Overview
Grafana Agent is an open-source telemetry collector designed to efficiently gather and forward observability data to various backends. It focuses on metrics, logs, and traces, offering a lightweight and configurable solution for monitoring and observability pipelines.
Pros
- Highly efficient and lightweight, with minimal resource consumption
- Supports multiple data types (metrics, logs, traces) and various backend integrations
- Offers both static and dynamic configuration options
- Designed for cloud-native environments and supports Kubernetes integration
Cons
- Relatively new project compared to some established alternatives
- Documentation may not be as comprehensive as more mature projects
- Limited built-in visualization capabilities (relies on external tools like Grafana)
- Steeper learning curve for users new to observability concepts
Getting Started
To get started with Grafana Agent, follow these steps:
-
Download the latest release from the GitHub releases page.
-
Create a configuration file named
agent.yaml
:
metrics:
global:
scrape_interval: 15s
configs:
- name: default
scrape_configs:
- job_name: agent
static_configs:
- targets: ['localhost:12345']
logs:
configs:
- name: default
positions:
filename: /tmp/positions.yaml
scrape_configs:
- job_name: varlogs
static_configs:
- targets: [localhost]
- labels:
job: varlogs
__path__: /var/log/*log
traces:
configs:
- name: default
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
remote_write:
- endpoint: tempo:4317
insecure: true
- Run the Grafana Agent:
./agent-linux-amd64 -config.file=agent.yaml
This configuration sets up basic metric scraping, log collection, and trace receiving. Adjust the configuration to match your specific needs and backend systems.
Competitor Comparisons
The Prometheus monitoring system and time series database.
Pros of Prometheus
- More mature and widely adopted project with extensive documentation and community support
- Offers a full-featured query language (PromQL) for advanced data analysis
- Provides a built-in web UI for basic visualization and querying
Cons of Prometheus
- Can be resource-intensive for large-scale deployments
- Requires manual configuration for service discovery and scraping targets
- Limited long-term storage options without additional components
Code Comparison
Prometheus configuration (prometheus.yml):
global:
scrape_interval: 15s
scrape_configs:
- job_name: 'example'
static_configs:
- targets: ['localhost:8080']
Grafana Agent configuration (agent.yaml):
metrics:
global:
scrape_interval: 15s
configs:
- name: default
scrape_configs:
- job_name: 'example'
static_configs:
- targets: ['localhost:8080']
Both configurations are similar, but Grafana Agent's structure is designed for more flexibility and easier integration with Grafana Cloud. The Agent also supports additional features like logs and traces collection, which are not present in the core Prometheus project.
Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
Pros of Telegraf
- Wider range of supported input plugins and integrations
- More mature and established project with a larger community
- Better suited for complex data collection scenarios
Cons of Telegraf
- Can be more resource-intensive, especially with many plugins enabled
- Configuration can be more complex for advanced use cases
Code Comparison
Telegraf configuration example:
[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
report_active = false
Agent configuration example:
metrics:
configs:
- name: agent
scrape_configs:
- job_name: agent
static_configs:
- targets: ['localhost:12345']
Summary
Telegraf and Agent are both powerful monitoring agents, but they have different strengths. Telegraf offers a wider range of integrations and is more suitable for complex data collection scenarios, while Agent is designed for simplicity and efficiency, particularly when used within the Grafana ecosystem.
Telegraf's configuration can be more verbose and resource-intensive, especially when using multiple plugins. Agent, on the other hand, provides a more streamlined approach, focusing on Prometheus-style metrics collection and integration with Grafana Cloud.
The choice between the two depends on your specific monitoring needs, existing infrastructure, and preferred ecosystem.
:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
Pros of Beats
- More mature and established project with a larger community
- Wider range of data shippers for various use cases (e.g., Filebeat, Metricbeat, Packetbeat)
- Tighter integration with the Elastic Stack ecosystem
Cons of Beats
- More complex configuration and setup process
- Higher resource consumption, especially for multiple beat instances
- Less flexibility in terms of output destinations compared to Agent
Code Comparison
Beats configuration (filebeat.yml):
filebeat.inputs:
- type: log
enabled: true
paths:
- /var/log/*.log
output.elasticsearch:
hosts: ["localhost:9200"]
Agent configuration (agent.yaml):
metrics:
wal_directory: /tmp/wal
global:
scrape_interval: 15s
configs:
- name: node_exporter
scrape_configs:
- job_name: node
static_configs:
- targets: ['localhost:9100']
Summary
Beats offers a more comprehensive set of data shippers and tighter integration with the Elastic Stack, while Agent provides a more streamlined and flexible approach to metrics collection. Beats may be preferable for users deeply invested in the Elastic ecosystem, while Agent might be a better choice for those seeking a lighter-weight, more adaptable solution.
Main repository for Datadog Agent
Pros of datadog-agent
- More comprehensive out-of-the-box integrations with various services and platforms
- Advanced APM (Application Performance Monitoring) capabilities
- Extensive built-in dashboards and visualization options
Cons of datadog-agent
- Closed-source, limiting customization and community contributions
- Higher resource consumption, especially in large-scale deployments
- Steeper learning curve for advanced configurations
Code Comparison
datadog-agent configuration:
init_config:
service: "my-service"
instances:
- url: "http://localhost:8080"
tags:
- "env:production"
agent configuration:
metrics:
configs:
- name: default
scrape_configs:
- job_name: "my-service"
static_configs:
- targets: ["localhost:8080"]
relabel_configs:
- source_labels: [__address__]
target_label: env
replacement: production
Both agents use YAML for configuration, but datadog-agent has a more concise syntax for defining services and tags. The agent configuration is more verbose but offers greater flexibility in metric collection and labeling.
While datadog-agent provides a more integrated solution with its proprietary platform, agent offers an open-source alternative with a focus on flexibility and integration with the Grafana ecosystem. The choice between the two depends on specific monitoring requirements, existing infrastructure, and preference for open-source vs. proprietary solutions.
Architected for speed. Automated for easy. Monitoring and troubleshooting, transformed!
Pros of Netdata
- Real-time, high-resolution monitoring with per-second granularity
- Extensive built-in collectors for various systems and applications
- User-friendly web interface with interactive dashboards
Cons of Netdata
- Higher resource consumption, especially for long-term data storage
- Less flexible in terms of data output and integration with other systems
- Steeper learning curve for advanced configurations
Code Comparison
Netdata configuration (netdata.conf):
[global]
update every = 1
memory mode = ram
history = 3600
Agent configuration (agent.yaml):
server:
log_level: info
metrics:
wal_directory: /tmp/agent/wal
global:
scrape_interval: 15s
Key Differences
- Netdata focuses on real-time monitoring with a rich UI, while Agent is more oriented towards metrics collection and forwarding
- Agent offers better integration with Grafana ecosystem and supports multiple output formats
- Netdata provides more out-of-the-box collectors and visualizations, whereas Agent is more customizable and lightweight
Both projects are open-source and actively maintained, with Netdata having a larger community and more GitHub stars. The choice between them depends on specific monitoring needs, infrastructure requirements, and integration preferences.
Fluentd: Unified Logging Layer (project under CNCF)
Pros of Fluentd
- More mature and widely adopted in the industry
- Extensive plugin ecosystem with over 1000 community-contributed plugins
- Highly flexible and customizable for complex log processing workflows
Cons of Fluentd
- Can be resource-intensive, especially with multiple plugins
- Configuration can be complex for advanced use cases
- Less integrated with modern observability stacks compared to Agent
Code Comparison
Fluentd configuration example:
<source>
@type tail
path /var/log/httpd-access.log
pos_file /var/log/td-agent/httpd-access.log.pos
tag apache.access
<parse>
@type apache2
</parse>
</source>
Agent configuration example:
logs:
configs:
- name: system
positions:
filename: /tmp/positions.yaml
scrape_configs:
- job_name: varlogs
static_configs:
- targets: [localhost]
labels:
job: varlogs
__path__: /var/log/*log
Both Fluentd and Agent offer powerful log collection and processing capabilities. Fluentd excels in flexibility and plugin ecosystem, while Agent provides tighter integration with Grafana's observability stack and potentially simpler configuration for basic use cases. The choice between them depends on specific requirements and existing infrastructure.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
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:
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:
- The Prometheus ecosystem
- The OpenTelemetry ecosystem
- The Grafana open source ecosystem (Loki, Grafana, Tempo, Mimir, Pyroscope)
Why use Grafana Agent?
- Vendor-neutral: Fully compatible with the Prometheus, OpenTelemetry, and Grafana open source ecosystems.
- Every signal: Collect telemetry data for metrics, logs, traces, and continuous profiles.
- Scalable: Deploy on any number of machines to collect millions of active series and terabytes of logs.
- Battle-tested: Grafana Agent extends the existing battle-tested code from the Prometheus and OpenTelemetry Collector projects.
- Powerful: Write programmable pipelines with ease, and debug them using a built-in UI.
- Batteries included: Integrate with systems like MySQL, Kubernetes, and Apache to get telemetry that's immediately useful.
Getting started
Check out our documentation to see:
- Installation instructions for Grafana Agent Flow
- Details about Grafana Agent Flow
- Steps for Getting started with Grafana Agent Flow
- The list of Grafana Agent Flow Components
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:
- Chat with us on our community Slack channel. To invite yourself to the
Grafana Slack, visit https://slack.grafana.com/ and join the
#agent
channel. - Ask questions on the Discussions page.
- File an issue for bugs, issues, and feature suggestions.
- Attend the monthly community call.
Contribute
Refer to our contributors guide to learn how to contribute.
Top Related Projects
The Prometheus monitoring system and time series database.
Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.
:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
Main repository for Datadog Agent
Architected for speed. Automated for easy. Monitoring and troubleshooting, transformed!
Fluentd: Unified Logging Layer (project under CNCF)
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot