---
title: "Scaling ClickStack alerting with built-in anomaly detection"
description: "Managed ClickStack adds z-score anomaly detection to query-builder charts, computing the expected value from a 7-bucket one-minute moving average and the standard deviation over a longer baseline (two hours by default)."
url: "https://swe.quest/articles/scaling-clickstack-alerting-with-built-in-anomaly-detection-0c0fc37df93c769a"
canonical: "https://clickhouse.com/blog/scaling-clickstack-alerting-anomaly-detection"
source: "ClickHouse"
published: "2026-10-15"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 10
tags: ["observability","scalability","scheduling"]
---

# Scaling ClickStack alerting with built-in anomaly detection

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-10-15, 10 min read, Announcement. Original: [https://clickhouse.com/blog/scaling-clickstack-alerting-anomaly-detection](https://clickhouse.com/blog/scaling-clickstack-alerting-anomaly-detection)

## Summary

Managed ClickStack adds z-score anomaly detection to query-builder charts, computing the expected value from a 7-bucket one-minute moving average and the standard deviation over a longer baseline (two hours by default). A minimum 5% relative change keeps stable metrics with near-zero variance from firing, and a 30-second delay prevents batched collector sends from looking like drops. Alert evaluation was scaled to tens of thousands of alerts by loading configs only for due alerts, running lookups concurrently, batching result writes, moving webhook delivery to a background queue, and hash-sharding alerts across workers with backfill for missed windows. The current detector misses gradual drift and seasonality, so static thresholds remain recommended for persistent limits.

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)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)
- [Scheduling](https://swe.quest/tags/scheduling.md) (Distributed systems)

## Prerequisites

- z-scores and standard deviation
- metrics alerting basics ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))

## Keywords

ClickStack, ClickHouse, Grafana, PromQL, z-score

## Related posts

- [What's new in ClickStack. October '25.](https://swe.quest/articles/what-s-new-in-clickstack-october-25-4616c6cec69bb526.md): ClickHouse · 2025-11-06 · Medium · 7 min read · Observability, Analytics & OLAP, Performance engineering
  ClickStack's October 2025 release brings alerting to ClickHouse Cloud, with Slack, PagerDuty and webhook integrations and both search-based and chart-based alerts.
- [What's new in ClickStack - April 2026](https://swe.quest/articles/what-s-new-in-clickstack-april-2026-8ecf13fb74019726.md): ClickHouse · 2026-05-19 · Medium · 13 min read · Observability, Analytics & OLAP, SQL, Performance engineering
  ClickStack's April 2026 release adds alerts driven by arbitrary ClickHouse SQL, so rolling baselines and standard-deviation anomaly checks can be written with window functions and fire when the query returns 1.
- [Faster root cause for slow traces with ClickStack Event Deltas](https://swe.quest/articles/faster-root-cause-for-slow-traces-with-clickstack-event-deltas-a6101b03bbd87110.md): ClickHouse · 2025-11-03 · Medium · 9 min read · Observability, Debugging, Performance engineering
  ClickStack's Event Deltas compare a user-selected region of slow spans on a duration-over-time heatmap against the remaining inlier spans, issuing two queries and sampling both sets to surface attribute values disproportionately present in the outliers.
- [What's new in ClickStack - March 2026](https://swe.quest/articles/what-s-new-in-clickstack-march-2026-6679d9e481e7bb58.md): ClickHouse · 2026-04-14 · Medium · 12 min read · Observability, Analytics & OLAP, SQL
  ClickStack's March 2026 update reworks Event Deltas for root-cause analysis.
- [ClickStack SQL Charting and Alerting](https://swe.quest/articles/clickstack-sql-charting-and-alerting-065ba971d00da162.md): ClickHouse · 2026-05-13 · Medium · 9 min read · Observability, SQL, Analytics & OLAP
  ClickStack now supports charts and alerts defined by arbitrary ClickHouse SQL, going beyond what predefined query builders can express.

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)
