Skip to content

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

ClickHouse 5 min read How-to mediumAdept

Visualizing Data with ClickHouse - Part 1 - Grafana

Grafana connects to ClickHouse through the official ClickHouse plugin (version 2.x adds JSON and HTTP support) by creating a datasource and building dashboard panels with a query builder or raw SQL. Worked examples against the play.clickhouse.com datasets cover a monthly bar chart of Hacker News mentions, multi-series forex lines using the $__timeFilter macro and argMax, and candlesticks built with argMin/argMax/min/max. They also include a geohash-bucketed temperature heatmap on GeoMap and a log explorer view whose severity level is derived from HTTP status codes. Multi-line charts need a string series column, and SETTINGS max_result_rows lifts the playground's result limits.

Assumes: SQL aggregation basicsTime series data concepts

Related posts

  • Visualizing Data with ClickHouse - Part 3 - Metabase

    ClickHouse mediumAdept

    Metabase connects to ClickHouse via a plugin driver over the HTTP port and suits less SQL-savvy business users through its drag-and-drop "question" builder, while a SQL editor handles complex charts by pushing all transformation into the query. Worked examples on NOAA weather, forex and UK house price datasets produce region, grid and pin maps, waterfall, combo and funnel charts using ClickHouse functions such as geohashEncode, dictGet, window functions, arrayJoin and -If combinators. Compared with Grafana (time series, SQL-heavy) and Superset (analyst-focused SQL editor and reusable datasets), Metabase trades visual breadth and customization for a simpler workflow.

  • Visualizing Data with ClickHouse - Part 2 - Superset

    ClickHouse mediumAdept

    Apache Superset can be run via docker-compose with the clickhouse-connect driver to build charts and dashboards over ClickHouse data. The walkthrough covers connecting to the public sql.clickhouse.com instance, creating datasets from tables or saved SQL queries, and building line charts, treemaps, calendar heatmaps, country maps, box plots, word clouds and mixed charts. Example ClickHouse queries use window functions, medianIf/anyIf aggregates, dictionaries with dictGet, and array functions to compute word shingles.

  • ClickHouse Plugin for Grafana - 2.0 Release

    ClickHouse mediumAdept

    Version 2.0 of the ClickHouse Grafana plugin drops its client-side SQL AST parser and implements ad-hoc filters with ClickHouse's new `additional_table_filters` setting (22.7+), so the server injects each filter into the correct clauses, including subqueries. The release also adds HTTP transport via clickhouse-go's native-format-over-HTTP support, which lets traffic go through load balancers and proxies such as ch-proxy, and splits the connection and query timeouts. It adds JSON Object type support, with leaf nodes usable as columns and logs shown in the Explore view and Logs Panel. Breaking changes: the old automatic 'All' variable optimization is replaced by a manual `$__conditionalAll` macro, ad-hoc filters require ClickHouse 22.7+, and read-only users need readonly=2.

  • ClickStack SQL Charting and Alerting

    ClickHouse mediumAdept

    ClickStack now supports charts and alerts defined by arbitrary ClickHouse SQL, going beyond what predefined query builders can express. Query parameters such as {startDateMilliseconds:Int64} and macros such as $__filters and $__sourceTable keep SQL charts responsive to dashboard time ranges and filters, and they mirror the ClickHouse Grafana plugin so existing queries port with little change. Worked examples use window functions to compute rolling p95 latency baselines with 3-sigma bounds, and an alert query that returns 1 when error counts exceed a 30-interval rolling mean by two standard deviations. Result columns map to timestamp, series and grouping roles by type, and alerts evaluate the final numeric column per bucket and group.

  • Monitor your ClickHouse Cloud services with the new Prometheus/Grafana Mix-in

    ClickHouse mediumAdept

    ClickHouse Cloud now offers a Prometheus/Grafana mix-in: a pre-built Grafana dashboard, nearly identical to ClickHouse's internal one, fed by the cloud API's Prometheus endpoint. That endpoint federates metrics from every service in an organization and handles stopped or idling services, which per-instance scraping of system tables cannot. Its `filtered_metrics` parameter trims the 1000+ available metrics to about 125 critical ones, cutting scrape cost and noise. Setup is a Prometheus scrape config with basic auth and `honor_labels: true`, then importing the dashboard from Grafana.com or GitHub.

The quest for software engineering knowledge.

Look:
Layout: