---
title: "Sending Nginx logs to ClickHouse with Fluent Bit"
description: "Fluent Bit can ship Nginx access logs into ClickHouse by tailing the log file with the nginx_access parser, nesting all parsed fields under a single `log` key with the Nest filter, and posting them through the HTTP output plugin as JSONEachRow inserts."
url: "https://swe.quest/articles/sending-nginx-logs-to-clickhouse-with-fluent-bit-5d4b04deaca82dc6"
canonical: "https://clickhouse.com/blog/nginx-logs-to-clickhouse-fluent-bit"
source: "ClickHouse"
published: "2022-10-21"
difficulty: "medium"
kind: "How-to"
reading_minutes: 5
tags: ["observability","analytics","databases"]
---

# Sending Nginx logs to ClickHouse with Fluent Bit

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2022-10-21, 5 min read, How-to. Original: [https://clickhouse.com/blog/nginx-logs-to-clickhouse-fluent-bit](https://clickhouse.com/blog/nginx-logs-to-clickhouse-fluent-bit)

## Summary

Fluent Bit can ship Nginx access logs into ClickHouse by tailing the log file with the nginx\_access parser, nesting all parsed fields under a single \`log\` key with the Nest filter, and posting them through the HTTP output plugin as JSONEachRow inserts. The ClickHouse side uses a MergeTree table with the experimental JSON object type (\`allow\_experimental\_object\_type\`), so fields are discovered without a predefined schema. Once loaded, fields can be inspected with \`describe\_extend\_object\_types\` and queried by dot path, for example grouping by \`log.code\` to count status codes. Grafana's ClickHouse plugin can then visualize the logs.

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)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)

## Prerequisites

- Basic SQL ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- Linux command line ([easy posts on Linux](https://swe.quest/tags/linux.md?difficulty=easy))
- Log collection concepts

## Keywords

ClickHouse, Fluent Bit, Nginx, Grafana, ClickHouse Cloud, JSONEachRow

## Related posts

- [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.
- [Sending Windows Event Logs to ClickHouse with Fluent Bit](https://swe.quest/articles/sending-windows-event-logs-to-clickhouse-with-fluent-bit-a9cd29ea6f2c615f.md): ClickHouse · 2023-01-17 · Medium · 10 min read · Observability, Analytics & OLAP, Threat detection
  Fluent Bit's winevtlog input can collect Windows Event Logs, including the Sysmon/Operational and Security channels, and ship them to ClickHouse over HTTP as JSONEachRow with async\_insert enabled.
- [Structured Logging in .NET with Serilog and ClickHouse](https://swe.quest/articles/structured-logging-in-net-with-serilog-and-clickhouse-433c37101ab76f06.md): ClickHouse · 2026-03-23 · Medium · 20 min read · .NET, Observability, Analytics & OLAP
  Serilog's ClickHouse sink lets an ASP.NET service write structured logs directly into a ClickHouse table with one WriteTo.ClickHouse() call.
- [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.
- [Clever ingests 200x more logs at the same cost with ClickHouse Cloud](https://swe.quest/articles/clever-ingests-200x-more-logs-at-the-same-cost-with-clickhouse-cloud-cafdd48afca59e57.md): ClickHouse · 2026-06-30 · Medium · 8 min read · Observability, Analytics & OLAP, Cost optimization, System design
  Clever replaced a split Datadog/Athena logging setup with ClickHouse Cloud.

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)
