RousselTMLEARNING

Article · OpenObserve: from discovery to expertise

Sending data to OpenObserve

1. Receiving endpoints #

Four ways to send your data.

Overview #

OpenObserve sources, receiving endpoints and streams
The path always contains the organization, here default.
FormatPathCheck
JSON/api/default/<stream>/_jsonTested
Bulk, Elasticsearch compatible/api/default/_bulkTested
OTLP HTTP/api/default/v1/logs, /v1/metrics, /v1/tracesTested
Prometheus remote write/api/default/prometheus/api/v1/writeDocumented

2. OpenTelemetry #

The recommended path for applications.

The Collector to OpenObserve #

The otlphttp exporter appends /v1/logs, /v1/metrics and /v1/traces itself: just set the base /api/default. The stream-name header selects the stream for logs and traces.

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318

processors:
  batch:

exporters:
  otlphttp/openobserve:
    endpoint: http://openobserve:5080/api/default
    headers:
      Authorization: "Basic ${env:O2_AUTH}"
      stream-name: applis

service:
  pipelines:
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/openobserve]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/openobserve]
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/openobserve]
export O2_AUTH=$(printf 'root@example.com:Complexpass#123' | base64)

Where does data land? #

SignalObserved result
LogsStream named by stream-name, with body, severity and service_name
TracesStream of type traces (default by default)
MetricsOne stream of type metrics per metric, queryable with PromQL

3. Prometheus and Fluent Bit #

Reusing existing collectors.

Prometheus remote write #

remote_write:
  - url: http://openobserve:5080/api/default/prometheus/api/v1/write
    basic_auth:
      username: root@example.com
      password: Complexpass#123

Fluent Bit #

The http output targets the _json endpoint. Json_date_key _timestamp keeps the original timestamp.

[OUTPUT]
  Name http
  Match *
  URI  /api/default/applis/_json
  Host openobserve
  Port 5080
  tls  Off
  Format json
  Json_date_key    _timestamp
  Json_date_format iso8601
  HTTP_User root@example.com
  HTTP_Passwd Complexpass#123

Filebeat or any bulk client #

The _bulk endpoint follows the Elasticsearch format: migrating an existing collector is often a simple address change. The index name becomes the stream name.

cat > lot.ndjson <<'EOF'
{"index":{"_index":"applis"}}
{"level":"warn","message":"file presque pleine"}
EOF
curl -u 'root@example.com:Complexpass#123' \
  -H 'Content-Type: application/x-ndjson' \
  --data-binary @lot.ndjson http://localhost:5080/api/default/_bulk

4. Authentication #

Do not send everything with the root account.

Using an ingestion token #

Each user has an ingestion token, visible in the UI under Data Sources or through the API. Create an account dedicated to collection rather than using the root password.

curl -s -u 'root@example.com:Complexpass#123' http://localhost:5080/api/default/passcode

📄 Sending logs, metrics and traces to OpenObserve →

My progress

  • ⏱ Estimated time : ≈ 11 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

Recommended Articles

Exploring data in OpenObserve: SQL, PromQL and VRL

Search with SQL, query metrics with PromQL, optimize a stream (indexes, partitions, retention) an...

Sending telemetry to ClickStack: OpenTelemetry SDKs, collectors, logs, Kubernetes and browser sessions

Feeding ClickStack: ingestion key, OpenTelemetry SDK variables, forwarding through an existing co...

Installing OpenObserve and ingesting your first data

Install OpenObserve with Docker Compose or the binary, configure it with its ZO_* variables, send...

Ingesting metrics into VictoriaMetrics: scraping, vmagent and remote write

All the ways to feed VictoriaMetrics: remote write from Prometheus, built-in scraping, vmagent an...

OpenObserve: architecture and concepts

Understanding OpenObserve: Parquet storage, deployment modes, roles (router, ingester, querier, c...

OpenTelemetry Collector: exporters (sending telemetry to backends)

Configure OpenTelemetry Collector exporters: OTLP gRPC/HTTP, Prometheus, prometheusremotewrite, L...

Sending traces to Tempo: OpenTelemetry instrumentation and Alloy

Produce and route traces to Tempo: Python/Java/Node auto-instrumentation, the manual SDK, OTEL en...

The observability trilemma: cost, completeness and performance, and how solutions resolve it

Understanding the observability trilemma (cost, data completeness, query performance), its three ...

k6 and Alloy: sending load test results over OpenTelemetry

Send k6 metrics to Alloy with the OpenTelemetry output, convert them for Mimir and compare them w...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!