ClickhouseDrew Davis, Dale McDiarmidAnnouncement
ClickStack SQL Charting and Alerting
Summary
ClickStack introduced SQL-based visualizations and SQL-based alerting to allow users to build charts and alerts using arbitrary ClickHouse SQL queries. Traditional query builders trade analytical flexibility for simplicity, preventing teams from easily expressing multi-stage computations like rolling baselines, anomaly detection, or dynamic SLO calculations. To maintain interactivity within dashboards, the system supports ClickHouse query parameters and macros that inject active time ranges, interval sizes, dashboard filters, and source tables. Furthermore, SQL-based alerting evaluates the numeric columns output by these queries, such as returning binary flags when values exceed statistical boundaries. By shifting computational logic directly into SQL, teams can implement complex operational checks without relying on static external thresholds.
Context
Traditional predefined query builders restrict advanced observability teams because they cannot easily support complex calculations such as rolling averages, historical baselines, window functions, and statistical anomaly detection.
Approach / What changed
ClickStack added native ClickHouse SQL charting and alerting with support for query parameters and macros like $__filters and $__sourceTable to dynamically bind dashboard state and execute custom analytical logic.
Takeaways
ClickStack now supports arbitrary ClickHouse SQL queries for building dashboards and alert rules.
Macros such as $__filters and $__sourceTable mirror ClickHouse Grafana plugin conventions to ease query migration and preserve dynamic filtering.
SQL-based alerts evaluate returned numeric query columns, enabling queries to compute rolling baselines and return binary flags directly to trigger alerts.
Source and freshness
- Source
- clickhouse.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.