MigrationMigrate from grafana to openobserve

Migrating Logs from Loki

Updated View MarkdownOpen in ChatGPTOpen in Claude

Overview

This section walks you through migrating logs from Loki to OpenObserve. You will:

  1. Assess how logs currently reach Loki
  2. Identify the migration path for each source type
  3. Update configs to point at OpenObserve
  4. Validate that logs are flowing correctly

Step 1: Assess Your Current Log Sources

Check how logs currently reach Loki. Common setups:

  • Promtail running as a DaemonSet, tailing container logs
  • OTel Collector with the loki exporter
  • Grafana Agent/Alloy with a logs block
  • Fluent Bit or Vector with a Loki output
  • Applications sending logs directly via HTTP

Step 2: Categorize Your Sources

Source TypeMigration Path
OTel Collector with loki exporterSwitch to otlphttp exporter
PromtailUpdate endpoint (Loki push API supported)
Grafana Agent / AlloyUpdate endpoint
Fluent BitChange output from loki to http
VectorChange sink from loki to http
TelegrafSee dedicated guide
AWS CloudWatch logsSee dedicated guide
Kubernetes container logsUse OpenObserve Collector Helm chart

Step 3: Migrate Each Source

From OTel Collector

The loki exporter in the OTel Collector has been deprecated since July 2024 (Loki v3+ supports native OTLP ingestion). The exporter still exists in opentelemetry-collector-contrib but emits deprecation warnings and is scheduled for removal. Use otlphttp instead.

Current config:

exporters:
  loki:
    endpoint: http://loki:3100/loki/api/v1/push

Copy the exact updated configuration from Data > Data sources > Custom > Logs > OTEL Collector in OpenObserve.

Data sources, Custom, Logs, OTEL Collector exporter config


From Promtail

Promtail speaks the Loki push API, which OpenObserve supports natively. You can keep Promtail and just change the endpoint:

Updated config:

clients:
  - url: http://openobserve:5080/api/{org}/loki/api/v1/push
    basic_auth:
      username: admin@example.com
      password: Complexpass#123

Replace {org} with your OpenObserve organization name (e.g. default). OpenObserve writes Loki pushes to the stream named in the o2_stream_name label (or stream_name); without that label they go to the default stream. Add it as a static label in Promtail if you want a different stream.

Alternatively, replace Promtail with the OpenObserve Collector or Fluent Bit for a more modern, OTel-native setup.

Copy the exact command to deploy the OpenObserve Collector from Data > Data sources > Recommended > Kubernetes in OpenObserve.

Data sources, Recommended, Kubernetes quick install command


From Grafana Agent / Alloy

Current config:

logs:
  configs:
    - name: default
      clients:
        - url: http://loki:3100/loki/api/v1/push

Updated config:

logs:
  configs:
    - name: default
      clients:
        - url: http://openobserve:5080/api/default/loki/api/v1/push
          basic_auth:
            username: admin@example.com
            password: Complexpass#123

Or replace with OpenObserve Collector.


From Fluent Bit

Current config:

[OUTPUT]
    Name loki
    Match *
    Host loki
    Port 3100
    Labels job=fluentbit

Change the output plugin from loki to http and point it at OpenObserve.

Data sources, Custom, Logs, FluentBit output config You can copy the exact Fluent Bit configuration from Data > Data sources > Custom > Logs > FluentBit in OpenObserve


From Vector

Current config:

[sinks.loki]
  type = "loki"
  inputs = ["logs"]
  endpoint = "http://loki:3100"
  labels.job = "vector"

Change the sink type from loki to http and point it at OpenObserve.

Data sources, Custom, Logs, Vector sink config You can copy the exact Vector configuration from Data > Data sources > Custom > Logs > Vector in OpenObserve


From Telegraf

For detailed steps on ingesting data into OpenObserve using Telegraf, see the dedicated guide:

Data sources, Custom, Metrics, Telegraf output config

Dedicated guide : Telegraf → OpenObserve


From AWS CloudWatch Logs

For detailed steps on ingesting AWS CloudWatch logs into OpenObserve, see the dedicated guide:

Data sources, Recommended, AWS, Individual Services with CloudWatch Logs and CloudWatch Metrics

Dedicated guide: AWS CloudWatch Logs → OpenObserve


From Kubernetes Container Logs

Use the OpenObserve Collector Helm chart to replace Promtail as a DaemonSet.

Data sources, Recommended, Kubernetes quick install command You can copy the exact collector installation command from Data > Data sources > Recommended > Kubernetes in OpenObserve


Step 4: How to Verify

Check in the UI

  1. Open the OpenObserve UI → Logs in the left sidebar.
  2. Confirm each log stream from your source inventory appears in the stream list.
  3. Run a test query against a known stream: SELECT * FROM "default"
  4. Verify field names look correct — especially that structured fields (like level, service, trace_id) are parsed as columns, not buried in a raw string.

Log search

OpenObserve Logs Explorer — verify log streams and field parsing after migration

OpenObserve Stream Schema

Verify Field Parsing

If your logs are JSON, OpenObserve auto-parses them into columns. Check that expected fields appear as filterable columns in the Logs explorer. If a field is missing, check whether the raw log line is actually valid JSON.

Troubleshooting

  • No streams visible: Check your collector's output logs for HTTP errors. Confirm the URI path matches your org — /api/default/ for the default org.
  • Fields not parsed: If logs aren't JSON, add a parsing processor in your collector (e.g. logstransform or json parser) before the exporter.
  • Auth errors: Regenerate the Base64 credential string — whitespace in the original input will break it.

Next Steps


Back to Overview | Previous: Migrating Traces | Next: Migrating Dashboards & Alerts

Was this page helpful?