Skip to content

Commit cc8c008

Browse files
Add OpenTelemetry observability monitoring guides (#135)
Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
1 parent 91f897d commit cc8c008

7 files changed

Lines changed: 255 additions & 1 deletion

File tree

docs/platform/guides/client-organization/create-client-organization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ In the final step, configure the telemetry settings that will be applied to the
9393

9494
![Create Client Organization wizard — Step 4, Telemetry Configuration with monitoring type, log retention, and metrics retention periods](.././images/telemetry-configuration.png)
9595

96-
- **Select Monitoring Type**choose the monitoring stack to provision for the organization.
96+
- **Select Monitoring Cluster**the observability cluster that will store this organization's telemetry. Its `tenant-operator` provisions a `Tenant` on the cluster's TelemetryStack, isolating the organization's data within the shared stack. See [OpenTelemetry Monitoring](../../cluster-management/otel-monitoring.md) for how the monitoring cluster is set up.
9797
- **Logs** — set the **Retention Period** for collected logs.
9898
- **Metrics** — set the retention periods for collected metrics:
9999
- **Yearly Retention** — how long aggregated yearly metrics are kept.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
layout: docs
3+
menu:
4+
docsplatform_{{.version}}:
5+
identifier: cluster-management-add-observability
6+
name: Import Observability Cluster
7+
parent: cluster-management-add
8+
weight: 20
9+
menu_name: docsplatform_{{.version}}
10+
section_menu_id: guides
11+
---
12+
13+
# Importing an Observability Cluster
14+
15+
The Platform Console can run a dedicated **observability cluster** that collects
16+
telemetry (metrics, logs, and traces) from your spoke clusters through
17+
OpenTelemetry. This guide covers the two import-time tasks:
18+
19+
1. Importing the observability cluster itself.
20+
2. Enabling the OpenTelemetry feature on the spoke clusters you want to monitor.
21+
22+
For the full end-to-end setup — MinIO, the `telemetry` bucket, and the
23+
TelemetryStack — see [OpenTelemetry Monitoring](../../otel-monitoring.md).
24+
25+
## Import the Observability Cluster
26+
27+
Import the cluster as a spoke as you normally would (see
28+
[Adding a Cluster](overview.md)). During the import flow, select the
29+
**Observability Cluster** cluster profile. This provisions the components
30+
required to receive and store telemetry from other clusters.
31+
32+
## Enable the OpenTelemetry Feature on a Spoke Cluster
33+
34+
Once the observability cluster is ready, enable the OpenTelemetry feature on
35+
each spoke cluster you want it to monitor. There are two ways to do this.
36+
37+
### Option A: During Cluster Import
38+
39+
When importing a new cluster, select the destination observability cluster from
40+
the **Monitoring Cluster** drop-down in the import flow. This automatically
41+
enables the OpenTelemetry feature on the new spoke and routes its telemetry to
42+
the chosen monitoring cluster.
43+
44+
![Add Cluster import form with the Monitoring Cluster drop-down set to the observability cluster](../../images/otel-monitoring/import-select-monitoring-cluster.png)
45+
46+
### Option B: On an Existing Spoke Cluster
47+
48+
1. Import the cluster as a spoke (if it is not already imported).
49+
2. Install the Perses dashboards on the cluster:
50+
51+
```bash
52+
helm upgrade -i kubedb-perses-dashboards \
53+
oci://ghcr.io/appscode-charts/kubedb-perses-dashboards \
54+
-n monitoring --create-namespace \
55+
--version=v2026.4.27
56+
```
57+
58+
3. Navigate to the cluster's **Observability** feature set.
59+
4. Enable the **`appscode-otel-stack`** feature.
598 KB
Loading
380 KB
Loading
381 KB
Loading
380 KB
Loading
Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
---
2+
layout: docs
3+
menu:
4+
docsplatform_{{.version}}:
5+
identifier: cluster-management-otel-monitoring
6+
name: OpenTelemetry Monitoring
7+
parent: cluster-management
8+
weight: 90
9+
menu_name: docsplatform_{{.version}}
10+
section_menu_id: guides
11+
---
12+
13+
# OpenTelemetry Monitoring
14+
15+
This guide walks through setting up an observability stack that collects
16+
telemetry from your spoke clusters using OpenTelemetry, stores it in an
17+
object-storage bucket, and exposes it through a TelemetryStack.
18+
19+
## Architecture
20+
21+
The setup involves three kinds of clusters:
22+
23+
- **Hub cluster** — the central Platform Console (ACE). This is where you
24+
operate clusters, manage organizations, and view dashboards. It is the
25+
management plane; it does not store telemetry itself.
26+
- **Monitoring cluster** — a dedicated observability cluster that runs the
27+
TelemetryStack and stores all telemetry: metrics (Thanos + object storage),
28+
and logs and traces (ClickHouse). It serves multi-tenant queries back to the
29+
hub. This is the cluster imported with the **Observability Cluster** profile.
30+
- **Spoke / imported clusters** — the clusters you actually want to observe.
31+
Once the OpenTelemetry feature (`appscode-otel-stack`) is enabled on them,
32+
their collectors ship metrics, logs, and traces to the monitoring cluster.
33+
34+
In short: spoke clusters produce telemetry, the monitoring cluster stores and
35+
serves it, and the hub is where you view it.
36+
37+
## The Monitoring Cluster's Special Features
38+
39+
Beyond a normal spoke, the monitoring cluster runs three components (in the
40+
`monitoring` namespace) that make multi-tenant telemetry storage work:
41+
42+
- **`thanos-operator`** — reconciles the Thanos custom resources
43+
(`ThanosReceive`, `ThanosStore`, `ThanosQuery`, `ThanosCompact`,
44+
`ThanosRuler`) that the TelemetryStack generates into running workloads. It
45+
is the controller that turns your TelemetryStack spec into an actual Thanos
46+
deployment.
47+
- **`tenant-operator`** — manages `Tenant` custom resources. Each client
48+
organization / monitored cluster gets a `Tenant` that references the
49+
TelemetryStack and defines its retention and ingest/query endpoints, giving
50+
every tenant an isolated slice of the shared stack.
51+
- **`prom-label-proxy`** — the multi-tenant gateway on the ingest and query
52+
paths. It enforces per-tenant label filtering (via the tenant ID / label)
53+
so each tenant can only write to and read back its own data. The `Tenant`
54+
endpoints point at this proxy.
55+
56+
## Overview
57+
58+
The end-to-end flow is:
59+
60+
1. Create a self-hosted installer.
61+
2. Create the observability cluster.
62+
3. Install MinIO.
63+
4. Create the `telemetry` bucket.
64+
5. Create a TelemetryStack.
65+
6. Enable OpenTelemetry on the spoke clusters to be monitored.
66+
7. Create a client organization.
67+
68+
## Step 1: Create the Self-Hosted Installer
69+
70+
Set up a self-hosted installer for your environment.
71+
72+
## Step 2: Create the Observability Cluster
73+
74+
Create a new cluster and import it as a spoke, choosing the **Observability
75+
Cluster** cluster profile during import. See
76+
[Import Observability Cluster](add-cluster/import-observability-cluster.md) for
77+
details.
78+
79+
## Step 3: Install MinIO
80+
81+
The TelemetryStack can be backed by any S3-compatible object storage — MinIO is
82+
used here only as an example. Substitute your own storage solution (AWS S3, GCS,
83+
Ceph, etc.) as needed.
84+
85+
Install MinIO on the observability cluster to provide the object storage that
86+
backs the TelemetryStack:
87+
88+
```bash
89+
kubectl create ns minio
90+
91+
kubectl create secret generic tls-ssl-minio -n minio \
92+
--from-file=private.key \
93+
--from-file=public.crt
94+
95+
kubectl create secret generic tls-ssl-minio -n monitoring \
96+
--from-file=private.key \
97+
--from-file=public.crt
98+
99+
helm repo add minio-comm https://charts.min.io/
100+
101+
helm upgrade -i minio \
102+
--namespace minio \
103+
--create-namespace \
104+
--set rootUser=rootuser,rootPassword=rootpass123 \
105+
minio-comm/minio \
106+
-f ./minio/minio-values.yaml
107+
```
108+
109+
The `tls-ssl-minio` secret is created in both the `minio` and `monitoring`
110+
namespaces so that MinIO and the telemetry components can serve and consume TLS
111+
using the same certificate pair (`private.key` / `public.crt`).
112+
113+
## Step 4: Create the `telemetry` Bucket
114+
115+
Port-forward the MinIO console and create the bucket through the UI:
116+
117+
```bash
118+
kubectl port-forward -n minio svc/minio-console 9001:9001
119+
```
120+
121+
Open `https://localhost:9001` and log in:
122+
123+
| Field | Value |
124+
|----------|----------------|
125+
| Username | `rootuser` |
126+
| Password | `rootpass123` |
127+
128+
Create a bucket named **`telemetry`**.
129+
130+
## Step 5: Create a TelemetryStack
131+
132+
In the observability cluster, navigate to:
133+
134+
**Settings → TelemetryStack → Create a new Telemetry stack**
135+
136+
Fill in the configuration sections as shown below.
137+
138+
Configure Metrics (Compact, Store, Query, Router, Ingester):
139+
140+
![Create TelemetryStack — Metrics configuration](../images/otel-monitoring/telemetrystack-1.png)
141+
142+
Ruler, Additional Config, and Configure Clickhouse:
143+
144+
![Create TelemetryStack — Ruler, Additional Config, and Clickhouse](../images/otel-monitoring/telemetrystack-2.png)
145+
146+
Configure Clickhouse (Standalone / Create Topology), Configure S3, and Configure ID:
147+
148+
![Create TelemetryStack — Clickhouse, S3, and ID configuration](../images/otel-monitoring/telemetrystack-3.png)
149+
150+
### Resources Created by the TelemetryStack
151+
152+
Once the TelemetryStack is created, the operators reconcile it into a set of
153+
resources in the `monitoring` namespace. You can find everything the stack owns
154+
by looking for resources whose owner is the TelemetryStack:
155+
156+
```bash
157+
# The Thanos and ClickHouse custom resources generated from the stack
158+
kubectl get thanosreceives,thanosstores,thanosqueries,thanoscompacts,thanosrulers.monitoring.thanos.io,clickhouse -n monitoring
159+
160+
# Any resource owned by the telemetry-stack (children carry it in ownerReferences)
161+
kubectl get all -n monitoring -o json | \
162+
jq -r '.items[] | select(.metadata.ownerReferences[]?.kind=="TelemetryStack") | "\(.kind)/\(.metadata.name)"'
163+
```
164+
165+
For the **metrics** pipeline, `thanos-operator` produces:
166+
167+
- **`ThanosReceive`** → a receive-router deployment plus a receive-ingester
168+
StatefulSet — the remote-write ingestion endpoint for incoming metrics.
169+
- **`ThanosStore`** → a store StatefulSet that serves historical blocks from
170+
object storage.
171+
- **`ThanosQuery`** → query and query-frontend deployments that fan out reads
172+
across the receivers and store.
173+
- **`ThanosCompact`** → one StatefulSet per retention tier that downsamples and
174+
compacts blocks in object storage.
175+
- **`ThanosRuler`** → a ruler StatefulSet that evaluates recording/alerting
176+
rules and forwards alerts to Alertmanager.
177+
178+
For the **logs / traces** pipeline, a KubeDB **`ClickHouse`** database
179+
(`telemetry-stack-clickhouse`) is provisioned, along with the supporting
180+
secrets (`telemetry-stack-object-storage`,
181+
`telemetry-stack-clickhouse-storage-config`).
182+
183+
## Step 6: Enable OpenTelemetry on a Spoke Cluster
184+
185+
Enable the OpenTelemetry feature on each spoke cluster you want to monitor —
186+
either during import or on an existing spoke. See
187+
[Import Observability Cluster](add-cluster/import-observability-cluster.md#enable-the-opentelemetry-feature-on-a-spoke-cluster).
188+
189+
## Step 7: Create a Client Organization
190+
191+
Create a client organization and point it at the monitoring cluster so its
192+
telemetry is stored in the shared TelemetryStack. See
193+
[Create a Client Organization](../../client-organization/create-client-organization.md)
194+
— the **Telemetry Configuration** step is where you select the monitoring
195+
cluster and set retention.

0 commit comments

Comments
 (0)