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.

Open source

otelcol.receiver.loki

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.

otelcol.receiver.loki receives Loki log entries, converts them to the OpenTelemetry logs format, and forwards them to other otelcol.* components.

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

Usage

Alloy
otelcol.receiver.loki "LABEL" {
  output {
    logs = [...]
  }
}

Arguments

otelcol.receiver.loki doesn’t support any arguments and is configured fully through inner blocks.

Blocks

The following blocks are supported inside the definition of otelcol.receiver.loki:

HierarchyBlockDescriptionRequired
outputoutputConfigures where to send converted telemetry data.yes

output block

The output block configures a set of components to forward resulting telemetry data to.

The following arguments are supported:

NameTypeDescriptionDefaultRequired
logslist(otelcol.Consumer)List of consumers to send logs to.[]no
metricslist(otelcol.Consumer)List of consumers to send metrics to.[]no
traces