---
title: "Building an Observability Solution with ClickHouse - Part 1 - Logs"
description: "ClickHouse can serve as the storage backend for Kubernetes log collection using any of three agents: the OpenTelemetry Collector, Vector and Fluent Bit."
url: "https://swe.quest/articles/building-an-observability-solution-with-clickhouse-part-1-logs-7367c3ac34797550"
canonical: "https://clickhouse.com/blog/storing-log-data-in-clickhouse-fluent-bit-vector-open-telemetry"
source: "ClickHouse"
published: "2023-01-11"
difficulty: "medium"
kind: "How-to"
reading_minutes: 24
tags: ["observability","analytics","kubernetes","sql"]
---

# Building an Observability Solution with ClickHouse - Part 1 - Logs

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2023-01-11, 24 min read, How-to. Original: [https://clickhouse.com/blog/storing-log-data-in-clickhouse-fluent-bit-vector-open-telemetry](https://clickhouse.com/blog/storing-log-data-in-clickhouse-fluent-bit-vector-open-telemetry)

## Summary

ClickHouse can serve as the storage backend for Kubernetes log collection using any of three agents: the OpenTelemetry Collector, Vector and Fluent Bit. Each agent can be deployed via Helm in agent (DaemonSet) and aggregator roles. Aggregators batch data into larger inserts that match ClickHouse insert best practices, and small deployments that skip them should use asynchronous inserts to avoid too many parts. The OTEL exporter (alpha) hard-codes its schema, while Vector (beta, HTTP/JSON sink) lets users define their own tables. Map types are recommended for sparse Kubernetes labels and annotations, and the post closes with compression results and example SQL queries for analyzing logs by pod, time window and string or regex match.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Kubernetes](https://swe.quest/tags/kubernetes.md) (Infrastructure)
- [SQL](https://swe.quest/tags/sql.md) (Languages)

## Prerequisites

- Kubernetes basics ([easy posts on Kubernetes](https://swe.quest/tags/kubernetes.md?difficulty=easy))
- Helm charts
- SQL ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))

## Keywords

ClickHouse, OpenTelemetry Collector, Vector, Fluent Bit, OTLP, MergeTree, Helm

## Related posts

- [ClickHouse and OpenTelemetry](https://swe.quest/articles/clickhouse-and-opentelemetry-84cdeb7807e844a6.md): ClickHouse · 2024-11-07 · Medium · 10 min read · Observability, Analytics & OLAP, Databases, Open source
  ClickHouse now officially supports the OpenTelemetry Collector exporter for ClickHouse, which has reached beta for logs and traces.
- [Sending Kubernetes logs To ClickHouse with Fluent Bit](https://swe.quest/articles/sending-kubernetes-logs-to-clickhouse-with-fluent-bit-84e8996833767c24.md): ClickHouse · 2022-10-28 · Medium · 8 min read · Observability, Kubernetes, Analytics & OLAP, Databases
  Fluent Bit deployed as a Kubernetes DaemonSet via its Helm chart can enrich container logs with Kubernetes metadata and ship them to ClickHouse over the HTTP interface using JSONEachRow inserts.
- [Building an Observability Solution with ClickHouse - Part 2 - Traces](https://swe.quest/articles/building-an-observability-solution-with-clickhouse-part-2-traces-1a2db2608573ffa7.md): ClickHouse · 2023-03-29 · Medium · 29 min read · Observability, Analytics & OLAP, Microservices
  Trace data from OpenTelemetry-instrumented services can be stored and queried in ClickHouse, treating spans as rows in a single analytics table and visualizing them in Grafana.
- [Scaling observability at Character.AI: thousands of GPUs, 10x logs, and 50% lower cost with ClickStack](https://swe.quest/articles/scaling-observability-at-character-ai-thousands-of-gpus-10x-logs-and-50-lower-a0ff79c12547eafa.md): ClickHouse · 2025-08-27 · Medium · 10 min read · Observability, Analytics & OLAP, Cost optimization, Kubernetes, Scaling
  Character.AI consolidated fragmented logging across multi-cloud Kubernetes GPU clusters onto ClickStack (HyperDX UI) backed by ClickHouse Cloud.
- [Building an Observability Solution with ClickHouse at Dash0](https://swe.quest/articles/building-an-observability-solution-with-clickhouse-at-dash0-f950ba66eb3161c6.md): ClickHouse · 2025-04-07 · Hard · 18 min read · Analytics & OLAP, Observability, Storage engines, Databases, Cost optimization
  Dash0 stores all OpenTelemetry metrics, logs and spans in ClickHouse, using PostgreSQL only for customer settings, so signals can be joined and correlated in one system.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
