Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/agent/agent-local-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ server:
log_level: info
http_listen_port: 12345

prometheus:
metrics:
global:
scrape_interval: 1m
configs:
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Support contents and default values of `agent.yaml`:

# Configures metric collection.
# In previous versions of the agent, this field was called "prometheus".
[prometheus: <metrics_config>]
[metrics: <metrics_config>]

# Configures log collection.
# In previous versions of the agent, this field was called "loki".
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/integrations/node-exporter-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ server:
log_level: info
http_listen_port: 12345

prometheus:
metrics:
wal_directory: /tmp/agent
global:
scrape_interval: 15s
Expand Down
14 changes: 7 additions & 7 deletions docs/getting-started/create-config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ the Grafana Agent. The `node_exporter` integration will collect metrics from the
Linux machine that the Grafana Agent is running on.

```yaml
prometheus:
metrics:
wal_directory: /tmp/wal
global:
remote_write:
Expand Down Expand Up @@ -71,7 +71,7 @@ template and copy and paste subsections from your existing Prometheus config
into it:

```yaml
prometheus:
metrics:
global:
# PASTE PROMETHEUS global SECTION HERE
configs:
Expand All @@ -90,7 +90,7 @@ server:
log_level: info
http_listen_port: 12345

prometheus:
metrics:
global:
scrape_interval: 1m
configs:
Expand All @@ -117,10 +117,10 @@ their existing Promtail config with the following exceptions:

To migrate from an existing Promtail config, make sure you are using `clients`
instead of `client` and remove the `server` block if present. Then paste your
Promtail config into the Agent config file inside of a `loki` section:
Promtail config into the Agent config file inside of a `logs` section:

```yaml
loki:
logs:
configs:
- name: default
# PASTE YOUR PROMTAIL CONFIG INSIDE OF HERE
Expand All @@ -136,7 +136,7 @@ server:
log_level: info
http_listen_port: 12345

prometheus:
metrics:
global:
scrape_interval: 1m
remote_write:
Expand All @@ -148,7 +148,7 @@ prometheus:
static_configs:
- targets: ['127.0.0.1:12345']

loki:
logs:
configs:
- name: default
positions:
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/install-agent-on-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Grafana Agent can use the embedded [promtail](https://grafana.com/docs/loki/late
server:
log_level: debug
http_listen_port: 12345
loki:
logs:
# Choose a directory to save the last read position of log files at.
# This directory will be created if it doesn't already exist.
positions_directory: "C:\\path\\to\\directory"
Expand Down
2 changes: 1 addition & 1 deletion docs/scraping-service/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ server:
log_level: debug
http_listen_port: 12345

prometheus:
metrics:
global:
scrape_interval: 1m
scraping_service:
Expand Down
4 changes: 2 additions & 2 deletions example/docker-compose/agent/config/agent-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ server:
log_level: info
http_listen_port: 12345

prometheus:
metrics:
wal_directory: /tmp/agent
global:
scrape_interval: 1m
Expand All @@ -19,7 +19,7 @@ prometheus:
static_configs:
- targets: ['localhost:3100']

loki:
logs:
positions_directory: /tmp/loki-positions
configs:
- name: default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ server:
log_level: debug
http_listen_port: 12345

prometheus:
metrics:
global:
scrape_interval: 1m
scraping_service:
Expand Down
8 changes: 4 additions & 4 deletions example/docker-compose/agent/config/agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ server:
log_level: debug
http_listen_port: 12345

prometheus:
metrics:
global:
scrape_interval: 1m
configs:
Expand Down Expand Up @@ -56,7 +56,7 @@ prometheus:
remote_write:
- url: http://cortex:9009/api/prom/push

loki:
logs:
configs:
- name: default
positions:
Expand Down Expand Up @@ -91,8 +91,8 @@ traces:
timeout: 5s
send_batch_size: 100
automatic_logging:
backend: loki
loki_name: default
backend: logs_instance
logs_instance_name: default
spans: true
processes: true
roots: true
Expand Down
2 changes: 1 addition & 1 deletion packaging/grafana-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ server:
http_listen_address: '127.0.0.1'
http_listen_port: 9090

prometheus:
metrics:
global:
scrape_interval: 1m
wal_directory: '/var/lib/grafana-agent'
Expand Down
2 changes: 1 addition & 1 deletion packaging/windows/install_script.nsis
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Function WriteConfig
FileOpen $9 "$INSTDIR\agent-config.yaml" w #Opens a Empty File and fills it
FileWrite $9 `server:$\n`
FileWrite $9 ` http_listen_port: 12345$\n`
FileWrite $9 `prometheus:$\n`
FileWrite $9 `metrics:$\n`
FileWrite $9 ` wal_directory: $APPDATA\grafana-agent-wal$\n`
FileWrite $9 ` global:$\n`
FileWrite $9 ` scrape_interval: 1m$\n`
Expand Down