diff --git a/cmd/agent/agent-local-config.yaml b/cmd/agent/agent-local-config.yaml index 019442e0a336..ca888bcbd2c5 100644 --- a/cmd/agent/agent-local-config.yaml +++ b/cmd/agent/agent-local-config.yaml @@ -2,7 +2,7 @@ server: log_level: info http_listen_port: 12345 -prometheus: +metrics: global: scrape_interval: 1m configs: diff --git a/docs/configuration/_index.md b/docs/configuration/_index.md index 4c7364fcd042..0ba2a82c69f3 100644 --- a/docs/configuration/_index.md +++ b/docs/configuration/_index.md @@ -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: ] # Configures log collection. # In previous versions of the agent, this field was called "loki". diff --git a/docs/configuration/integrations/node-exporter-config.md b/docs/configuration/integrations/node-exporter-config.md index 1e29769cb526..92bac94ab2a9 100644 --- a/docs/configuration/integrations/node-exporter-config.md +++ b/docs/configuration/integrations/node-exporter-config.md @@ -38,7 +38,7 @@ server: log_level: info http_listen_port: 12345 -prometheus: +metrics: wal_directory: /tmp/agent global: scrape_interval: 15s diff --git a/docs/getting-started/create-config-file.md b/docs/getting-started/create-config-file.md index 229e03e8e93d..ae25c58d551a 100644 --- a/docs/getting-started/create-config-file.md +++ b/docs/getting-started/create-config-file.md @@ -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: @@ -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: @@ -90,7 +90,7 @@ server: log_level: info http_listen_port: 12345 -prometheus: +metrics: global: scrape_interval: 1m configs: @@ -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 @@ -136,7 +136,7 @@ server: log_level: info http_listen_port: 12345 -prometheus: +metrics: global: scrape_interval: 1m remote_write: @@ -148,7 +148,7 @@ prometheus: static_configs: - targets: ['127.0.0.1:12345'] -loki: +logs: configs: - name: default positions: diff --git a/docs/getting-started/install-agent-on-windows.md b/docs/getting-started/install-agent-on-windows.md index 6d126ca3382c..a8fc8dbd504c 100644 --- a/docs/getting-started/install-agent-on-windows.md +++ b/docs/getting-started/install-agent-on-windows.md @@ -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" diff --git a/docs/scraping-service/_index.md b/docs/scraping-service/_index.md index 5d59e0b1548e..1c6fbb7a06d7 100644 --- a/docs/scraping-service/_index.md +++ b/docs/scraping-service/_index.md @@ -131,7 +131,7 @@ server: log_level: debug http_listen_port: 12345 -prometheus: +metrics: global: scrape_interval: 1m scraping_service: diff --git a/example/docker-compose/agent/config/agent-local.yaml b/example/docker-compose/agent/config/agent-local.yaml index acd801a026d2..fcf0ee22c8a5 100644 --- a/example/docker-compose/agent/config/agent-local.yaml +++ b/example/docker-compose/agent/config/agent-local.yaml @@ -3,7 +3,7 @@ server: log_level: info http_listen_port: 12345 -prometheus: +metrics: wal_directory: /tmp/agent global: scrape_interval: 1m @@ -19,7 +19,7 @@ prometheus: static_configs: - targets: ['localhost:3100'] -loki: +logs: positions_directory: /tmp/loki-positions configs: - name: default diff --git a/example/docker-compose/agent/config/agent-scraping-service.yaml b/example/docker-compose/agent/config/agent-scraping-service.yaml index 47401c4ccf5e..0ee77315da59 100644 --- a/example/docker-compose/agent/config/agent-scraping-service.yaml +++ b/example/docker-compose/agent/config/agent-scraping-service.yaml @@ -2,7 +2,7 @@ server: log_level: debug http_listen_port: 12345 -prometheus: +metrics: global: scrape_interval: 1m scraping_service: diff --git a/example/docker-compose/agent/config/agent.yaml b/example/docker-compose/agent/config/agent.yaml index e3c3ce6c55b1..06ffd2ab992a 100644 --- a/example/docker-compose/agent/config/agent.yaml +++ b/example/docker-compose/agent/config/agent.yaml @@ -2,7 +2,7 @@ server: log_level: debug http_listen_port: 12345 -prometheus: +metrics: global: scrape_interval: 1m configs: @@ -56,7 +56,7 @@ prometheus: remote_write: - url: http://cortex:9009/api/prom/push -loki: +logs: configs: - name: default positions: @@ -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 diff --git a/packaging/grafana-agent.yaml b/packaging/grafana-agent.yaml index 5e758bdf1b12..ff5fa21d8918 100644 --- a/packaging/grafana-agent.yaml +++ b/packaging/grafana-agent.yaml @@ -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' diff --git a/packaging/windows/install_script.nsis b/packaging/windows/install_script.nsis index 6505c409f864..4bc476a2a1e9 100644 --- a/packaging/windows/install_script.nsis +++ b/packaging/windows/install_script.nsis @@ -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`