---
title: "Agentic infrastructure with clickhousectl: a distributed ClickStack across three continents"
description: "A coding agent using the clickhousectl CLI stood up three ClickHouse Cloud services in us-east-1, eu-west-1 and ap-northeast-1, each ingesting OpenTelemetry logs, traces and metrics locally, with a federated global view in Europe for the ClickStack UI."
url: "https://swe.quest/articles/agentic-infrastructure-with-clickhousectl-a-distributed-clickstack-across-three-d01a61602ef37a05"
canonical: "https://clickhouse.com/blog/agentic-infrastructure-clickhousectl-distributed-clickstack"
source: "ClickHouse"
published: "2026-07-22"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["observability","ai-agents","analytics","developer-tools","cloud"]
---

# Agentic infrastructure with clickhousectl: a distributed ClickStack across three continents

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-07-22, 7 min read, How-to. Original: [https://clickhouse.com/blog/agentic-infrastructure-clickhousectl-distributed-clickstack](https://clickhouse.com/blog/agentic-infrastructure-clickhousectl-distributed-clickstack)

## Summary

A coding agent using the clickhousectl CLI stood up three ClickHouse Cloud services in us-east-1, eu-west-1 and ap-northeast-1, each ingesting OpenTelemetry logs, traces and metrics locally, with a federated global view in Europe for the ClickStack UI. The global view combines remoteSecure() table pointers to the remote regions with a Merge engine table over local and remote tables, so data stays resident in its region and is fetched only at query time. The agent scripted provisioning by parsing JSON output with jq and polling service status, then added SQL-based and native ClickStack alerts. The broader argument is that a scriptable CLI with clean JSON output suits agent-driven infrastructure better than a web console.

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)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Developer tools](https://swe.quest/tags/developer-tools.md) (Engineering practices)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)

## Prerequisites

- ClickHouse SQL basics ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- OpenTelemetry collectors ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))
- shell scripting with jq

## Keywords

clickhousectl, ClickHouse Cloud, ClickStack, OpenTelemetry, remoteSecure, Merge engine

## Related posts

- [Open House observability announcements: MCP server, AI Notebooks, and ClickStack Cloud](https://swe.quest/articles/open-house-observability-announcements-mcp-server-ai-notebooks-and-clickstack-027c56eb64027b0c.md): ClickHouse · 2026-05-27 · Easy · 9 min read · Observability, AI agents, Analytics & OLAP
  ClickHouse unveiled three observability updates: ClickStack Cloud, a serverless managed OpenTelemetry endpoint now in private preview; general availability of Managed ClickStack for teams that want control over ingestion and sizing; and AI Notebooks in beta, which turn incident investigations into branching, editable, shareable workspaces.
- [Agentic coding with ClickHouse. One person, one data stack, one full-stack application](https://swe.quest/articles/agentic-coding-with-clickhouse-one-person-one-data-stack-one-full-stack-ca4c2d9fd47cef68.md): ClickHouse · 2026-04-14 · Easy · 13 min read · AI for coding, Analytics & OLAP, Observability, AI agents
  A ClickHouse Solutions Architect with no frontend or backend background built ClickShop, a full-stack retail analytics demo, in a couple of days using Cursor.
- [Building an Observability Solution with ClickHouse - Part 1 - Logs](https://swe.quest/articles/building-an-observability-solution-with-clickhouse-part-1-logs-7367c3ac34797550.md): ClickHouse · 2023-01-11 · Medium · 24 min read · Observability, Analytics & OLAP, Kubernetes, SQL
  ClickHouse can serve as the storage backend for Kubernetes log collection using any of three agents: the OpenTelemetry Collector, Vector and Fluent Bit.
- [Getting started with clickhousectl: the ClickHouse CLI for local and cloud](https://swe.quest/articles/getting-started-with-clickhousectl-the-clickhouse-cli-for-local-and-cloud-e3c5c42045cc8994.md): ClickHouse · 2026-04-16 · Medium · 7 min read · Analytics & OLAP, Developer tools, CI/CD, Cloud platforms, AI agents
  clickhousectl (alias chctl) is a single CLI that manages local ClickHouse versions, isolated named servers, project scaffolding and ClickHouse Cloud services.
- [Announcing the Managed ClickStack MCP Server](https://swe.quest/articles/announcing-the-managed-clickstack-mcp-server-2e355443e7bc5530.md): ClickHouse · 2026-06-24 · Medium · 8 min read · Observability, AI agents, Analytics & OLAP
  ClickStack's MCP server, which exposes observability-specific investigation tools for logs, metrics and traces to agents like Claude Code, Cursor and Codex, is now available in Managed ClickStack on ClickHouse Cloud with OAuth and per-service dedicated compute.

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)
