Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 10 min read How-to mediumAdept

Sending Windows Event Logs to ClickHouse with Fluent Bit

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. Sysmon uses SwiftOnSecurity's MITRE ATT&CK-aligned configuration, and logs land in a MergeTree table built on the experimental JSON object type, whose inferred schema is shown. Grafana's ClickHouse plugin provides threat-hunting dashboards, and SysmonSimulator generates test events. For production, map frequent fields such as Computer to explicit LowCardinality columns and put them in the ORDER BY key instead of relying on dynamic JSON with tuple().

Assumes: Windows administration basicsSQL basicsLog collection agents

Related posts

  • Sending Kubernetes logs To ClickHouse with Fluent Bit

    ClickHouse mediumAdept

    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. A nest filter places all fields under a JSON `log` column, and a Lua filter lifts `host` and `pod_name` to top-level LowCardinality(String) columns so they can serve in the MergeTree primary key alongside timestamp. Recommended practices: use the experimental JSON Object type only for dynamic fields, explicitly type known fields, drop unused fields to avoid column explosion, and tune Fluent Bit's default 1s flush so ClickHouse receives batches of at least ~1000 rows. A sample Grafana dashboard (ID 17284) visualizes the resulting data.

  • Sending Nginx logs to ClickHouse with Fluent Bit

    ClickHouse mediumAdept

    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.

  • Structured Logging in .NET with Serilog and ClickHouse

    ClickHouse mediumAdept

    Serilog's ClickHouse sink lets an ASP.NET service write structured logs directly into a ClickHouse table with one WriteTo.ClickHouse() call. A fluent C# schema builder controls the table: typed JSON property hints, promoted columns such as CorrelationId, a text inverted index on messages, a MergeTree ORDER BY key and a TTL. The demo also covers correlation ID middleware via LogContext, single per-request summary events with UseSerilogRequestLogging and IDiagnosticContext, and flushing batched events with Log.CloseAndFlushAsync on shutdown. For production, manage the schema externally rather than letting the sink create it, and tune compression codecs and Kubernetes-aware sort keys.

  • What is ClickHouse Security? A technical overview of the agentic SIEM built on ClickHouse

    ClickHouse mediumAdept

    ClickHouse Security is an agentic SIEM, built from RunReveal technology and now in private preview, that stores security logs in a customer's ClickHouse Cloud service. It ingests from 120+ cloud, identity and SaaS sources via webhook, API polling with watermarks, or object storage. Built-in pipelines filter, enrich and normalize the logs to an OCSF-like schema while keeping the raw log. Detections run as scheduled ClickHouse SQL or streaming Sigma rules managed as code through a CLI and GitHub Action, and results land in queryable signals and alerts tables. Investigations collect timeline artifacts, and AI agents triage alerts, tune detections and answer plain-language queries by writing SQL, using bring-your-own LLM keys plus an MCP server, API and Slack bot.

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

    ClickHouse mediumAdept

    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.

The quest for software engineering knowledge.

Look:
Layout: