Grafana LGTM Observability Stack
Self-managed Grafana, Loki, Tempo, and Mimir (AGPLv3) microservices stack for horizontally scalable Prometheus metrics, logs, and distributed traces backed by object storage.
Medium — 2 to 15 TB compressed data across two replicated shards
Monthly cost
$2,245.62
Annual cost
$26,947/year
| Compute | $1,394.62 |
| Storage | $851.00 |
| Other | $0.00 |
Saves $13.93/mo (1%) across c4a-standard-16, c4a-highcpu-4.
| Role | Instance | vCPU | GB RAM | Storage |
|---|---|---|---|---|
| Clickhouse Server | 2 × n4-standard-16 | 16 | 64 | 4 TB ssd |
| Clickhouse Keeper | 3 × n4-highcpu-4 | 4 | 8 | 100 GB nvme |
This two-shard replicated architecture on Google Cloud supports two to fifteen terabytes of compressed data for ClickHouse Self-Managed deployments. Compute instances dominate the monthly cost at one thousand three hundred ninety-four dollars and sixty-two cents out of a total two thousand two hundred forty-five dollars and sixty-two cents. High availability is disabled, meaning a single node failure causes data unavailability until manual intervention restores operations.
Share the current URL or copy the Google Cloud Terraform / OpenTofu baseline.
# Compatible with Terraform >= 1.6 and OpenTofu >= 1.6
terraform {
required_version = ">= 1.6.0"
required_providers {
google = {
source = "hashicorp/google"
version = "~> 6.0"
}
}
}
variable "project_id" {
description = "Google Cloud project ID for this deployment."
type = string
default = "replace-with-project-id"
}
provider "google" {
project = var.project_id
region = "us-central1"
}
locals {
zones = ["us-central1-a", "us-central1-b", "us-central1-c"]
}
# Generated for Google Cloud (us-central1) from the current estimate state.
resource "google_compute_disk" "clickhouse_server_1_data" {
count = 2
name = "clickhouse-clickhouse-server-1-data-${count.index + 1}"
type = "hyperdisk-balanced"
zone = local.zones[count.index % length(local.zones)]
size = 4000
}
resource "google_compute_instance" "clickhouse_server_1" {
count = 2
name = "clickhouse-clickhouse-server-1-${count.index + 1}"
machine_type = "n4-standard-16"
zone = local.zones[count.index % length(local.zones)]
boot_disk {
initialize_params {
image = "projects/debian-cloud/global/images/family/debian-12"
size = 50
type = "hyperdisk-balanced"
}
}
network_interface {
network = "default"
}
attached_disk {
source = google_compute_disk.clickhouse_server_1_data[count.index].id
mode = "READ_WRITE"
}
labels = {
app = "clickhouse"
role = "clickhouse-server"
}
}
resource "google_compute_disk" "clickhouse_keeper_2_data" {
count = 3
name = "clickhouse-clickhouse-keeper-2-data-${count.index + 1}"
type = "hyperdisk-balanced"
zone = local.zones[count.index % length(local.zones)]
size = 100
}
resource "google_compute_instance" "clickhouse_keeper_2" {
count = 3
name = "clickhouse-clickhouse-keeper-2-${count.index + 1}"
machine_type = "n4-highcpu-4"
zone = local.zones[count.index % length(local.zones)]
boot_disk {
initialize_params {
image = "projects/debian-cloud/global/images/family/debian-12"
size = 50
type = "hyperdisk-balanced"
}
}
network_interface {
network = "default"
}
attached_disk {
source = google_compute_disk.clickhouse_keeper_2_data[count.index].id
mode = "READ_WRITE"
}
labels = {
app = "clickhouse"
role = "clickhouse-keeper"
}
}
Reference architecture: ClickHouse Self-Managed for two-shard-replicated, version ClickHouse production sizing & ClickHouse Keeper quorum guidance, retrieved November 11, 2026.
https://clickhouse.com/docs/en/operations/tips
Pricing: Google Cloud pricing snapshot, retrieved November 22, 2026.
Commercial pricing only. GovCloud, sovereign cloud, and discounts beyond those shown are not modelled.
Based on ClickHouse self-managed operational sizing tips (1:4 CPU-to-RAM ratio and dedicated Keeper quorums).
Estimate excludes OpenTelemetry collector fleets, Kafka/Vector ingestion pipelines, backup buckets, and cross-AZ replication egress.
Self-managed Grafana, Loki, Tempo, and Mimir (AGPLv3) microservices stack for horizontally scalable Prometheus metrics, logs, and distributed traces backed by object storage.
Self-managed VictoriaMetrics for long-retention metrics storage, Prometheus remote write, and cost-conscious observability backends.
Self-managed Confluent Platform 8.x (Apache Kafka 4.x KRaft) for durable event streaming, schema governance, and Connect pipelines.