Caution

Grafana Agent has reached End-of-Life (EOL) on November 1, 2025. Agent is no longer receiving vendor support and will no longer receive security or bug fixes. Current users of Agent Static mode, Agent Flow mode, and Agent Operator should proceed with migrating to Grafana Alloy. If you have already migrated to Alloy, no further action is required. Read more about why we recommend migrating to Grafana Alloy.

This is documentation for the next version of Grafana Agent Documentation. For the latest stable release, go to the latest version.

Open source

loki.echo

BETA: This is a beta component. Beta components are subject to breaking changes, and may be replaced with equivalent functionality that cover the same use case.

loki.echo receives log entries from other loki components and prints them to the process’ standard output (stdout).

Multiple loki.echo components can be specified by giving them different labels.

Usage

Alloy
loki.echo "LABEL" {}

Arguments

loki.echo accepts no arguments.

Exported fields

The following fields are exported and can be referenced by other components:

NameTypeDescription
receiverLogsReceiverA value that other components can use to send log entries to.

Component health

loki.echo is only reported as unhealthy if given an invalid configuration.

Debug information

loki.echo does not expose any component-specific debug information.

Example

This example creates a pipeline that reads log files from /var/log and prints log lines to echo:

Alloy
local.file_match "varlog" {
  path_targets = [{
    __path__ = "/var/log/*log",
    job      = "varlog",
  }]
}

loki.source.file "logs" {
  targets    = local.file_match.varlog.targets
  forward_to = [loki.echo.example.receiver]
}

loki.echo "example" { }

Compatible components

loki.echo has exports that can be consumed by the following components:

Note

Connecting some components may not be sensible or components may require further configuration to make the connection work correctly. Refer to the linked documentation for more details.